-
Notifications
You must be signed in to change notification settings - Fork 734
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
Detect service.version
from Assembly Version?
#5703
Comments
Here are my thoughts...
|
@CodeBlanch, I would vote for your extended proposal, but in the contrib repository. I do not think that it is defined in spec/semantic convention to put it as a part of SDK. If we speaking about detection, from particular assemblies, we are doing something similar for scope version. Keep in mind that part of the versioning system extends versions by suffixes (eg. GH commits). Ref: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/9114d0b183def59bc0cd747bdee024aae7d35fbc/src/Shared/AssemblyVersionExtensions.cs |
Package
OpenTelemetry
Is your feature request related to a problem?
I implemented this already in some of my own projects, was mostly interested in knowing if the project would accept it as a contribution if I cleaned it up and made a PR.
I usually use the
AssemblyVersion
as myservice.version
value in OTEL since the former is always synced with our Docker image tags in our build process. Therefore, I wrote anIResourceDetector
that will just grab this data and use it throughout all of our OTEL-enabled projects:Totally fine renaming it / cleaning it up to use resource dictionaries et al. But would it make sense to have this available as a built-in
IResourceDetector
in the core library? Even though it technically usesSystem.Reflection
I think it should still be pass AOT-compatibility checks since it's not doing any dynamic-linking.What is the expected behavior?
Populates the
service.version
with the appropriate value derived from the executing assembly's information.You can see an example of what this looks like using Seq's OTEL log aggregation w/ data from one of our applications (0.2.4.0 is the correct value).
Which alternative solutions or features have you considered?
Just using my own middleware to do this
Additional context
No response
The text was updated successfully, but these errors were encountered: