Skip to content
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

fix: register OTEL metrics if it's missing #1456

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Dec 9, 2024

Which problem is this PR solving?

When using OTELMetrics, Refinery previously only emits metrics if they have been registered. This is different from how LegacyMetrics works. LegacyMetrics will emit data regardless registration during startup.

This PR changes OTELMetrics to match its behavior with LegacyMetrics so that we don't accidentally create different behaviors when using these two different type of metrics

Short description of the changes

  • create a init function for each metrics type
  • call init in both Register and actual metrics calls
  • call register for missing router metrics data

@VinozzZ VinozzZ self-assigned this Dec 9, 2024
@VinozzZ VinozzZ requested a review from a team as a code owner December 9, 2024 18:30
Copy link
Contributor

@kentquirk kentquirk left a comment

Choose a reason for hiding this comment

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

Why this instead of making sure that we register all metrics?

metrics/otel_metrics.go Show resolved Hide resolved
@VinozzZ
Copy link
Contributor Author

VinozzZ commented Dec 9, 2024

Why this instead of making sure that we register all metrics?

I haven't found a solution programmatically to make sure we register all metrics so I thought we can at least match the behavior between the two

@VinozzZ VinozzZ merged commit 97a6add into main Dec 9, 2024
7 checks passed
@VinozzZ VinozzZ deleted the yingrong/fix_metrics_registration branch December 9, 2024 19:01
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.

Refinery 2.9.0 OTel Metrics not sending incoming_router_* events
2 participants