Implement new Sentry.metrics functionality#2818
Merged
sl0thentr0py merged 3 commits intomasterfrom Jan 5, 2026
Merged
Conversation
ec2ab74 to
ee24a43
Compare
Sentry.metrics functionalitySentry.metrics functionality
|
ee24a43 to
79f73e3
Compare
79f73e3 to
892aef6
Compare
sl0thentr0py
commented
Jan 4, 2026
| # | ||
| # @param telemetry [MetricEvent] | ||
| # @return [MetricEvent] | ||
| def apply_to_telemetry(telemetry) |
Member
Author
There was a problem hiding this comment.
logs will also go through this instead of apply_to_event in a subsequent refactor PR
solnic
approved these changes
Jan 5, 2026
Collaborator
solnic
left a comment
There was a problem hiding this comment.
@sl0thentr0py I'm assuming we're gonna consolidate this implementation with Logs as there's way too much duplication now
| "server.address" => configuration.server_name | ||
| }.compact | ||
|
|
||
| @attributes = default_attributes.merge(@attributes) |
Collaborator
There was a problem hiding this comment.
We could optimize this and make @attributes's default value to be the default attributes, then it won't allocate a default empty hash, and create intermediate hash just to merge defaults into the empty one.
This should remain lazy of course so that we're not building up the final attributes until serialization is invoked.
Member
Author
There was a problem hiding this comment.
I'm gonna move this logic to scope after unifying with logs
Co-authored-by: Peter Solnica <[email protected]>
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.
Description
Describe your changes:
Issues