Skip to content

RUM-12403 Adds documentation for iOS manual keeping/dropping traces.#34163

Merged
maycmlee merged 5 commits intomasterfrom
miguel.arroz/ios-manually-keep-drop-traces
Feb 2, 2026
Merged

RUM-12403 Adds documentation for iOS manual keeping/dropping traces.#34163
maycmlee merged 5 commits intomasterfrom
miguel.arroz/ios-manually-keep-drop-traces

Conversation

@arroz
Copy link
Copy Markdown
Contributor

@arroz arroz commented Jan 27, 2026

What does this PR do? What is the motivation?

Documenting iOS SDK APIs for manually keeping and dropping traces.

Merge readiness:

  • Ready for merge

@arroz arroz added the WORK IN PROGRESS No review needed, it's a wip ;) label Jan 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Preview links (active after the build_preview check completes)

Modified Files

@arroz arroz force-pushed the miguel.arroz/ios-manually-keep-drop-traces branch from 65366b7 to 2130d8a Compare January 27, 2026 15:56
@arroz arroz force-pushed the miguel.arroz/ios-manually-keep-drop-traces branch from 2130d8a to 07e8283 Compare January 28, 2026 10:25
@arroz arroz marked this pull request as ready for review January 28, 2026 13:17
@arroz arroz requested review from a team as code owners January 28, 2026 13:17
@arroz arroz added under_review Sent to someone outside of the docs team for review. and removed WORK IN PROGRESS No review needed, it's a wip ;) labels Jan 28, 2026
@arroz arroz removed the under_review Sent to someone outside of the docs team for review. label Jan 28, 2026
Copy link
Copy Markdown
Contributor

@maycmlee maycmlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions and a question

{{< /tabs >}}

8. (Optional) To distribute traces between your environments, for example frontend - backend, you can either do it manually or leverage our auto instrumentation. In both cases, you can opt to inject the trace context into all requests or only into the sampled ones. A sampling of 100% is applied by default.
8. (Optional) Override a sampling decision by forcing a trace to be kept or dropped. For example, always keep a trace of a critical transaction, or always drop unnecessary, repetitive traces.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
8. (Optional) Override a sampling decision by forcing a trace to be kept or dropped. For example, always keep a trace of a critical transaction, or always drop unnecessary, repetitive traces.
8. (Optional) Override a sampling decision by forcing a trace to be kept or dropped. For example, always keep a critical transaction's trace, or always drop unnecessary, repetitive traces.

8. (Optional) To distribute traces between your environments, for example frontend - backend, you can either do it manually or leverage our auto instrumentation. In both cases, you can opt to inject the trace context into all requests or only into the sampled ones. A sampling of 100% is applied by default.
8. (Optional) Override a sampling decision by forcing a trace to be kept or dropped. For example, always keep a trace of a critical transaction, or always drop unnecessary, repetitive traces.

Manually keep a trace:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these commands the user runs?

Suggested change
Manually keep a trace:
To manually keep a trace:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are APIs, not commands. The APIs are similar to https://docs.datadoghq.com/tracing/trace_pipeline/ingestion_mechanisms/?tab=java#force-keep-and-drop but in the context of the iOS SDK (agent-less).

8. (Optional) To distribute traces between your environments, for example frontend - backend, you can either do it manually or leverage our auto instrumentation. In both cases, you can opt to inject the trace context into all requests or only into the sampled ones. A sampling of 100% is applied by default.
8. (Optional) Override a sampling decision by forcing a trace to be kept or dropped. For example, always keep a trace of a critical transaction, or always drop unnecessary, repetitive traces.

Manually keep a trace:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now this section looks like it's not part of step 8. Indenting the text and tabs will fix this. Let me know if you need any help!

{{< /tabs >}}

<div class="alert alert-danger">
Always call `keepTrace()` or `dropTrace()` on a root span before child spans are created, and before any context propagation. Otherwise, the system can't ensure consistency, resulting in partial traces being ingested.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Always call `keepTrace()` or `dropTrace()` on a root span before child spans are created, and before any context propagation. Otherwise, the system can't ensure consistency, resulting in partial traces being ingested.
Always call <code>keepTrace()</code> or <code>dropTrace()</code> on a root span before child spans are created, and before any context propagation. Otherwise, the system can't ensure consistency, resulting in partial traces being ingested.

Always call `keepTrace()` or `dropTrace()` on a root span before child spans are created, and before any context propagation. Otherwise, the system can't ensure consistency, resulting in partial traces being ingested.
</div>

9. (Optional) To distribute traces between your environments, for example frontend - backend, you can either do it manually or leverage our auto instrumentation. In both cases, you can opt to inject the trace context into all requests or only into the sampled ones. A sampling of 100% is applied by default.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
9. (Optional) To distribute traces between your environments, for example frontend - backend, you can either do it manually or leverage our auto instrumentation. In both cases, you can opt to inject the trace context into all requests or only into the sampled ones. A sampling of 100% is applied by default.
9. (Optional) To distribute traces between your environments, for example from frontend to backend, you can either do it manually or use auto instrumentation. In both cases, you can opt to inject the trace context into all requests or only into the sampled ones. A sampling of 100% is applied by default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied your suggestions. However, the indenting is now different from the rest of the page… let me know if I should fix the entire page, or revert it to make it consistent. FWIW it looks way better the way you suggested, I myself had trouble reading the previously step 8 (now, 9) and making sense of what was part of it and what wasn't.

@maycmlee maycmlee merged commit 357e683 into master Feb 2, 2026
18 of 19 checks passed
@maycmlee maycmlee deleted the miguel.arroz/ios-manually-keep-drop-traces branch February 2, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants