-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(core): Add metric summaries to spans #10432
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Yes I think we can drop
Yeah this is TBD, but I think we might be able to hack span events to do this! |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
dev-packages/node-integration-tests/suites/tracing/metric-summaries/scenario.js
Show resolved
Hide resolved
This reverts commit 94cdd8b.
This reverts commit 94cdd8b. I mistakenly merged this - we have to fix the metric summaries format. Summaries are typed as `pub type MetricSummaryMapping = Object<Array<MetricSummary>>;` Which means that the `_metrics_summary` type needs to be `_metrics_summary?: Record<string, Array<MetricSummary>>;`. This is because we need to create separate entries if the tags have changed. ``` "c:processor.item_processed": [ { "min": 1, "max": 1, "count": 3, "sum": 3, "tags": {"success": true} }, { "min": 1, "max": 1, "count": 2, "sum": 2, "tags": {"success": false} } ], ```
Had to revert this - #10495 |
const EXPECTED_TRANSACTION = { | ||
transaction: 'Test Transaction', | ||
_metrics_summary: { | ||
'c:root-counter@none': { |
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 needs to be an array of metrics, based on what tags it has.
A quick PoC for #10059
I read the RFC, but it's almost entirely inspired by the Python implementation.
Outstanding issues:
Summaries are only attached to spans, should they also be attached to the root transaction, ie. incontexts.trace._metrics_summary
?We only add to the summaries whenvalue: number
and ignore metrics withvalue: string
. It looks like this didn't come up in PythonThe Python code usedtype:name@unit
as the key for each metric summary. If the unit is not set, I guess we drop@metric
from the end? The integration test I added has@undefined
😆