1.0.0-RC1 / 0.21.0 - 2021-06-18
With this release we are introducing a split in module versions. The tracing API and SDK are entering the v1.0.0
Release Candidate phase with v1.0.0-RC1
while the experimental metrics API and SDK continue with v0.x
releases at v0.21.0
. Modules at major version 1 or greater will not depend on modules with major version 0.
Added
- Adds
otlpgrpc.WithRetry
option for configuring the retry policy for transient errors on the otlp/gRPC exporter. (#1832)- The following status codes are defined as transient errors:
gRPC Status Code Description 1 Cancelled 4 Deadline Exceeded 8 Resource Exhausted 10 Aborted 10 Out of Range 14 Unavailable 15 Data Loss
- The following status codes are defined as transient errors:
- Added
Status
type to thego.opentelemetry.io/otel/sdk/trace
package to represent the status of a span. (#1874) - Added
SpanStub
type and its associated functions to thego.opentelemetry.io/otel/sdk/trace/tracetest
package.
This type can be used as a testing replacement for theSpanSnapshot
that was removed from thego.opentelemetry.io/otel/sdk/trace
package. (#1873) - Adds support for scheme in
OTEL_EXPORTER_OTLP_ENDPOINT
according to the spec. (#1886) - Adds
trace.WithSchemaURL
option for configuring the tracer with a Schema URL. (#1889) - Added an example of using OpenTelemetry Go as a trace context forwarder. (#1912)
ParseTraceState
is added to thego.opentelemetry.io/otel/trace
package.
It can be used to decode aTraceState
from atracestate
header string value. (#1937)- Added
Len
method to theTraceState
type in thego.opentelemetry.io/otel/trace
package.
This method returns the number of list-members theTraceState
holds. (#1937) - Creates package
go.opentelemetry.io/otel/exporters/otlp/otlptrace
that defines a trace exporter that uses aotlptrace.Client
to send data.
Creates packagego.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
implementing a gRPCotlptrace.Client
and offers convenience functions,NewExportPipeline
andInstallNewPipeline
, to setup and install aotlptrace.Exporter
in tracing .(#1922) - Added
Baggage
,Member
, andProperty
types to thego.opentelemetry.io/otel/baggage
package along with their related functions. (#1967) - Added
ContextWithBaggage
,ContextWithoutBaggage
, andFromContext
functions to thego.opentelemetry.io/otel/baggage
package.
These functions replace theSet
,Value
,ContextWithValue
,ContextWithoutValue
, andContextWithEmpty
functions from that package and directly work with the newBaggage
type. (#1967) - The
OTEL_SERVICE_NAME
environment variable is the preferred source forservice.name
, used by the environment resource detector if a service name is present both there and inOTEL_RESOURCE_ATTRIBUTES
. (#1969) - Creates package
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
implementing an HTTPotlptrace.Client
and offers convenience functions,NewExportPipeline
andInstallNewPipeline
, to setup and install aotlptrace.Exporter
in tracing. (#1963) - Changes
go.opentelemetry.io/otel/sdk/resource.NewWithAttributes
to require a schema URL. The old function is still available asresource.NewSchemaless
. This is a breaking change. (#1938) - Several builtin resource detectors now correctly populate the schema URL. (#1938)
- Creates package
go.opentelemetry.io/otel/exporters/otlp/otlpmetric
that defines a metrics exporter that uses aotlpmetric.Client
to send data. - Creates package
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
implementing a gRPCotlpmetric.Client
and offers convenience functions,New
andNewUnstarted
, to create anotlpmetric.Exporter
.(#1991) - Added
go.opentelemetry.io/otel/exporters/stdout/stdouttrace
exporter. (#2005) - Added
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric
exporter. (#2005) - Added a
TracerProvider()
method to the"go.opentelemetry.io/otel/trace".Span
interface. This can be used to obtain aTracerProvider
from a given span that utilizes the same trace processing pipeline. (#2009)
Changed
- Make
NewSplitDriver
fromgo.opentelemetry.io/otel/exporters/otlp
take variadic arguments instead of aSplitConfig
item.
NewSplitDriver
now automatically implements an internalnoopDriver
forSplitConfig
fields that are not initialized. (#1798) resource.New()
now creates a Resource without builtin detectors. Previous behavior is now achieved by usingWithBuiltinDetectors
Option. (#1810)- Move the
Event
type from thego.opentelemetry.io/otel
package to thego.opentelemetry.io/otel/sdk/trace
package. (#1846) - CI builds validate against last two versions of Go, dropping 1.14 and adding 1.16. (#1865)
- BatchSpanProcessor now report export failures when calling
ForceFlush()
method. (#1860) Set.Encoded(Encoder)
no longer caches the result of an encoding. (#1855)- Renamed
CloudZoneKey
toCloudAvailabilityZoneKey
in Resource semantic conventions according to spec. (#1871) - The
StatusCode
andStatusMessage
methods of theReadOnlySpan
interface and theSpan
produced by thego.opentelemetry.io/otel/sdk/trace
package have been replaced with a singleStatus
method.
This method returns the status of a span using the newStatus
type. (#1874) - Updated
ExportSpans
method of theSpanExporter
interface type to acceptReadOnlySpan
s instead of the removedSpanSnapshot
.
This brings the export interface into compliance with the specification in that it now accepts an explicitly immutable type instead of just an implied one. (#1873) - Unembed
SpanContext
inLink
. (#1877) - Generate Semantic conventions from the specification YAML. (#1891)
- Spans created by the global
Tracer
obtained fromgo.opentelemetry.io/otel
, prior to a functioningTracerProvider
being set, now propagate the span context from their parent if one exists. (#1901) - The
"go.opentelemetry.io/otel".Tracer
function now accepts tracer options. (#1902) - Move the
go.opentelemetry.io/otel/unit
package togo.opentelemetry.io/otel/metric/unit
. (#1903) - Changed
go.opentelemetry.io/otel/trace.TracerConfig
to conform to the Contributing guidelines (#1921) - Changed
go.opentelemetry.io/otel/trace.SpanConfig
to conform to the Contributing guidelines. (#1921) - Changed
span.End()
now only accepts Options that are allowed atEnd()
. (#1921) - Changed
go.opentelemetry.io/otel/metric.InstrumentConfig
to conform to the Contributing guidelines. (#1921) - Changed
go.opentelemetry.io/otel/metric.MeterConfig
to conform to the Contributing guidelines. (#1921) - Refactored option types according to the contribution style guide. (#1882)
- Move the
go.opentelemetry.io/otel/trace.TraceStateFromKeyValues
function to thego.opentelemetry.io/otel/oteltest
package.
This function is preserved for testing purposes where it may be useful to create aTraceState
fromattribute.KeyValue
s, but it is not intended for production use.
The newParseTraceState
function should be used to create aTraceState
. (#1931) - Updated
MarshalJSON
method of thego.opentelemetry.io/otel/trace.TraceState
type to marshal the type into the string representation of theTraceState
. (#1931) - The
TraceState.Delete
method from thego.opentelemetry.io/otel/trace
package no longer returns an error in addition to aTraceState
. (#1931) - Updated
Get
method of theTraceState
type from thego.opentelemetry.io/otel/trace
package to accept astring
instead of anattribute.Key
type. (#1931) - Updated
Insert
method of theTraceState
type from thego.opentelemetry.io/otel/trace
package to accept a pair ofstring
s instead of anattribute.KeyValue
type. (#1931) - Updated
Delete
method of theTraceState
type from thego.opentelemetry.io/otel/trace
package to accept astring
instead of anattribute.Key
type. (#1931) - Renamed
NewExporter
toNew
in thego.opentelemetry.io/otel/exporters/stdout
package. (#1985) - Renamed
NewExporter
toNew
in thego.opentelemetry.io/otel/exporters/metric/prometheus
package. (#1985) - Renamed
NewExporter
toNew
in thego.opentelemetry.io/otel/exporters/trace/jaeger
package. (#1985) - Renamed
NewExporter
toNew
in thego.opentelemetry.io/otel/exporters/trace/zipkin
package. (#1985) - Renamed
NewExporter
toNew
in thego.opentelemetry.io/otel/exporters/otlp
package. (#1985) - Renamed
NewUnstartedExporter
toNewUnstarted
in thego.opentelemetry.io/otel/exporters/otlp
package. (#1985) - The
go.opentelemetry.io/otel/semconv
package has been moved togo.opentelemetry.io/otel/semconv/v1.4.0
to allow for multiple telemetry schema versions to be used concurrently. (#1987) - Metrics test helpers in
go.opentelemetry.io/otel/oteltest
have been moved togo.opentelemetry.io/otel/metric/metrictest
. (#1988)
Deprecated
- The
go.opentelemetry.io/otel/exporters/metric/prometheus
is deprecated, usego.opentelemetry.io/otel/exporters/prometheus
instead. (#1993) - The
go.opentelemetry.io/otel/exporters/trace/jaeger
is deprecated, usego.opentelemetry.io/otel/exporters/jaeger
instead. (#1993) - The
go.opentelemetry.io/otel/exporters/trace/zipkin
is deprecated, usego.opentelemetry.io/otel/exporters/zipkin
instead. (#1993)
Removed
- Removed
resource.WithoutBuiltin()
. Useresource.New()
. (#1810) - Unexported types
resource.FromEnv
,resource.Host
, andresource.TelemetrySDK
, Use the correspondingWith*()
to use individually. (#1810) - Removed the
Tracer
andIsRecording
method from theReadOnlySpan
in thego.opentelemetry.io/otel/sdk/trace
.
TheTracer
method is not a required to be included in this interface and given the mutable nature of the tracer that is associated with a span, this method is not appropriate.
TheIsRecording
method returns if the span is recording or not.
A read-only span value does not need to know if updates to it will be recorded or not.
By definition, it cannot be updated so there is no point in communicating if an update is recorded. (#1873) - Removed the
SpanSnapshot
type from thego.opentelemetry.io/otel/sdk/trace
package.
The use of this type has been replaced with the use of the explicitly immutableReadOnlySpan
type.
When a concrete representation of a read-only span is needed for testing, the newly addedSpanStub
in thego.opentelemetry.io/otel/sdk/trace/tracetest
package should be used. (#1873) - Removed the
Tracer
method from theSpan
interface in thego.opentelemetry.io/otel/trace
package.
Using the same tracer that created a span introduces the error where an instrumentation library'sTracer
is used by other code instead of their own.
The"go.opentelemetry.io/otel".Tracer
function or aTracerProvider
should be used to acquire a library specificTracer
instead. (#1900)- The
TracerProvider()
method on theSpan
interface may also be used to obtain aTracerProvider
using the same trace processing pipeline. (#2009)
- The
- The
http.url
attribute generated byHTTPClientAttributesFromHTTPRequest
will no longer include username or password information. (#1919) - Removed
IsEmpty
method of theTraceState
type in thego.opentelemetry.io/otel/trace
package in favor of using the addedTraceState.Len
method. (#1931) - Removed
Set
,Value
,ContextWithValue
,ContextWithoutValue
, andContextWithEmpty
functions in thego.opentelemetry.io/otel/baggage
package.
Handling of baggage is now done using the addedBaggage
type and related context functions (ContextWithBaggage
,ContextWithoutBaggage
, andFromContext
) in that package. (#1967) - The
InstallNewPipeline
andNewExportPipeline
creation functions in all the exporters (prometheus, otlp, stdout, jaeger, and zipkin) have been removed.
These functions were deemed premature attempts to provide convenience that did not achieve this aim. (#1985) - The
go.opentelemetry.io/otel/exporters/otlp
exporter has been removed. Usego.opentelemetry.io/otel/exporters/otlp/otlptrace
instead. (#1990) - The
go.opentelemetry.io/otel/exporters/stdout
exporter has been removed. Usego.opentelemetry.io/otel/exporters/stdout/stdouttrace
orgo.opentelemetry.io/otel/exporters/stdout/stdoutmetric
instead. (#2005)
Fixed
- Only report errors from the
"go.opentelemetry.io/otel/sdk/resource".Environment
function when they are notnil
. (#1850, #1851) - The
Shutdown
method of the simpleSpanProcessor
in thego.opentelemetry.io/otel/sdk/trace
package now honors the context deadline or cancellation. (#1616, #1856) - BatchSpanProcessor now drops span batches that failed to be exported. (#1860)
- Use
http://localhost:14268/api/traces
as default Jaeger collector endpoint instead ofhttp://localhost:14250
. (#1898) - Allow trailing and leading whitespace in the parsing of a
tracestate
header. (#1931) - Add logic to determine if the channel is closed to fix Jaeger exporter test panic with close closed channel. (#1870, #1973)
- Avoid transport security when OTLP endpoint is a Unix socket. (#2001)