-
Notifications
You must be signed in to change notification settings - Fork 193
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
transaction: Collect stats about dropped spans #1132
transaction: Collect stats about dropped spans #1132
Conversation
Modifies the span timing reporting function to collect statistics about dropped spans when they exceed the `transaction_max_spans`. Each dropped span is now aggregated under the `transaction.dropped_spans_stats` array with a maximum count of items of `128`. Each dropped span is aggregated on 4 dimensions: `outcome`. `subtype`, `type` and `destination_service_resource` and report 2 metrics, their `duration.sum.us` and the `count` for each of the aggregated dropped spans. Signed-off-by: Marc Lopez Rubio <[email protected]>
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Signed-off-by: Marc Lopez Rubio <[email protected]>
We may remove the "type" and "subtype" dimensions since they're not sure on the |
Signed-off-by: Marc Lopez Rubio <[email protected]>
Signed-off-by: Marc Lopez Rubio <[email protected]>
Signed-off-by: Marc Lopez Rubio <[email protected]>
@@ -510,7 +510,7 @@ func spanSelfTimeMetrics(txName, txType, spanType, spanSubtype string, count int | |||
}, | |||
Samples: map[string]model.Metric{ | |||
"span.self_time.count": {Value: float64(count)}, | |||
"span.self_time.sum.us": {Value: sum.Seconds() * 1000000}, | |||
"span.self_time.sum.us": {Value: float64(sum) / 1e3}, |
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 had to change this since there was a case where 510000
turned into 510.00000000000006
due to the time.Duration.Seconds()
logic. In any case, this should be the same as the other operation, perhaps a little more efficient, since we're only doing 1 division.
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 fine, it's just test code anyway
Signed-off-by: Marc Lopez Rubio <[email protected]>
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.
Sorry, I just noticed one major issue (I think) related to where dropped span metrics are accumulated. I'd like it if we can simplify the tests a bit but otherwise LGTM.
@@ -510,7 +510,7 @@ func spanSelfTimeMetrics(txName, txType, spanType, spanSubtype string, count int | |||
}, | |||
Samples: map[string]model.Metric{ | |||
"span.self_time.count": {Value: float64(count)}, | |||
"span.self_time.sum.us": {Value: sum.Seconds() * 1000000}, | |||
"span.self_time.sum.us": {Value: float64(sum) / 1e3}, |
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 fine, it's just test code anyway
Signed-off-by: Marc Lopez Rubio <[email protected]>
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.
thanks :)
Description
Modifies the span timing reporting function to collect statistics about
dropped spans when they exceed the
transaction_max_spans
. Each droppedspan is now aggregated under the
transaction.dropped_spans_stats
arraywith a maximum count of items of
128
.Each dropped span is aggregated on:
destination_service_resource
andoutcome
reporting 2 metrics, theirduration.sum.us
and thecount
for each of the aggregated dropped spans.
TODO
Related issues
Closes #1113