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

Configure StackdriverRegistry with with resource labels to support non global resource-types #360

Open
PanielDan opened this issue Nov 17, 2023 · 3 comments

Comments

@PanielDan
Copy link

PanielDan commented Nov 17, 2023

Hello,

I'm running into some problems configuring a resource-type that is not global for the quarkus-micrometer-registry-stackdriver extension.

i.g.StatusRuntimeException: INVALID_ARGUMENT: One or more TimeSeries could not be written: The set of resource labels is incomplete. Missing labels: (location namespace job task_id).: timeSeries[0]

GCP recommends using generic_task or generic_node for resource types and requires specifics labels to configured for the Monitoring API to take in these datapoint. I haven't been able to find way to configure those values in application.properties.

Seems like other devs have gotten to make this work by overriding the Micrometer StackdiverConfig during construction of the MetricsRegistry (micrometer-metrics/micrometer#1907), but quarkus-micrometer-registry-stackdriver comes with a predefined @DefaultBean that creates the StackdiverConfig from config values. So I don't know of a way to do this without just connecting micrometer-registry-stackdriver and quarkus-micrometer myself.

Do you know of any instructions or examples you could provide to help configure this resource labels?

@PanielDan
Copy link
Author

Would be nice to have a Quarkus equivalent to this PR from Spring

spring-projects/spring-boot#26961

@PanielDan
Copy link
Author

[Update] I got around this by disabling default registry creation, doing a custom implementation of the StackdriverConfig, and creating my own StackDriverMeterRegistry using my custom StackdriverConfig object.

@ebullient
Copy link
Contributor

I would welcome a PR ...

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

No branches or pull requests

2 participants