Releases: open-telemetry/opentelemetry-dotnet
core-1.7.0-alpha.1
OpenTelemetry
-
Update
AggregatorStore
to reclaim unused MetricPoints for Delta aggregation temporality. (#4486) -
Fixed a bug where
TracerProviderBuilderBase
was not invoking theinstrumentationFactory
delegate passed to theprotected
AddInstrumentation
method. (#4873) -
Allowed metric instrument names to contain
/
characters. (#4882) -
Breaking Change
[Tracer|Meter|Logger]ProviderBuilder.Build
extension will now throw aNotSupportedException
if invoked on a non-SDK builder type. Previously it would returnnull
. (#4885) -
Updated
Microsoft.Extensions.Logging
package version to8.0.0-rc.1.23419.4
. (#4920, #4933)
OpenTelemetry.Api
-
Fixed a bug which caused
Tracer.StartRootSpan
to generate a child span if a trace was running (Activity.Current != null
). (#4890) -
Added a
Tracer
cache inside ofTracerProvider
to prevent repeated calls toGetTracer
from leaking memory. (#4906) -
Fix
TraceContextPropagator
by validating the first digit of the hex-encodedtrace-flags
field of thetraceparent
header. (#4893)
OpenTelemetry.Exporter.OpenTelemetryProtocol
-
Bumped the version of
Google.Protobuf
used by the project to3.22.5
so that consuming applications can be published as NativeAOT successfully. Also, a new performance feature can be used instead of reflection emit, which is not AOT-compatible. Removed the dependency onSystem.Reflection.Emit.Lightweight
. (#4859) -
Added support for
OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT
andOTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT
. (#4887) -
Added ability to export attributes corresponding to
LogRecord.Exception
i.e.exception.type
,exception.message
andexception.stacktrace
. These attributes will be exported whenOTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES
environment variable will be set totrue
.NOTE: These attributes were removed in 1.6.0-rc.1 release in order to support stable release of OTLP Log Exporter. The attributes will now be available via environment variable mentioned above. (#4892)
-
Added ability to export attributes corresponding to
LogRecord.EventId.Id
aslogrecord.event.id
andLogRecord.EventId.Name
aslogrecord.event.name
. The attributes will be exported whenOTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES
will be set totrue
.NOTE: These attributes were removed in 1.6.0-rc.1 release in order to support stable release of OTLP Log Exporter. The attributes will now be available via environment variable mentioned above. (#4925)
-
LogRecord.CategoryName
will now be exported as InstrumentationScopename
field under ScopeLogs. (#4941)
OpenTelemetry.Exporter.Prometheus.AspNetCore
- Fixed writing boolean values to use the JSON representation (#4823)
OpenTelemetry.Exporter.Prometheus.HttpListener
- Fixed writing boolean values to use the JSON representation (#4823)
OpenTelemetry.Extensions.Hosting
- Changed the behavior of the
OpenTelemetryBuilder.AddOpenTelemetry
extension to INSERT OpenTelemetry services at the beginning of theIServiceCollection
in an attempt to provide a better experience for end users capturing telemetry in hosted services. Note that this does not guarantee that OpenTelemetry services will be initialized while other hosted services start, so it is possible to miss telemetry until OpenTelemetry services are fully initialized. (#4883)
1.6.0 / 1.6.0-beta.1
1.6.0 release for core components
Note: The below only shows the changes that were added to the core components post 1.6.0-rc.1
release. If you're interested in knowing all of the changes that went into 1.6.0
release, please go through the Release notes of all the previous pre-release versions for 1.6.0
.
OpenTelemetry
-
Increased the character limit of the Meter instrument name from 63 to 255.
(#4774) -
Update default size for
SimpleExemplarReservoir
to1
.
(#4803)
1.6.0-beta.1 release for non-core components
Note: Instrumentation libraries were not included for 1.6.0-beta.1
.
OpenTelemetry.Shims.OpenTracing
core-1.6.0-rc.1
OpenTelemetry
- Experimental Feature Added an opt-in feature to aggregate any metric
measurements that were dropped due to reaching the max MetricPoints
limit.
When this feature is enabled, SDK would aggregate such measurements using a
reserved MetricPoint with a single tag with key asotel.metric.overflow
and
value astrue
. The feature is turned-off by default. You can enable it by
setting the environment variable
OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE
totrue
before
setting up theMeterProvider
.
(#4737)
OpenTelemetry.Exporter.OpenTelemetryProtocol
-
Excluded attributes corresponding to
LogRecord.EventId
,
LogRecord.CategoryName
andLogRecord.Exception
from the exported data. This
is done as the semantic conventions for these attributes are not yet stable.
(#4781) -
Added extension method for configuring export processor options for otlp log
exporter.
(#4733) -
Added support for configuring the metric exporter's temporality using the
environment variableOTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
as
defined in the
specification.
(#4667)
OpenTelemetry.Exporter.Prometheus.AspNetCore
- Added support for unit and name conversion following the OpenTelemetry Specification
(#4753)
OpenTelemetry.Exporter.Prometheus.HttpListener
- Added support for unit and name conversion following the OpenTelemetry Specification
(#4753)
OpenTelemetry.Extensions.Hosting
- Experimental (pre-release builds only): Added Logs Bridge
API
implementation (OpenTelemetryBuilder.WithLogging
).
(#4735)
1.5.1-beta.1 of instrumentation libraries
For all the four instrumentation libraries: AspNetCore, HttpClient, GrpcNetClient, SqlClient:
- The new HTTP and network semantic conventions can be opted in to by setting
theOTEL_SEMCONV_STABILITY_OPT_IN
environment variable. This allows for a
transition period for users to experiment with the new semantic conventions
and adapt as necessary. The environment variable supports the following
values:http
- emit the new, frozen (proposed for stable) HTTP and networking
attributes, and stop emitting the old experimental HTTP and networking
attributes that the instrumentation emitted previously.http/dup
- emit both the old and the frozen (proposed for stable) HTTP
and networking attributes, allowing for a more seamless transition.- The default behavior (in the absence of one of these values) is to continue
emitting the same HTTP and network semantic conventions that were emitted in
1.5.0-beta.1
. - Note: this option will eventually be removed after the new HTTP and
network semantic conventions are marked stable. At which time this
instrumentation can receive a stable release, and the old HTTP and
network semantic conventions will no longer be supported. Refer to the
specification for more information regarding the new HTTP and network
semantic conventions for both spans and metrics.
OpenTelemetry.Instrumentation.AspNetCore
- Fixed an issue affecting NET 7.0+. If custom propagation is being used
and tags are added to an Activity during sampling then that Activity would be dropped.
(#4637)
1.6.0-alpha.1
OpenTelemetry
-
Add back support for Exemplars. See
exemplars for
instructions to enable exemplars.
(#4553) -
Added Logs Bridge
API
implementation (Sdk.CreateLoggerProviderBuilder
, etc.).
(#4433) -
Obsoleted
LogRecord.LogLevel
in favor of theLogRecord.Severity
property
which matches the OpenTelemetry Specification > Logs DataModel > Severity
definition.
(#4433) -
Added
LogRecord.Logger
property to access the OpenTelemetry Specification >
Instrumentation
Scope
provided during Logger creation.
(#4433) -
Fix the issue of potentially running into the
ArgumentException
:An instance of EventSource with Guid af2d5796-946b-50cb-5f76-166a609afcbb already exists.
when using any of the following exporters:ConsoleExporter
,
OtlpExporter
,ZipkinExporter
,JaegerExporter
.
OpenTelemetry.Api
-
Updated
System.Diagnostics.DiagnosticSource
package version to7.0.2
.
(#4576) -
Breaking change In order to make
RuntimeContext
compatible with
ahead-of-time compilation (AOT),RuntimeContext.ContextSlotType
can only be
assigned one of the following types:AsyncLocalRuntimeContextSlot<>
,
ThreadLocalRuntimeContextSlot<>
, andRemotingRuntimeContextSlot<>
. A
System.NotSupportedException
will be thrown if you try to assign any type
other than the three types mentioned.
(#4542) -
Added Logs Bridge
API
implementation (LoggerProviderBuilder
,LoggerProvider
,Logger
, etc.).
(#4433)
OpenTelemetry.Api.ProviderBuilderExtensions
- Added extension methods to support using the Logs Bridge
API
implementation (egLoggerProviderBuilder
) with dependency injection.
(#4433)
OpenTelemetry.Exporter.Console
-
Add back support for Exemplars. See
exemplars for
instructions to enable exemplars.
(#4553) -
Updated to display
Severity
andSeverityText
text instead of
ILogger.LogLevel
when exportingLogRecord
instances.
(#4568) -
Added
LoggerProviderBuilder.AddConsoleExporter
registration extension.
(#4583)
OpenTelemetry.Exporter.InMemory
- Added
LoggerProviderBuilder.AddInMemoryExporter
registration extension.
(#4584)
OpenTelemetry.Exporter.OpenTelemetryProtocol
-
Merged
OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs
package into
OpenTelemetry.Exporter.OpenTelemetryProtocol
. Going Forward,
OpenTelemetry.Exporter.OpenTelemetryProtocol
will be the only package needed
for all 3 signals (Logs, Metrics, and Traces). All the changes made in
OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs
are now included in this package.
(#4556) -
Add back support for Exemplars. See
exemplars for
instructions to enable exemplars.
(#4553) -
Updated Grpc.Net.Client to
2.45.0
to fix unobserved exception from failed
calls.
(#4573) -
Updated to support
Severity
andSeverityText
when exportingLogRecord
s.
(#4568) -
Updated Grpc.Net.Client to
2.52.0
to address the vulnerability reported by
CVE-2023-32731. Refer to
grpc/grpc#32309
for more details.
(#4647)
1.5.1
OpenTelemetry
-
Fixed a breaking change causing
LogRecord.State
to benull
where it was previously set to a valid value whenOpenTelemetryLoggerOptions.ParseStateValues
isfalse
and states implementIReadOnlyList
orIEnumerable
ofKeyValuePair<string, object>
s. (#4609) -
Breaking Change Removed the support for parsing
TState
types passed to theILogger.Log<TState>
API whenParseStateValues
is true andTState
does not implement eitherIReadOnlyList<KeyValuePair<string, object>>
orIEnumerable<KeyValuePair<string, object>>
. This feature was first introduced in the1.5.0
stable release with #4334 and has been removed because it makes the OpenTelemetry .NET SDK incompatible with native AOT. (#4614)
1.5.0 / 1.5.0-beta.1
OpenTelemetry
-
Fixed a bug introduced by
#4508 in
1.5.0-rc.1 which caused the "Build" extension to returnnull
when performing
chained/fluent calls.
(#4529) -
Marked
Exemplars
and related APIsinternal
as the spec forExemplars
is
not stable yet. This would be added back in the1.6.*
prerelease versions
right after1.5.0
stable version is released.
(#4533)
OpenTelemetry.Api.ProviderBuilderExtensions
- Added an
IServiceCollection.ConfigureOpenTelemetryMeterProvider
overload
which may be used to configureMeterProviderBuilder
s while the
IServiceCollection
is modifiable (before theIServiceProvider
has been
created).
(#4517)
OpenTelemetry.Exporter.Console
- Remove support for exporting
Exemplars
. This would be added back in the
1.6.*
prerelease versions right after1.5.0
stable version is released.
(#4533)
OpenTelemetry.Exporter.OpenTelemetryProtocol
- Remove support for exporting
Exemplars
. This would be added back in the
1.6.*
prerelease versions right after1.5.0
stable version is released.
(#4533)
OpenTelemetry.Instrumentation.AspNetCore
-
Fix issue where baggage gets cleared when the ASP.NET Core Activity
is stopped. The instrumentation no longer clears baggage. One problem
this caused was that it prevented Activity processors from accessing baggage
during theirOnEnd
call.
(#4274) -
Added direct reference to
System.Text.Encodings.Web
with minimum version of
4.7.2
due to CVE-2021-26701.
This impacts target frameworksnetstandard2.0
andnetstandard2.1
which has a
reference toMicrosoft.AspNetCore.Http.Abstractions
that depends on
System.Text.Encodings.Web
>= 4.5.0.
(#4399) -
Improve perf by avoiding boxing of common status codes values.
(#4360,
#4363)
OpenTelemetry.Instrumentation.Http
1.5.0-rc.1
OpenTelemetry
-
The default resource provided by
ResourceBuilder.CreateDefault()
now adds
thetelemetry.sdk.*
attributes defined in the
specification.
(#4369) -
Fixed an issue with
HashCode
computations throwing exceptions on .NET
Standard 2.1 targets.
(#4362) -
Update value of the resource attribute
telemetry.sdk.version
to show the tag
name which resembles the package version of the SDK.
(#4375) -
Obsoleted
State
andStateValues
properties and addedBody
and
Attributes
properties onLogRecord
. Note:LogRecord.Attributes
and
LogRecord.StateValues
point to the same data. "Attributes" is what the
OpenTelemetry Specification defines so this was changed for clarity &
consistency with the specification.
(#4334) -
Tweaked the behavior of the
OpenTelemetryLoggerOptions.ParseStateValues
flag:-
LogRecord.Attributes
(akaLogRecord.StateValues
) are now automatically
included for all log messages with states implementingIReadOnlyList
or
IEnumerable
. -
OpenTelemetryLoggerOptions.ParseStateValues
is now used to tell the SDK to
parse (using reflection) attributes for custom states which do not implement
IReadOnlyList
orIEnumerable
. Only top-level properties are included. -
LogRecord.State
will only be set to the raw state object if no attributes
are found.
See #4334
for details. -
-
If a template (
{OriginalFormat}
attribute) cannot be found on log messages a
formatted message will now automatically be generated (even if
OpenTelemetryLoggerOptions.IncludeFormattedMessage
is set tofalse
).
(#4334)
OpenTelemetry.Api.ProviderBuilderExtensions
-
Fixed a bug which prevented the
TracerProviderBuilder.AddInstrumentation(IServiceProvider, TracerProvider)
factory extension from being called during construction of the SDK
TracerProvider
.
(#4468) -
Added an
IServiceCollection.ConfigureOpenTelemetryTracerProvider
overload
which may be used to configureTracerProviderBuilder
s while the
IServiceCollection
is modifiable (before theIServiceProvider
has been
created).
(#4508)
OpenTelemetry.Exporter.Console
-
Add display of bucket boundaries when using exponential histograms.
(#4507) -
Added direct reference to
System.Text.Encodings.Web
with minimum version of
4.7.2
in response to CVE-2021-26701. -
Updated
LogRecord
console output:Body
is now shown (if set),
StateValues
are now written asAttributes
, andState
is no longer
processed.
(#4334)
OpenTelemetry.Exporter.Jaeger
- Added direct reference to
System.Text.Encodings.Web
with minimum version of
4.7.2
in response to CVE-2021-26701.
OpenTelemetry.Exporter.OpenTelemetryProtocol
- Revert version of
Google.Protobuf
to3.19.4
(see
#4201).
This also reintroduces theSystem.Reflection.Emit.Lightweight
dependency.
(#4407)
OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs
-
The
OpenTelemetryLoggerOptions.AddOtlpExporter
extension no longer
automatically setsOpenTelemetryLoggerOptions.ParseStateValues
totrue
.
The OpenTelemetry SDK now automatically setsAttributes
(akaStateValues
)
for the common cases whereParseStateValues
was previously required.
ParseStateValues
can be set totrue
manually by users to enable parsing of
custom states which do not implementIReadOnlyList
/IEnumerable
interfaces.
(#4334) -
Updated to use the new
LogRecord.Attributes
field asLogRecord.StateValues
is now marked obsolete. There is no impact to transmitted data (StateValues
andAttributes
are equivalent).
(#4334) -
Fixed issue where the
observed time
field of the OTLP log record was not set. It is now correctly set to equal
the
time
field.
(#4444)
OpenTelemetry.Exporter.Zipkin
- Added direct reference to
System.Text.Encodings.Web
with minimum version of
4.7.2
in response to CVE-2021-26701.
1.5.0-alpha.2
OpenTelemetry
-
Enabling
SetErrorStatusOnException
on TracerProvider will now set theStatus
property on Activity toActivityStatusCode.Error
in case of an error. This will be done in addition to current behavior of settingotel.status_code
tag on activity. (#4336) -
Add support for configuring the Base2 Exponential Bucket Histogram Aggregation using the
AddView
API. This aggregation is supported by OTLP but not yet by Prometheus. (#4337) -
Implementation of
SuppressInstrumentationScope
changed to improve performance. (#4304)
OpenTelemetry.Api
OpenTelemetry.Api.ProviderBuilderExtensions
OpenTelemetry.Exporter.Console
OpenTelemetry.Exporter.InMemory
- Fixed issue where the
MetricSnapshot
of a histogram did not capture the min and max values. (#4306)
OpenTelemetry.Exporter.Jaeger
- Enabled performance optimizations for .NET 6.0+ runtimes. (#4349)
OpenTelemetry.Exporter.OpenTelemetryProtocol
-
Add support for exporting histograms aggregated using the Base2 Exponential Bucket Histogram Aggregation. (#4337)
-
Added support to set
TraceState
when converting the System.Diagnostics.Activity object to its corresponding OpenTelemetry.Proto.Trace.V1.Span object. (#4331)
OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs
OpenTelemetry.Exporter.Zipkin
OpenTelemetry.Extensions.Hosting
OpenTelemetry.Extensions.Propagators
1.5.0-alpha.1 of all core components
OpenTelemetry
-
Added Exemplar support. See exemplars for instructions to enable exemplars.
-
Added
AddDetector
factory overload onResourceBuilder
. (#4261)
OpenTelemetry.Api
OpenTelemetry.Api.ProviderBuilderExtensions
OpenTelemetry.Exporter.Console
OpenTelemetry.Exporter.InMemory
OpenTelemetry.Exporter.Jaeger
OpenTelemetry.Exporter.OpenTelemetryProtocol
- Bumped the version of
Google.Protobuf
used by the project to3.22.0
so
that a new performance feature can be used instead of reflection. Removed the
dependency onSystem.Reflection.Emit.Lightweight
.
(#4201)
OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs
OpenTelemetry.Exporter.Prometheus.AspNetCore
OpenTelemetry.Exporter.Prometheus.HttpListener
OpenTelemetry.Exporter.Zipkin
OpenTelemetry.Extensions.Hosting
OpenTelemetry.Extensions.Propagators