-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUMM-2290 Support rulePsr
for APM traffic ingestion
#1029
RUMM-2290 Support rulePsr
for APM traffic ingestion
#1029
Conversation
…tion control and add support to `_dd.rule_psr` passed from cross-platform SDKs
7aaa07f
to
487140f
Compare
/// We send cross-platform SDK's sample rate within RUM resource in order to provide accurate visibility into what settings are | ||
/// configured at the SDK level. This gets displayed on APM's traffic ingestion control page. | ||
/// Expects `Double` value between `0.0` and `1.0`. | ||
static let rulePSR = "_dd.rule_psr" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we could call it better (rulePSR is pretty ambiguous), but I decided to stick with the lingo proposed in rum-event-format and in Android SDK to make it easier for cross-platform.
Datadog ReportBranch report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🚀
Sources/Datadog/RUM/Instrumentation/Resources/URLSessionRUMResourcesHandler.swift
Outdated
Show resolved
Hide resolved
CHANGELOG.md
Outdated
@@ -402,6 +404,7 @@ | |||
[@leffelmania]: https://github.com/LeffelMania | |||
[@simpleapp]: https://github.com/SimpleApp | |||
[@tsvetelinvladimirov]: https://github.com/TsvetelinVladimirov | |||
[#1029]: https://github.com/DataDog/dd-sdk-ios/issues/1029 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets move this line up so we keep grouping issues vs. contributors 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍.
I'm using pimpmychangelog
for formatting and it was inserted there automatically. However, due to manual adjustments others do it requires more and more manual patches on my side. Would be nice to streamline CHANGELOG formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed!
What and why?
📦 This PR sets the
rulePsr
attribute in RUM resource with the trace sample rate configured in the SDK. This is to provide users with visibility into what APM settings are configured at the SDK level and how much of the traffic is ingested.The value gets displayed on the APM Ingestion Control page:
To support passing this value from cross-platform SDKs,
_dd.rule_psr
internal attribute is implemented - as counterpart of recent Android proposal: DataDog/dd-sdk-android#1092.How?
Trace sample rate value is passed from
URLSessionInterceptor
all the way down toRUMResourceScope
. This is achieved with existingRUMSpanContext
transported in "start resource" command.Cross-platform SDKs should use
_dd.rule_psr
attribute (passed in any resource-related API, e.g. "stop resource"):🏕️ I also made small cleanup in
RUMResourceScopeTests
by removing unnecessary configuration in some of them. The new behaviour is now asserted with 2 new tests - instead of bloating configuration and assertion in previous ones.Review checklist
Custom CI job configuration (optional)