Git Product home page Git Product logo

Comments (2)

CodeBlanch avatar CodeBlanch commented on June 30, 2024

@Aaronontheweb

Here are my thoughts...

  • You could definitely add this as-is over in https://github.com/open-telemetry/opentelemetry-dotnet-contrib. If you want to just do that and stop reading, fine by me.

  • I think this is useful enough it could be part of the main SDK. I don't speak for all approvers/maintainers, but I would be supportive of something like...

     public static ResourceBuilder AddServiceVersionDetector(
        this ResourceBuilder resourceBuilder,
        Assembly targetAssembly,
        ServiceResourceVersionDetectionType detectionType)
     {
        // ...
     }
    
    public enum ServiceResourceVersionDetectionType
    {
       AssemblyVersion,
       AssemblyFileVersion,
       AssemblyInformationVersion
    }

    I added the ability to look at AssemblyFileVersionAttribute & AssemblyInformationalVersionAttribute as well via the enum. For a project like OTel, AssemblyVersion is always 1.0.0.0 and AssemblyFileVersion \ AssemblyInformationalVersion are the more useful things. This actually follows the guidance, but I know a lot of users don't. Basically I think we should be able to look different spots and perhaps add more in the future?

from opentelemetry-dotnet.

Kielek avatar Kielek commented on June 30, 2024

@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

from opentelemetry-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.