Uh oh!
There was an error while loading. Please reload this page.
feat(core): Add metric summaries to spans - #10432
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
AbhiPrasad
commented
Jan 31, 2024
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AbhiPrasad
commented
Feb 5, 2024
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} } ], ```
AbhiPrasad
commented
Feb 5, 2024
Had to revert this - #10495 |
| const EXPECTED_TRANSACTION = { | ||
| transaction: 'Test Transaction', | ||
| _metrics_summary: { | ||
| 'c:root-counter@none': { |
There was a problem hiding this comment.
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: numberand ignore metrics withvalue: string. It looks like this didn't come up in PythonThe Python code usedtype:name@unitas the key for each metric summary. If the unit is not set, I guess we drop@metricfrom the end? The integration test I added has@undefined😆