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

Metrics do not have instance_id or container_id in case when deployed using docker or kubernetes #5073

Open
architgarg95 opened this issue Oct 15, 2024 · 2 comments
Labels
feature-request pkg:exporter-prometheus spec-feature This is a request to implement a new feature which is already specified by the OTel specification up-for-grabs Good for taking. Extra help will be provided by maintainers

Comments

@architgarg95
Copy link

What version of OpenTelemetry are you using?

"@opentelemetry/api": "1.9.0",
"@opentelemetry/auto-instrumentations-node": "0.49.1",

What version of Node are you using?

Node 14.17.6 and Node 16.19.0 both versions tested

What did you do?

I have multiple instances of a service running on 2 AWS EC2 (2 instances). Due to this the counter values maintained for http_server_duration_milliseconds_count have some difference that leads to Grafana Alloy (based on opentelemetry collector) showing a zig zag pattern (due to time diff between the 2 instances start). In java and python for multiple instances getting an instance__id associated with metrics but in case of Nodejs that was not the case.
Thought might be due to docker container or k8 cluster, tried the same for this application but still not getting any containerid or instance_id to distinguish between different instances metrics

What did you expect to see?

expected to see behaviour similar to Java and Python Opentelemetry wherein getting the instance_id attribute in the metrics

What did you see instead?

no instance_id attribute in metrics for nodejs

Additional context

This really affects the graph in grafana alloy resulting in rate graphs having a much higher value than showing zero, which really put us off

@architgarg95 architgarg95 added the bug Something isn't working label Oct 15, 2024
@architgarg95
Copy link
Author

using node auto instrumentation, version specified above as well. Any help would be appreciated

@pichlermarc pichlermarc transferred this issue from open-telemetry/opentelemetry-js-contrib Oct 16, 2024
@pichlermarc pichlermarc added feature-request pkg:exporter-prometheus and removed bug Something isn't working labels Oct 16, 2024
@pichlermarc
Copy link
Member

It look like there's a feature enabled on the Python and Java Prometheus exporters that makes resource attributes appear on the metric. This is an optional feature that we have not implemented yet, so I'm changing this to a feature-request.

Specification: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/prometheus.md#configuration

@pichlermarc pichlermarc added up-for-grabs Good for taking. Extra help will be provided by maintainers spec-feature This is a request to implement a new feature which is already specified by the OTel specification labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request pkg:exporter-prometheus spec-feature This is a request to implement a new feature which is already specified by the OTel specification up-for-grabs Good for taking. Extra help will be provided by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants
@pichlermarc @architgarg95 and others