Skip to content

Conflicting information on Resource / Instrumentation Library #614

@mwear

Description

@mwear

Conflicting information on Resource / Instrumentation Library

The SDK Resource Spec states:

When used with distributed tracing, a resource can be associated with the TracerProvider when it is created. That association cannot be changed later. When associated with a TracerProvider, all Spans produced by any Tracer from the provider MUST be associated with this Resource.

My interpretation is that the Resource assigned to the TracerProvider, will remain static for the lifetime of the application. Tracers returned by the provider will also reference this Resource as will Spans created by the Tracers.

My confusion comes from the SDK Trace spec which states:

New Tracer instances are always created through a TracerProvider (see API). The name and version arguments supplied to the TracerProvider must be used to create a Resource instance which is stored on the created Tracer.

OTEP-83 added the Instrumentation Library concept, and I thought that the name and version described above belong to the Instrumentation Library, not as another Resource.

Should the SDK trace spec be updated to say:

New Tracer instances are always created through a TracerProvider (see API). The name and version arguments supplied to the TracerProvider must be used to create an InstrumentationLibrary instance which is stored on the created Tracer.

or do we need to represent this information both as a Resource and an Instrumentation Resource?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions