core-1.8.0-beta.1
Pre-releaseOpenTelemetry
-
Throw NotSupportedException when using
SetErrorStatusOnException
method for Tracing in Mono Runtime and Native AOT environment because the dependentMarshal.GetExceptionPointers()
API is not supported on these platforms. (#5374) -
Fixed an issue where
LogRecord.Attributes
(orLogRecord.StateValues
alias) could become out of sync withLogRecord.State
if either is set directly via the public setters. This was done to further mitigate issues introduced in 1.5.0 causing attributes added using custom processor(s) to be missing after upgrading. For details see:(#5169) -
Fixed an issue where
SimpleExemplarReservoir
was not resetting internal state for cumulative temporality. (#5230) -
Fixed an issue causing
LogRecord
s to be incorrectly reused when wrapping an instance ofBatchLogRecordExportProcessor
inside another
BaseProcessor<LogRecord>
which leads to missing or incorrect data during export. (#5255) -
Experimental (pre-release builds only): Added support for setting
CardinalityLimit
(the maximum number of data points allowed for a metric) when configuring a view (applies to individual metrics) and obsoletedMeterProviderBuilderExtensions.SetMaxMetricPointsPerMetricStream
(previously applied to all metrics). The default cardinality limit for metrics remains at2000
. (#5312, #5328) -
Updated
LogRecord
to keepCategoryName
andLogger
in sync when using the experimental Log Bridge API. #5317 -
Added
OpenTelemetryBuilderSdkExtensions
class which contains extension methods (ConfigureResource
,WithMetrics
,WithTracing
, and experimentalWithLogging
) for theIOpenTelemetryBuilder
interface. (#5265) -
Added
Microsoft.Extensions.Diagnostics.Abstractions
dependency so that theIOpenTelemetryBuilder.WithMetrics
extension method can configure IMetricsListener. (#5265) -
Experimental (pre-release builds only): The
Exemplar.FilteredTags
property now returns aReadOnlyFilteredTagCollection
instance and theExemplar.LongValue
property has been added. TheMetricPoint.GetExemplars
method has been replaced byMetricPoint.TryGetExemplars
which outputs aReadOnlyExemplarCollection
instance. These are breaking changes for metrics exporters which support exemplars. (#5386) -
Experimental (pre-release builds only): Added support for exemplars when using Base2 Exponential Bucket Histogram Aggregation configured via the View API. (#5396)
-
Experimental (pre-release builds only): Removed the
ExemplarFilter
,AlwaysOffExemplarFilter
,AlwaysOnExemplarFilter
, andTraceBasedExemplarFilter
APIs. TheMeterProviderBuilder.SetExemplarFilter
extension method now accepts anExemplarFilterType
enumeration (which contains definitions for the supported filter typesAlwaysOff
,AlwaysOn
, andTraceBased
) instead of anExemplarFilter
instance. This was done in response to changes made to the OpenTelemetry Metrics SDK Specification. (#5404) -
Experimental (pre-release builds only): The
ExemplarFilter
used by SDKMeterProvider
s can now be controlled via theOTEL_METRICS_EXEMPLAR_FILTER
environment variable. The supported values are:always_off
,always_on
, andtrace_based
. For details see: OpenTelemetry Environment Variable Specification. (#5412)
OpenTelemetry.Api.ProviderBuilderExtensions
- Added
IOpenTelemetryBuilder
interface to support authoring extensions which can configure multiple OpenTelemetry signals (tracing, metrics, and/or logs). (#5265)
OpenTelemetry.Exporter.OpenTelemetryProtocol
-
Experimental (pre-release builds only): Added
LoggerProviderBuilder.AddOtlpExporter
registration extensions. #5103 -
Removed the
OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES
environment variable, following the stabilization of the exception attributesexception.type
,exception.message
, andexception.stacktrace
in the OpenTelemetry Semantic Conventions. These attributes, corresponding toLogRecord.Exception
, are now stable and will be automatically included in exports. (#5258) -
Updated
OtlpLogExporter
to setbody
on the data model fromLogRecord.Body
if{OriginalFormat}
attribute is NOT found andFormattedMessage
isnull
. This is typically the case when using the
experimental Logs Bridge API. (#5268) -
Updated
OtlpLogExporter
to set instrumentation scope name on the data model fromLogRecord.Logger.Name
ifLogRecord.CategoryName
isnull
. This is typically the case when using the experimental Logs Bridge API. (#5300) -
URL encoded values in
OTEL_EXPORTER_OTLP_HEADERS
are now correctly decoded as it is mandated by the specification. (#5316) -
Experimental (pre-release builds only): Add support in
OtlpMetricExporter
for emitting exemplars supplied on Counters, Gauges, and
ExponentialHistograms. (#5397) -
Setting
Endpoint
orHttpClientFactory
properties onOtlpExporterOptions
tonull
will now result in anArgumentNullException
being thrown. (#5434) -
Introduced experimental support for automatically retrying export to the otlp endpoint when transient network errors occur. Users can enable this feature by setting
OTEL_DOTNET_EXPERIMENTAL_OTLP_ENABLE_INMEMORY_RETRY
environment variable to true. (#5435) -
Added
IOpenTelemetryBuilder.UseOtlpExporter
extension to simplify setup of the OTLP Exporter when all three signals are used (logs, metrics, and traces). The new extension has the following behaviors:-
Calling
UseOtlpExporter
will automatically enable logging, tracing, and metrics. Additional calls toWithLogging
,WithMetrics
, andWithTracing
are NOT required however for metrics and tracing sources/meters still need to be enabled. -
UseOtlpExporter
can only be called once and cannot be used with the existingAddOtlpExporter
extensions. Extra calls will result inNotSupportedException
s being thrown. -
UseOtlpExporter
will register the OTLP Exporter at the end of the processor pipeline for logging and tracing. -
The OTLP Exporters added for logging, tracing, and metrics can be configured using environment variables or
IConfiguration
.
For details see: README > Enable OTLP Exporter for all signals.
PR: #5400
-
OpenTelemetry.Exporter.Prometheus.AspNetCore
-
Added option to disable _total suffix addition to counter metrics (#5305)
-
Export OpenMetrics format from Prometheus exporters (#5107)
-
For requests with OpenMetrics format, scope info is automatically added (#5086 #5182)
OpenTelemetry.Exporter.Prometheus.HttpListener
-
Added option to disable _total suffix addition to counter metrics (#5305)
-
Export OpenMetrics format from Prometheus exporters (#5107)
-
For requests with OpenMetrics format, scope info is automatically added (#5086 #5182)
-
Breaking change Updated the
PrometheusHttpListener
to throw an exception if it can't be started. (#5304)
OpenTelemetry.Extensions.Hosting
OpenTelemetryBuilder
has been marked obsolete. Component authors usingOpenTelemetryBuilder
for cross-cutting signal configuration extensions should switch to targetingIOpenTelemetryBuilder
instead. (#5265)