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

Add backward compatibility configs for tally to otel migration #7235

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Feb 4, 2025

What changed?

  • Add backward compatibility configs for tally to otel migration

Why?

  • There are some breaking changes when switching from tally to otel metric framework.
  1. Unit name will be appended to the metric name
  2. Timer metric will be emitted as milliseconds instead of seconds
    This PR adds configs for controlling both behaviors when using otel framework so that the behavior will be the same as tally.

How did you test it?

  • Unit tests
  • Tested locally with various combination of configurations.

Potential risks

  • No risk by default. If new options are enabled, timer metric value may be wrong or not bucketed correctly.

Documentation

Is hotfix candidate?

  • No.

@yycptt yycptt requested review from bergundy and yiminc February 4, 2025 19:08
@yycptt
Copy link
Member Author

yycptt commented Feb 4, 2025

Related to #7211

Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

LGTM, looks like there's good test coverage.

@yycptt yycptt marked this pull request as ready for review February 5, 2025 01:39
@yycptt yycptt requested a review from a team as a code owner February 5, 2025 01:39
WithoutUnitSuffix bool `yaml:"withoutUnitSuffix"`
// WithoutCounterSuffix controls the additional of _total suffixes to counter metric names.
// This config only takes effect when using opentelemetry framework.
WithoutCounterSuffix bool `yaml:"withoutCounterSuffix"`
Copy link
Member Author

Choose a reason for hiding this comment

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

Also added config for disabling the addition of _total to Counters

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.

3 participants