stackdriver_exporter icon indicating copy to clipboard operation
stackdriver_exporter copied to clipboard

add system metadata labels

Open cczhuang420 opened this issue 9 months ago • 4 comments

This PR is to export the system metadata labels along with metric and resource labels.

cczhuang420 avatar Mar 02 '25 23:03 cczhuang420

~~Sorry, this is a job or service discovery.~~

~~System metadata labels are defined by Prometheus, not by exporters.~~

SuperQ avatar Mar 03 '25 09:03 SuperQ

Sorry, I misunderstood this change. I think this needs more documentation and description as to why it is necessary.

SuperQ avatar Mar 03 '25 09:03 SuperQ

@SuperQ We also found it missing when using the project. System and user labels are part of the resources being monitored, and there's many use cases requiring filtering / grouping metrics by those types of labels.

@cczhuang420 Could I ask that you also add user defined labels in this PR? As described in the API description, MonitoredResourceMetadata includes both systemLabels which you added but also userLabels. https://cloud.google.com/monitoring/api/ref_v3/rest/v3/TimeSeries#MonitoredResourceMetadata

avivzgroundcover avatar Mar 13 '25 11:03 avivzgroundcover

@SuperQ We also found it missing when using the project. System and user labels are part of the resources being monitored, and there's many use cases requiring filtering / grouping metrics by those types of labels.

@cczhuang420 Could I ask that you also add user defined labels in this PR? As described in the API description, MonitoredResourceMetadata includes both systemLabels which you added but also userLabels. https://cloud.google.com/monitoring/api/ref_v3/rest/v3/TimeSeries#MonitoredResourceMetadata

Hi folks, sorry that I couldn't manage to finish this given my current limited bandwidth, so have moved it to draft. I would need to test it more throughly before raising a PR. Feel free to close it.

cczhuang420 avatar Mar 13 '25 22:03 cczhuang420