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 for segment/count Metric Not Emitting with Statsd-emitter #15347

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

YongGang
Copy link
Contributor

@YongGang YongGang commented Nov 8, 2023

Description

This pull request resolves a bug where the segment/count metric was not being emitted as expected when using the Statsd-emitter. The issue was traced to a discrepancy in the serviceName used within the metric name. While the Statsd-emitter was correctly appending the serviceName to the metric name, the configured metric name within the Statsd-emitter did not include the correct serviceName. This mismatch led to a failure during the metric name comparison check, resulting in the segment/count metric not being reported. The configuration has been corrected to include the appropriate serviceName, ensuring that the segment/count metric is now emitted correctly for each service.

Release note


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Copy link
Contributor

@TSFenwick TSFenwick left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Contributor

@suneet-s suneet-s left a comment

Choose a reason for hiding this comment

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

Good find!

Can you update the docs for statsd and prometheus as well to indicate the correct service name.

Also, it looks like some service names are configurable - like the coordinator, overlord and broker, but historicals, peons, middle managers are hardcoded. Can the docs make reference to these configurations so that users know how to decide what service name to use.

@YongGang
Copy link
Contributor Author

YongGang commented Nov 8, 2023

Good find!

Can you update the docs for statsd and prometheus as well to indicate the correct service name.

Also, it looks like some service names are configurable - like the coordinator, overlord and broker, but historicals, peons, middle managers are hardcoded. Can the docs make reference to these configurations so that users know how to decide what service name to use.

Doc Updated

Copy link
Contributor

@suneet-s suneet-s left a comment

Choose a reason for hiding this comment

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

I think I mis spoke earlier. It looks like the service name for the coordinator is hard coded in CliCoordinator. Thanks for the fix!

binder.bindConstant()
                  .annotatedWith(Names.named("serviceName"))
                  .to(TieredBrokerConfig.DEFAULT_COORDINATOR_SERVICE_NAME);

docs/development/extensions-contrib/prometheus.md Outdated Show resolved Hide resolved
docs/development/extensions-contrib/statsd.md Outdated Show resolved Hide resolved
@suneet-s suneet-s merged commit 3a3d37e into apache:master Nov 10, 2023
CaseyPan pushed a commit to CaseyPan/druid that referenced this pull request Nov 17, 2023
…#15347)

* fix segment/count metric in Statsd-emitter

* update doc

* Update docs/development/extensions-contrib/prometheus.md

Co-authored-by: Suneet Saldanha <[email protected]>

* Update docs/development/extensions-contrib/statsd.md

Co-authored-by: Suneet Saldanha <[email protected]>

---------

Co-authored-by: Suneet Saldanha <[email protected]>
@LakshSingla LakshSingla added this to the 29.0.0 milestone Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants