All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
otel_tracestate
module for creating and updating tracestate - Attributes module
otel_attributes
moved to API - Moved attribute processing functions to
otel_attributes
fromotel_span
- Correctly record histogram values greater than last boundary
- Readers should use a default cumulative temporality if not specified
- Resource is now an argument to TracerProvider start, but still set automatically by SDK startup of the global Provider
- Global Tracer no longer set to no-op on SDK shutdown
- Remove use of
deprecated
module attribute to support OTP-22
- Have set_status check is_recording in all cases
- Using opentelemetry_semantic_conventions for record_exception
- Erlang Metrics API
- Metrics SDK
- Logging handler and exporter
- Delta support for explicit histogram
- Logging Handler
- OTLP Metrics exporting
- Gradualizer cleanup of type specs
- Gradualizer cleanup
- Fix dependency on API to require
~> 1.1
- Fix dependency on API and SDK to require
~> 1.1
- Support
opentelemetry_sdk ~> 1.1
exporter API
- Span context now set in logger metadata when context is updated in process dictionary
- Instrumentation Scope replaces Instrumentation
Library --
If you were using the record directly, please use the function
opentelemetry:instrumentation_scope/3
oropentelemetry:instrumentation_library/3
to create aninstrumentation_scope
record.
- Instrumentation Scope replaces Instrumentation
Library --
If you were using the record directly, please use the function
opentelemetry:instrumentation_scope/3
oropentelemetry:instrumentation_library/3
to create aninstrumentation_scope
record.
- Allow custom text propagator to be configured via application env
- No longer grow export table in batch processor if no export table is configured
- Instrumentation Scope replaces Instrumentation
Library --
If you were using the record directly, please use the function
opentelemetry:instrumentation_scope/3
oropentelemetry:instrumentation_library/3
to create aninstrumentation_scope
record.
- Doc fixes and improvements to
tracer.ex
andotel_propagator_text_map.erl
- Fix use of
otlp_endpoint
configuration from Elixir - Remove the SDK application
opentelemetry
from the Exporter's runtime dependencies
- Span Status: Ignore status changes that don't follow the define precedence in the spec
- Attribute values that are lists are converted to strings in Zipkin tags
- Status converted to Zipkin tags
- W3C Tracestate: Keep last value for duplicate key
- add report_cb to format log messages in composite propagator to have more detailed logs
- Fix use of wrong timestamp format on events
- SDK will continue to try initializing exporter if it fails to resolve startup ordering issues
- elixir span docs: fix reference to attributes type
-
New
opentelemetry_exporter
application environment options:otlp_protocol
: The transport protocol, supported values:grpc
andhttp_protobuf
. Defaults tohttp_protobuf
.otlp_traces_protocol
: The transport protocol to use for exporting traces, supported values:grpc
andhttp_protobuf
. Defaults tohttp_protobuf
.otlp_compression
: Compression type to use, supported values:gzip
. Defaults to no compression.otlp_traces_compression
: Compression type to use for exporting traces, supported values:gzip
. Defaults to no compression.
-
New environment variable options:
OTEL_EXPORTER_OTLP_PROTOCOL
: The transport protocol to use, supported values:grpc
andhttp_protobuf
. Defaults tohttp_protobuf
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
: The transport protocol to use for exporting traces, supported values:grpc
andhttp_protobuf
. Defaults tohttp_protobuf
.OTEL_EXPORTER_OTLP_COMPRESSION
: Compression to use, supported value: gzip. Defaults to no compression.OTEL_EXPORTER_OTLP_TRACES_COMPRESSION
: Compression to use when exporting traces, supported value: gzip. Defaults to no compression.
add_event
function and macros fixed to accept both a map of attributes or a list.
-
Looking up a Tracer for a module is now done by first looking up the OTP Application name and then the Tracer using that name. This means all Tracers share the same "namespace" again which saves space by not duplicating the Tracer record for every module.
-
Configurable limits for the number of Attributes, Events and Links allowed in a Span, an Event or a Link -- defaults to 128. The length of each Attribute's value can also be limited but has a default of infinity.
Environment variables added to configure the limits:
OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT
: Limit on number of Attributes on a Span.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT
: Limit length of Attribute values.OTEL_SPAN_EVENT_COUNT_LIMIT
: Limit number of Events on a Span.OTEL_SPAN_LINK_COUNT_LIMIT
: Limit number of Links on a Span.OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT
: Limit on number of Attributes on an Event.OTEL_LINK_ATTRIBUTE_COUNT_LIMIT
: Limit on number of Attributes on a Link.
-
Support for a Schema URL in a Resource and in the Instrumentation Library information of a Tracer. For more information about Schema URLs see the specification for Resources and getting a Tracer.
-
OTEL_CREATE_APPLICATION_TRACERS
is a new environment variable,create_application_tracers
is the application environment key, for disabling the automatic creation of Tracers for every Application at boot. The old keys,OTEL_REGISTER_LOADED_APPLICATIONS
andregister_loaded_applications
, will continue to work as well.
- Attribute values now validate against what is allowable per the specification rather than allowing anything the protobuf could encode. This may be breaking to some users who were relying on the incorrect behavior, such as allowing dictionaries or non-homogenous lists/tuples. The one exception we have kept is continuing to allow atoms in place of binaries for performance.
- Attribute values of type list/tuple must be homogenous.
- Span start opts are now validated. Previously, opts underwent no validations.
- Event and link attributes are now validated. Previously only span attributes were validated.
- Events accept atoms for the name again.
- The
sampler
option tostart_span
andwith_span
was removed. register_tracer
has been removed and nowget_tracer
will cache the Tracer after creation if needed.
otel_propagator_trace_context:extract/1
no longer crashes onundefined
header values
- Properly published the package with Erlang and Elixir source. Package for 1.0.0-rc.3 was retired on Hex.pm
-
Removed
opentelemetry:register_application_tracer
. Each application has a Tracer registered for it automatically on boot. This can be disabled by settingopentelemetry
environment variableregister_loaded_applications
tofalse
. -
Named Tracers registered with
opentelemetry:register_tracer
are now stored separately from the mapping of Named Tracers created for each application. Meaning if you have a modulemod_a
in applicationapp_a
with application vsn0.1.0
and also manually register a Tracer namedmod_a
with version1.1.1
then use of macros like?with_span
will use theapp_a
version0.1.0
Named Tracer and manual use of a Named Tracer like:Tracer = opentelemetry:get_tracer(mod_a), otel_tracer:with_span(Tracer, span_name, #{}, fun() -> ... end),
will use Named Tracer
mod_a
with version1.1.1
. In previous versions after registering a Tracer namedmod_a
it would override themod_a
pointing to theapp_a
Tracer.Additionally, manual registration of a Named Tracer with the name
app_a
will not override the application registered Tracer ofapp_a
.
- B3 single header format support added
- Propagators must now be implementations of a propagator type's behaviour. At
this time only the
otel_propagator_text_map
behaviour exists. Callbacks for inject and extract take an optional "set" and "get" function for working with a carrier. - Configuration of propagators is now a list of atoms representing either the
name of a builtin propagator (at this time those are,
trace_context
,b3
,b3multi
andbaggage
) or the name of a module implementing the propagator's behaviour.- Default configuration:
{text_map_propagators, [trace_context, baggage]}
- Default configuration:
- Injectors and extractors can be configured separately instead of using the
same list of propagators for both by configuring
text_map_injectors
andtext_map_extractors
.-
For example you may want your service to support receiving
b3multi
headers but have no need for it includingb3multi
headers when it is propagating to other services:{text_map_injectors, [trace_context, baggage]}, {text_map_extractors, [b3multi, trace_context, baggage]}
-
b3
propagator renamedb3multi
to properly convey it is the version of the B3 spec that creates multiple headers
- Memory leak fix: Non-recording Spans are no longer inserted into the ETS table tracking active span.
- Ratio based root span sampling fixed, before it didn't take into account the generated trace id.