Skip to content

Conversation

@sl0thentr0py
Copy link
Member

@sl0thentr0py sl0thentr0py commented Jan 4, 2026

Description

Describe your changes:

Issues

@linear
Copy link

linear bot commented Jan 4, 2026

@sl0thentr0py sl0thentr0py changed the title Implemnet new Sentry.metrics functionality Implement new Sentry.metrics functionality Jan 4, 2026
@github-actions
Copy link

github-actions bot commented Jan 4, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against b4a156b

#
# @param telemetry [MetricEvent]
# @return [MetricEvent]
def apply_to_telemetry(telemetry)
Copy link
Member Author

@sl0thentr0py sl0thentr0py Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logs will also go through this instead of apply_to_event in a subsequent refactor PR

@sl0thentr0py sl0thentr0py marked this pull request as ready for review January 4, 2026 18:26
@sl0thentr0py sl0thentr0py requested a review from solnic January 4, 2026 18:26
Copy link
Collaborator

@solnic solnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm gonna move this logic to scope after unifying with logs

Co-authored-by: Peter Solnica <peter@solnica.online>
@sl0thentr0py sl0thentr0py merged commit 4fcb941 into master Jan 5, 2026
136 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/metrics-again branch January 5, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentry Metrics for Ruby

3 participants