Giter Site home page Giter Site logo

Comments (3)

dashpole avatar dashpole commented on August 24, 2024

I was reading through the spec for resource, and it seems like our SDKs aren't compliant with the resource spec (which isn't part of the SDK specification).

The SDK MUST extract information from the OTEL_RESOURCE_ATTRIBUTES environment
variable and merge this, as the secondary resource, with any resource
information provided by the user, i.e. the user provided resource information
has higher priority.

The spec for the default service name has similar language (also not in the SDK spec): https://github.com/open-telemetry/semantic-conventions/blob/61870711f9e7c13c3a058215a15e50877dd92d77/docs/attributes-registry/service.md?plain=1#L47

[service.name] MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to unknown_service: concatenated with process.executable.name, e.g. unknown_service:bash. If process.executable.name is not available, the value MUST be set to unknown_service.

Same for the telemetry detector (also not in the SDK specification): https://github.com/open-telemetry/semantic-conventions/blob/61870711f9e7c13c3a058215a15e50877dd92d77/docs/attributes-registry/telemetry.md

The OpenTelemetry SDK MUST set the telemetry.sdk.name attribute to opentelemetry. If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the telemetry.sdk.name attribute to the fully-qualified class or module name of this SDK's main entry point or another suitable identifier depending on the language. The identifier opentelemetry is reserved and MUST NOT be used in this case. All custom identifiers SHOULD be stable across different versions of an implementation.

The above seems to imply SDKs MUST include our Default resource, and merge it with the user-provided resource. It seems like the correct resolution here is to not add an additional option, but instead to perform that merge within the SDK initialization. Thoughts?

from opentelemetry-go.

MrAlias avatar MrAlias commented on August 24, 2024

The SDK provides the Default function to comply with this requirement.

There are a few ways create a resource. I'm not sure we want to impose that a default resource be included in all of them by default. It seems like it would impose potentially unnecessary composition on all use-cases.

from opentelemetry-go.

MrAlias avatar MrAlias commented on August 24, 2024

We want to look at other language implementation to determine if we are following what they do for our defaults.

Holding until that work is done.

from opentelemetry-go.

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.