feat(core): Add metric summaries to spans#10432
Merged
AbhiPrasad merged 12 commits intogetsentry:developfrom Feb 5, 2024
Merged
feat(core): Add metric summaries to spans#10432AbhiPrasad merged 12 commits intogetsentry:developfrom
AbhiPrasad merged 12 commits intogetsentry:developfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
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.
cleptric
reviewed
Jan 31, 2024
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
AbhiPrasad
reviewed
Feb 1, 2024
dev-packages/node-integration-tests/suites/tracing/metric-summaries/scenario.js
Show resolved
Hide resolved
AbhiPrasad
approved these changes
Feb 5, 2024
Contributor
AbhiPrasad
added a commit
that referenced
this pull request
Feb 5, 2024
This reverts commit 94cdd8b.
AbhiPrasad
added a commit
that referenced
this pull request
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} } ], ```
Contributor
|
Had to revert this - #10495 |
AbhiPrasad
reviewed
Feb 5, 2024
| const EXPECTED_TRANSACTION = { | ||
| transaction: 'Test Transaction', | ||
| _metrics_summary: { | ||
| 'c:root-counter@none': { |
Contributor
There was a problem hiding this comment.
this needs to be an array of metrics, based on what tags it has.
cleptric
added a commit
that referenced
this pull request
Feb 7, 2024
cleptric
added a commit
that referenced
this pull request
Feb 8, 2024
cleptric
added a commit
that referenced
this pull request
Feb 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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😆