-
Notifications
You must be signed in to change notification settings - Fork 58
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-2289 Add tracing sampling attribute #1092
RUMM-2289 Add tracing sampling attribute #1092
Conversation
50896a3
to
8b5a9c9
Compare
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.
Looks good for the sampling logic 👍.
Codecov Report
@@ Coverage Diff @@
## develop #1092 +/- ##
===========================================
+ Coverage 83.23% 83.26% +0.03%
===========================================
Files 273 273
Lines 9344 9348 +4
Branches 1502 1503 +1
===========================================
+ Hits 7777 7783 +6
Misses 1148 1148
+ Partials 419 417 -2
|
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" | ||
}, | ||
{ | ||
"type": "array", |
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.
are we using this event ? I don't remember to have something like this yet in the SDK.
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.
This schema is shared for all action children (i.e. Resources, Errors and Long Tasks). we used to only have an action.id: String
, but now it can be either a String, or an array of Strings (for Frustration Signals)
@@ -362,7 +362,7 @@ internal open class RumViewScope( | |||
type = errorType, | |||
sourceType = event.sourceType.toSchemaSourceType() | |||
), | |||
action = context.actionId?.let { ErrorEvent.Action(it) }, | |||
action = context.actionId?.let { ErrorEvent.Action(listOf(it)) }, |
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.
why are we doing this ? Is there any situation where a LongTask
will be caused by multiple actions ? Same question for all the other scopes.
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.
This can happen with frustration signals. The schema makes it so that an action.id
can be either a string, or a list of string. Because we can't have such a thing in Kotlin, we go for the list of string which allows us to report both a single or multiple ids
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.
lgtm! I added one question regarding unexpected symbol.
@@ -167,7 +167,7 @@ class ClassDeserializerGenerator( | |||
) { | |||
val opt = if (nullable) "?" else "" | |||
beginControlFlow( | |||
"$assignee = $getter$opt.asJsonArray$opt.let { %L ->", | |||
"$assignee = $getter$opt.asJsonArray$opt.let·{·%L·->", |
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.
why there is a change with middle dot instead of space here and in ClassGenerator
?
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.
This is part of KotlinPoet internals to mark non-breaking space. This ensures that the KotlinPoet file writer won't break a line on any of those space.
This is because some classNames get very large and the line breaking happens at an arbitrary size without knowledge of the syntax, leading to code that don't compile
What does this PR do?
Add the
_dd.rule_psr
attribute for RUM Resources to let customer know the sampling rate in APM