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

Add an internal metric build_info #4354

Closed
gillg opened this issue Nov 3, 2021 · 8 comments
Closed

Add an internal metric build_info #4354

gillg opened this issue Nov 3, 2021 · 8 comments

Comments

@gillg
Copy link
Contributor

gillg commented Nov 3, 2021

Is your feature request related to a problem? Please describe.
Add a metric exposing the build_info somewhere around https://github.com/open-telemetry/opentelemetry-collector/tree/main/internal/obsreportconfig/obsmetrics
This could be very useful to monitor deployed collector and track version drifs, missing updates and so on...

@Ashmita152
Copy link
Contributor

Ashmita152 commented Nov 5, 2021

Can I pick this task if no one has picked it yet.

@bogdandrutu
Copy link
Member

We already have the version in all the metrics, but not enabled by default https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/telemetry.go#L48

@gillg
Copy link
Contributor Author

gillg commented Nov 5, 2021

Thanks @bogdandrutu ! But I don't unsertand, by default this var is true, I don't see any way to update it, but I don't have it either in timeseries, either in metrics labels. 🤔
Moreover, this seems higly related to OpenCensus, but I know there is a lot of efforts made around Prometheus receiver to get rid of dependancies in OpenCencus, does this telemetry.go file is always in use ?

@bogdanov1609
Copy link

+1 on this one.
And i dont think that adding version in all the metrics is a good idea, because every time series database(like prometheus, victoria metrics or InfluxDB) doesn't like too many uniq time series.

@gillg
Copy link
Contributor Author

gillg commented Mar 12, 2022

@dashpole don't you think it duplicates the new "target" metric ? In this case the version, go version, etc will be resources attributes of all internal otel collector data.
What would be the plan to avoid conflicts with external receivers from multiple sources ?
There is also a conceptual question around the otel collector metric endpoint in Prometheus format. Does it should expose the "target" metric and Prometheus receiver just carry it without transformation?

@dashpole
Copy link
Contributor

don't you think it duplicates the new "target" metric ?

Yes, this is a special-case of passing resource information through prometheus.

What would be the plan to avoid conflicts with external receivers from multiple sources?

I'm not sure I understand the question.

Does it should expose the "target" metric and Prometheus receiver just carry it without transformation?

The prometheus receiver will transform target info back into resource information. That is specified in https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md#resource-attributes, and is tracked in open-telemetry/opentelemetry-collector-contrib#8265.

@github-actions github-actions bot added the Stale label Mar 14, 2024
@jmcarp
Copy link

jmcarp commented Mar 19, 2024

Was there a decision about this? A metric like otelcol_build_info metric would be really useful. My team runs a large number of otel collector instances, and it would be great to be able to count collectors by version with a single query.

@github-actions github-actions bot removed the Stale label Mar 23, 2024
@codeboten
Copy link
Contributor

This is currently exposed in the target_info metric and additionally applied to each metric as attribute

otelcol_processor_batch_metadata_cardinality{processor="batch",service_instance_id="5ba8d547-4742-4bf1-9c49-fa18b7ec142b",service_name="otelcorecol",service_version="0.105.0-dev"} 2

target_info{service_instance_id="5ba8d547-4742-4bf1-9c49-fa18b7ec142b",service_name="otelcorecol",service_version="0.105.0-dev"} 1

I believe this can be closed. Please re-open if that's not the case

@codeboten codeboten added this to the Self observability milestone Jul 16, 2024
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

7 participants