Skip to content

prometheus-emitter: disable label tracking when the TTL isn't set#18718

Merged
abhishekrb19 merged 3 commits into
apache:masterfrom
aho135:prometheus-ttl-patch
Nov 5, 2025
Merged

prometheus-emitter: disable label tracking when the TTL isn't set#18718
abhishekrb19 merged 3 commits into
apache:masterfrom
aho135:prometheus-ttl-patch

Conversation

@aho135

@aho135 aho135 commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

A small follow up to #18689 to not track labels if the TTL isn't set


Key changed/added classes in this PR
  • DimensionsAndCollector
  • PrometheusEmitterTest

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.

public void resetLastUpdateTime(List<String> labelValues)
{
if (ttlSeconds == null) {
// Label tracking is only required if a metric TTL has been configured

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could move this comment to the method's javadoc

@abhishekrb19

Copy link
Copy Markdown
Contributor

The failing embedded BasicAuthMSQTest is unrelated to this PR

@abhishekrb19
abhishekrb19 merged commit 33a9c29 into apache:master Nov 5, 2025
50 of 52 checks passed
@kfaraz

kfaraz commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

@abhishekrb19 , even though the primary failure was unrelated, we should probably try re-runs in this case as there might be some ITs/docker tests that use the prometheus emitter (I don't know if there any though) and may be affected by the changes in the PR.

On that note, I think we should try adding an embedded test for the Prometheus emitter.

@kfaraz

kfaraz commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

The failure seems to have been due to a race condition in the auth embedded test.

@abhishekrb19

Copy link
Copy Markdown
Contributor

@abhishekrb19 , even though the primary failure was unrelated, we should probably try re-runs in this case as there might be some ITs/docker tests that use the prometheus emitter (I don't know if there any though) and may be affected by the changes in the PR.

Ah yes, sorry, I should've clarified, the CI was retried and it failed twice in a row before merging (and I recall seeing the same failure on another PR too).

@kfaraz

kfaraz commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Ah yes, sorry, I should've clarified, the CI was retried and it failed twice in a row before merging (and I recall seeing the same failure on another PR too).

Thanks for the clarification! Yes, embedded tests have been acting out a little recently as we migrate more and more to them. I think they may have stumbled upon some race conditions in the Overlord code. I plan to spend some time investigating it next week.

@kgyrtkirk kgyrtkirk added this to the 36.0.0 milestone Jan 19, 2026
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
…ache#18718)

Follow up to apache#18689 to not track labels if the TTL isn't set



Co-authored-by: Andrew Ho <[email protected]>
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