Skip to content

Conversation

Shaderbug
Copy link
Contributor

This resolves #6281 by making the automatic creation of Stackdriver metric descriptors configurable via a configuration property.

To be able to unit-test the behaviour, I have introduced a new MetricServiceClientFactory class, that can be replaced in tests.

Looking forward to your feedback :)

Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

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

Thanks for the work on this. It looks pretty good. I left some feedback about API visibility and the checkstyle errors that are failing the build currently.

@Shaderbug Shaderbug force-pushed the stackdriver-configurable-auto-create branch from 939686c to afdc950 Compare June 16, 2025 18:12
@Shaderbug
Copy link
Contributor Author

Thank you very much for the quick review, I've addressed the comments :)

Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you.

@shakuzen shakuzen enabled auto-merge (squash) June 17, 2025 10:15
This option can be used to disable the automatic metric
descriptor creation behaviour when descriptors are instead
managed using IaC.

Signed-off-by: Shaderbug <119610832+shaderbug@users.noreply.github.com>
@shakuzen shakuzen force-pushed the stackdriver-configurable-auto-create branch from afdc950 to 555dbc3 Compare June 17, 2025 10:18
@shakuzen shakuzen merged commit 158ede9 into micrometer-metrics:main Jun 17, 2025
9 checks passed
izeye added a commit to izeye/micrometer that referenced this pull request Jun 28, 2025
Signed-off-by: Johnny Lim <izeye@naver.com>
@izeye izeye mentioned this pull request Jun 28, 2025
shakuzen pushed a commit that referenced this pull request Jun 30, 2025
Signed-off-by: Johnny Lim <izeye@naver.com>
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.

StackdriverConfig option to not create metric descriptors
2 participants