-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
spanmetrics cannot work with numerical default value in dimensions since version v0.109.0 #36786
Comments
Hi @timbeemster! If you enclose the environment variable for the version in quotes, it should be parsed properly:
|
Hi @bacherfl , Patch on the shared public repo to reproduce the problem:
rebuild docker image + run: output:
|
ok now i can also reproduce this - I was trying to add the value directly into the config map earlier, but when using an env var this issue starts to appear. I will check if there have been some changes to that recently |
It seems like in v0.109.0 a feature flag that controls whether the mapstructure library used for decoding should use the option |
Hi @bacherfl, thanks for your investigation. I don't see other positives comments on the issue with a working solution/workaround |
Would it be a possible solution to add a prefix to the commit hash? i.e. something like
This is the only workaround I can think of at the moment |
also, can you open an issue for the |
Hi @bacherfl, I've opened up a bug report in the Core project. Thanks for helping out thus far! |
Thanks for creating the issue @timbeemster! One more idea regarding prepending a prefix to the version env var until the issue is fixed in core: You could, as a workaround, also use the
|
Closing this one as the issue for the confmap component has been created in core: open-telemetry/opentelemetry-collector#11879 |
Component(s)
No response
What happened?
Description
In our setup we use the VERSION environment variable to set a dimension on metrics, so we can query our metrics based on the version of the application.
The version is sourced in the environment variables and consists of a combination of numbers and letters.
It has come to our attention that in a newer version (v109) the spanmetrics connector does not allow a default of only digits to be set.
Similarly, if there are only digits and the letter
e
, it will try to decode the value as a float.Perhaps something in the decoding of the yaml config changed?
Steps to Reproduce
I've created a minimal setup in a public repo: https://github.com/timbeemster/otelcol-custom/blob/main/README
Build the docker image and run the setup.
Expected Result
A running otel collector
Actual Result
Error message on startup (see log output section)
Let me know if I can assist in debugging the problem.
Collector version
v0.109.0
Environment information
Environment
OS: Golang base image for building + Debian12 (distroless variant for running)
Compiler(if manually compiled): golang:1.23.2
(see: https://github.com/timbeemster/otelcol-custom/blob/main/Dockerfile )
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: