Skip to content

Implement InstrumentationLibrary Instance in SDK #567

@lalitb

Description

@lalitb

As per specs for Tracer Creation :

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.

Currently for cpp, we do pass instrumentation library name and version in tracer sdk, but it is never used internally to create InstrumentationLibrary instance, and further passing it to otel (and other) exporters:

opentelemetry::nostd::shared_ptr<opentelemetry::trace::Tracer> GetTracer(
nostd::string_view library_name,
nostd::string_view library_version = "") noexcept override;

As per the otel protocol:
https://github.com/open-telemetry/opentelemetry-proto/blob/e73df7c9f3c474c992990e82aa09ee46c39d6aab/opentelemetry/proto/common/v1/common.proto#L72-L78:

// InstrumentationLibrary is a message representing the instrumentation library information
// such as the fully qualified name and version. 
message InstrumentationLibrary {
  // An empty instrumentation library name means the name is unknown. 
  string name = 1;
  string version = 2;
}

`

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions