Registry / observability / otel-trace

otel-trace

JSON →
library1.43.0gogounverified

Package trace provides an implementation of the tracing part of the OpenTelemetry API for creating and managing spans in distributed traces.

go get go.opentelemetry.io/otel/trace
INSTALL
IMPORT
SIG · OTEL-TRACE
O
otel-trace
observabilitygov1.43.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

trace
go.opentelemetry.io/otel/trace

Creates a tracer and starts a span using the OpenTelemetry trace API.

package main import ( "context" "go.opentelemetry.io/otel/trace" ) func main() { tracer := trace.NewNoopTracerProvider().Tracer("example") _, span := tracer.Start(context.Background(), "operation") defer span.End() }
Debug
Known issues
breakingNon-standard API evolution: interfaces may have methods added without major version bump, potentially causing runtime panics for implementations that don't embed the embedded interface.
fix
Embed the corresponding interface from go.opentelemetry.io/otel/trace/embedded in your implementation to get a compilation failure on API changes, or embed go.opentelemetry.io/otel/trace/noop for safe default behavior.
affects: >=1.0.0
Upgrade
Version history
1.43.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
2
Resources
otel-trace — go get otel-trace · libregistry