This file contains individual changes for the OpenTelemetry package. For highlights and announcements covering all components see: Release Notes.
Released 2024-Nov-12
-
Promoted the MetricPoint reclaim feature for Delta aggregation temporality from experimental to stable. (#5956)
Previous Behavior: The SDK maintained a fixed set of MetricPoints which were assigned on a first-come basis based on the tags. MetricPoint reclaim was an experimental feature users could opt-into setting the environment variable
OTEL_DOTNET_EXPERIMENTAL_METRICS_RECLAIM_UNUSED_METRIC_POINTS=true
.New Behavior: MetricPoint reclaim is now enabled by default when Delta aggregation temporality is used without the need to set an environment variable. Unused MetricPoints will automatically be reclaimed and reused for future measurements. There is NO ability to revert to the old behavior.
-
Updated the
Microsoft.Extensions.Logging.Configuration
andMicrosoft.Extensions.Diagnostics.Abstractions
package versions to9.0.0
. (#5967)
Released 2024-Nov-01
-
The experimental APIs previously covered by
OTEL1003
(MetricStreamConfiguration.CardinalityLimit
) are now part of the public API and supported in stable builds. (#5926) -
Promoted overflow attribute from experimental to stable and removed the
OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE
environment variable. (#5909)Previous Behavior: By default, when the cardinality limit was reached, measurements were dropped, and an internal log was emitted the first time this occurred. Users could opt-into experimental overflow attribute feature with
OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE=true
. With this setting, the SDK would use an overflow attribute (otel.metric.overflow = true
) to aggregate measurements instead of dropping measurements. No internal log was emitted in this case.New Behavior: The SDK now always uses the overflow attribute (
otel.metric.overflow = true
) to aggregate measurements when the cardinality limit is reached. The previous approach of dropping measurements has been removed. No internal logs are emitted when the limit is hit.The default cardinality limit remains 2000 per metric. To set the cardinality limit for an individual metric, use the changing cardinality limit for a Metric.
There is NO ability to revert to old behavior.
-
Exposed a
public
constructor onBatch<T>
which accepts a single instance ofT
to be contained in the batch. (#5642)
Released 2024-Sep-30
-
Added
OpenTelemetrySdk.Create
API for configuring OpenTelemetry .NET signals (logging, tracing, and metrics) via a single builder. This new API simplifies bootstrap and teardown, and supports cross-cutting extensions targetingIOpenTelemetryBuilder
. (#5325) -
Updated the
Microsoft.Extensions.Logging.Configuration
andMicrosoft.Extensions.Diagnostics.Abstractions
packages version to9.0.0-rc.1.24431.7
. (#5853) -
Added support in metrics for histogram bucket boundaries set via the .NET 9 InstrumentAdvice<T> API.
Note: With this change explicit bucket histogram boundary resolution will apply in the following order:
- View API
- Advice API
- SDK defaults
See #5854 for details.
-
Added support for collecting metrics emitted via the .NET 9 Gauge<T> API. (#5867)
Released 2024-Jun-14
Released 2024-Jun-07
- The experimental APIs previously covered by
OTEL1000
(LoggerProviderBuilder
AddProcessor
&ConfigureResource
extensions, andLoggerProvider
ForceFlush
&Shutdown
extensions) are now part of the public API and supported in stable builds. (#5648)
Released 2024-May-20
-
Experimental (pre-release builds only): Exposed
ExemplarReservoir
as a public API and added support for setting anExemplarReservoir
factory function when configuring a view (applies to individual metrics). (#5542) -
Fixed a race condition for the experimental MetricPoint reclaim scenario (enabled via
OTEL_DOTNET_EXPERIMENTAL_METRICS_RECLAIM_UNUSED_METRIC_POINTS
) which could have led to a measurement being dropped. (#5546) -
Experimental (pre-release builds only): Exposed
FixedSizeExemplarReservoir
as a public API to support custom implementations ofExemplarReservoir
which may be configured using theExemplarReservoirFactory
property on the View API. (#5558) -
The experimental APIs previously covered by
OTEL1002
(Exemplar
,ExemplarFilterType
,MeterProviderBuilder.SetExemplarFilter
,ReadOnlyExemplarCollection
,ReadOnlyFilteredTagCollection
, &MetricPoint.TryGetExemplars
) are now part of the public API and supported in stable builds. (#5607) -
Fixed the nullable annotations for the
SamplingResult
constructors to allownull
being supplied asattributes
ortraceStateString
which has always been supported. (#5614) -
The
ExemplarFilter
used by SDKMeterProvider
s for histogram metrics can now be controlled via the experimentalOTEL_DOTNET_EXPERIMENTAL_METRICS_EXEMPLAR_FILTER_HISTOGRAMS
environment variable. The supported values are:always_off
,always_on
, andtrace_based
. (#5611)
Released 2024-Apr-17
- Fixed an issue in Logging where unwanted objects (processors, exporters, etc.) could be created inside delegates automatically executed by the Options API during configuration reload. (#5514)
Released 2024-Apr-02
Released 2024-Mar-27
TracerProvider
s can now have a sampler configured via theOTEL_TRACES_SAMPLER
environment variable. The supported values are:always_off
,always_on
,traceidratio
,parentbased_always_on
,parentbased_always_off
, andparentbased_traceidratio
. The optionstraceidratio
andparentbased_traceidratio
may have the sampler probability configured via theOTEL_TRACES_SAMPLER_ARG
environment variable. For details see: OpenTelemetry Environment Variable Specification. (#5448)
Released 2024-Mar-14
-
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 anotherBaseProcessor<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)
Released 2023-Dec-08
Released 2023-Nov-29
-
The
AddService
ResourceBuilder
extension method will now generate the sameservice.instance.id
for the lifetime of a process whenautoGenerateServiceInstanceId
istrue
. (#4988) -
Fixed a Metrics SDK bug which led to
ExemplarReservoir.Offer
always being called regardless of whether or not theExemplarFilter
sampled the measurement. (#5004) (#5016) -
Update Metrics SDK to override the default histogram buckets for the following metrics from ASP.NET Core and HttpClient runtime:
signalr.server.connection.duration
kestrel.connection.duration
http.client.connection.duration
These histogram metrics which have their
Unit
ass
(second) will have their default histogram buckets as[ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ]
. (#5008) (#5021) -
Remove the bucket with value
0
for histogram buckets for all metrics from ASP.NET Core and HttpClient. (#5021) -
Updated
Microsoft.Extensions.Logging.Configuration
package version to8.0.0
. (#5051) -
Updated
Microsoft.Extensions.Logging
package version to8.0.0
. (#5051) -
Revert the default behavior of Metrics SDK for Delta aggregation. It would not reclaim unused Metric Points by default. You can enable the SDK to reclaim unused Metric Points by setting the environment variable
OTEL_DOTNET_EXPERIMENTAL_METRICS_RECLAIM_UNUSED_METRIC_POINTS
totrue
before setting up theMeterProvider
. (#5052) -
Update Metrics SDK to override the default histogram buckets for ASP.NET (.NET Framework).
Histogram metrics for the meter name
OpenTelemetry.Instrumentation.AspNet
and instrument namehttp.request.server.duration
which have theirUnit
ass
(second) will have their default histogram buckets as[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]
. (#5063) -
Added
AddProcessor
overload onOpenTelemetryLoggerOptions
which exposes the factory pattern(Func<IServiceProvider, BaseProcessor<LogRecord>> implementationFactory)
. (#4916) -
Add support for Instrumentation Scope Attributes (i.e Meter Tags), fixing issue #4563. (#5089)
-
Added the
ILoggingBuilder.UseOpenTelemetry
experimental API extension for registering OpenTelemetryILogger
integration usingLoggerProviderBuilder
which supports the full DI (IServiceCollection
\IServiceProvider
) API surface (mirrors tracing & metrics). (#5072) -
Changed the
ILoggingBuilder
registration extensions (AddOpenTelemetry
&UseOpenTelemetry
) to fire the optionalOpenTelemetryLoggerOptions
configuration delegate AFTER the "Logging:OpenTelemetry"IConfiguration
section has been applied. (#5072)
Released 2023-Oct-16
-
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)
Released 2023-Sep-05
-
Increased the character limit of the Meter instrument name from 63 to 255. (#4798)
-
Update default size for
SimpleExemplarReservoir
to1
. (#4803) -
Update Metrics SDK to override the default histogram buckets for a set of well-known histogram metrics from ASP.NET Core and HttpClient runtime. These histogram metrics which have their
Unit
ass
(second) will have their default histogram buckets as[ 0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]
. (#4820)
Released 2023-Aug-21
- 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 as
otel.metric.overflow
and value astrue
. The feature is turned-off by default. You can enable it by setting the environment variableOTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE
totrue
before setting up theMeterProvider
. (#4737)
Released 2023-Jul-12
-
Experimental (pre-release builds only):
-
Note: See #4735 for the introduction of experimental api support.
-
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
.
Released 2023-Jun-26
-
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)
Released 2023-Jun-05
-
Fixed a bug introduced by #4508 in 1.5.0-rc.1 which caused the "Build" extension to return
null
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)
Released 2023-May-25
-
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
andAttributes
properties onLogRecord
. Note:LogRecord.Attributes
andLogRecord.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
orIEnumerable
. -
OpenTelemetryLoggerOptions.ParseStateValues
is now used to tell the SDK to parse (using reflection) attributes for custom states which do not implementIReadOnlyList
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 ifOpenTelemetryLoggerOptions.IncludeFormattedMessage
is set tofalse
). (#4334)
Released 2023-Mar-31
-
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)
Released 2023-Mar-07
-
Added Exemplar support. See exemplars for instructions to enable exemplars.
-
Added
AddDetector
factory overload onResourceBuilder
. (#4261)
Released 2023-Feb-24
Released 2023-Feb-10
-
Removed the dependency on System.Reflection.Emit.Lightweight (#4140)
-
Moved the
AddOpenTelemetry
extension into theOpenTelemetry.Extensions.Hosting
package so that theStartWithHost
API could be removed. (#4174)
Released 2023-Feb-01
-
Removed the dependency on Microsoft.Extensions.Configuration.EnvironmentVariables (#4092)
-
Removed the explicit reference to Microsoft.Extensions.Options version 5.0 and reverted back to the transitive reference of version 3.1 (#4093)
-
Added
SetSampler
,AddProcessor
, &AddReader
factory extensions. (#4103)
Released 2023-Jan-09
- Performance Improvement: Update the internal structure used to store metric
dimensions from a combination of
string[]
andobject[]
to aKeyValuePair<string, object>[]
. This results in faster copying of the metric dimensions required forMetricPoint
lookup on the hot path. (#4059)
Released 2022-Dec-12
-
Added dependency injection support in the
ResourceBuilder
class and added support for loading environment variables fromIConfiguration
for theAddEnvironmentVariableDetector
extension (Logs) (#3889) -
Refactored
AddInstrumentation
,ConfigureServices
andConfigureBuilder
APIs into the OpenTelemetry.Extensions.DependencyInjection package and added theIServiceCollection.AddOpenTelemetry
API (#3923) -
Removed
ConfigureResource
onOpenTelemetryLoggingOptions
(#3999)
Released 2022-Nov-07
-
Fix instrument naming enforcement implementation to match the spec. (#3821)
-
Added support for loading environment variables from
IConfiguration
when using theMetricReaderOptions
&BatchExportActivityProcessorOptions
classes. (#3760, #3776) -
Added dependency injection support in the
ResourceBuilder
class and added support for loading environment variables fromIConfiguration
for theAddEnvironmentVariableDetector
extension (Traces & Metrics) (#3782, #3798) -
Breaking: MetricPoint API to retrieve Histogram Min, Max changed. The existing pattern of checking if Min/Max is available with
HasMinMax()
and then retrieving the same usingGetHistogramMin()
,GetHistogramMax()
is replaced with a single APITryGetHistogramMinMaxValues(out double min, out double max)
. (#3822)
Released 2022-Oct-17
-
Make recording of
Min
andMax
for histograms configurable, enabled by default. (#2735) -
Changed default bucket boundaries for Explicit Bucket Histogram from [0, 5, 10, 25, 50, 75, 100, 250, 500, 1000] to [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000]. (#3722)
-
Fixed an issue where
LogRecord.ForEachScope
may return scopes from a previous log if accessed in a custom processor beforeBatchLogRecordExportProcessor.OnEnd
is fired. (#3731) -
Added support for loading environment variables from
IConfiguration
when usingTracerProviderBuilder
orMeterProviderBuilder
(#3720)
Released 2022-Sep-29
-
Use binary search for histograms with 50 or more supplied boundaries. (#3252)
-
Allows samplers the ability to modify tracestate if desired. (#3610)
-
Added support for
UpDownCounter
andObservableUpDownCounter
instruments. (#3606) -
Added support for dependency injection scenarios when configuring
MeterProvider
. (#3646) -
Revert new logging APIs pending OTel specification changes. (#3702)
-
Fix Histogram synchronization issue: Use the same synchronization mechanism for Histograms Update and Snapshot. (#3534)
Released 2022-Aug-18
-
Added
Sdk.CreateLoggerProviderBuilder
method and support for dependency injection scenarios when configuringOpenTelemetryLoggerProvider
(#3504) -
Added support for dependency injection scenarios when configuring
TracerProvider
(#3533)
Released 2022-Aug-02
TracerProviderSDK
modified for spans with remote parent. For such spans activity will be created irrespective of SamplingResult, to maintain context propagation. (#3329)- Fix issue where a measurement would be dropped when recording it with a null-valued tag. (#3325)
CompositeProcessor
will now ensureParentProvider
is set on its children (#3368)- Added
ForceFlush
and helper ctors onOpenTelemetryLoggerProvider
(#3364) Timestamp
,TraceId
,SpanId
,TraceFlags
,TraceState
,CategoryName
,LogLevel
,EventId
, &Exception
properties onLogRecord
now exposeset
methods (#3378)- Handle possible exception when initializing the default service name. (#3405)
- Add
ConfigureResource
which can replace SetResourceBuilder more succinctly in most cases and has greater flexibility (applies to TracerProviderBuilder, MeterProviderBuilder, OpenTelemetryLoggingOptions). (#3307) LogRecord
instances are now reused to reduce memory pressure (#3385)- Fix exact match of activity source name when
wildcard
is used. (#3446) - Added AddOpenTelemetry
ILoggingBuilder
extensions which acceptOpenTelemetryLoggerProvider
directly (#3489)
Released 2022-Jun-03
Released 2022-June-1
- Fix null reference exception when a metric view does not match an instrument. (#3285)
- Swallow
ObjectDisposedException
inBatchExportProcessor
andPeriodicExportingMetricReader
. (#3291)
Released 2022-May-16
- Exposed public setters for
LogRecord.State
,LogRecord.StateValues
, andLogRecord.FormattedMessage
. (#3217)
Released 2022-Apr-15
- Removes .NET Framework 4.6.1. The minimum .NET Framework version supported is .NET 4.6.2. (#3190)
- Bumped minimum required version of
Microsoft.Extensions.Logging
andMicrosoft.Extensions.Logging.Configuration
to 3.1.0 (#2582)
Released 2022-Apr-15
- Make setter for
MetricReaderOptions.PeriodicExportingMetricReaderOptions
property public. (#3184)
Released 2022-Apr-12
- Removed the
Temporality
setting onMetricReader
and replaced it withTemporalityPreference
. This is a breaking change.TemporalityPreference
is used to determine theAggregationTemporality
used on a per-instrument kind basis. Currently, there are two preferences:Cumulative
: Measurements from all instrument kinds are aggregated usingAggregationTemporality.Cumulative
.Delta
: Measurements fromCounter
,ObservableCounter
, andHistogram
instruments are aggregated usingAggregationTemporality.Delta
. When UpDownCounters are supported with DiagnosticSource version 7.0 onwards, they will be aggregated usingAggregationTemporality.Cumulative
. (#3153)
- Fix issue where
ExplicitBucketHistogramConfiguration
could be used to configure metric streams for instruments that are not histograms. Currently, it is not possible to change the aggregation of an instrument with views. This may be possible in the future. (#3126) - Conformed to the specification to ensure that each view that an instrument matches results in a new metric stream. With this change it is possible for views to introduce conflicting metric streams. Any conflicts encountered will result in a diagnostic log. (#3148)
Released 2022-Mar-30
- The
PeriodicExportingMetricReader
now accepts anExportIntervalMilliseconds
of-1
indicating an infinite export interval period. (#2982) - Fix bug where multiple views selecting a single instrument can result in duplicate updates to a single metric point. (#3006)
- Added the
PeriodicExportingMetricReaderOptions.ExportTimeoutMilliseconds
option. (#3038) - Removed
MetricReaderType
. This enumeration was previously used when configuring a metric reader with an exporter to configure whether the export cycle would be periodic or manual (i.e., requiring a explicit call to flush metrics). This change affects the push-based metric exporters: OTLP, Console, and InMemory. For these exporters, a manual export cycle can now be achieved by settingPeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds
to-1
. (#3038) - Marked members of the
MetricPoint
struct
which do not mutate state asreadonly
(#3065) - [Bug fix] OpenTelemetryLoggerProvider is now unaffected by changes to OpenTelemetryLoggerOptions after the LoggerFactory is built. (#3055)
Released 2022-Mar-04
- Instantiating multiple metric instruments with the same name and also identical in all other respects - same type, description, and unit - result in a single metric stream aggregating measurements from all the identical instruments. Instantiating multiple metric instruments with the same name but differ in some respect - different type, description, or unit - will result in a separate metric stream for each distinct instrument. (#2916)
- The
Meter
property onOpenTelemetry.Metrics.Metric
has been removed. It now hasMeterName
andMeterVersion
properties. (#2916) - Added support for implementing custom
ResourceDetector
. (#2949 #2897) - Perf improvement for Histogram and HistogramSumCount by implementing lock-free updates. (#2951 #2961)
Released 2022-Feb-02
- Make
MetricPoint
ofMetricPointAccessor
readonly. (#2736) - Fail-fast when using AddView with guaranteed conflict. (#2751)
- Swallow
ObjectDisposedException
from theBatchExportProcessor
worker thread. (#2844) - Performance improvement: when emitting metrics, users are strongly advised to provide tags with same Key order, to achieve maximum performance. (#2805)
Released 2021-Nov-29
- Prevent accessing activity Id before sampler runs in case of legacy activities. (#2659)
- Added
ReadOnlyTagCollection
and exposeTags
onMetricPoint
instead ofKeys
+Values
(#2642) - Refactored
MetricPoint
and added public methods:GetBucketCounts
,GetExplicitBounds
,GetHistogramCount
, andGetHistogramSum
(#2657) - Remove MetricStreamConfiguration.Aggregation, as the feature to customize aggregation is not implemented yet. (#2660)
- Removed the public property
HistogramMeasurements
and added a public methodGetHistogramBuckets
instead. Renamed the classHistogramMeasurements
toHistogramBuckets
and added an enumerator of typeHistogramBucket
for enumeratingBucketCounts
andExplicitBounds
. RemovedGetBucketCounts
andGetExplicitBounds
methods fromMetricPoint
. (#2664) - Refactored temporality setting to align with the latest spec. (#2666)
- Removed the public properties
LongValue
,DoubleValue
, in favor of their counterpart public methodsGetSumLong
,GetSumDouble
,GetGaugeLastValueLong
,GetGaugeLastValueDouble
. (#2667) - MetricType modified to reserve bits for future types. (#2693)
Released 2021-Nov-19
- Renamed
HistogramConfiguration
toExplicitBucketHistogramConfiguration
and changed its memberBucketBounds
toBoundaries
. (#2638) - Metrics with the same name but from different meters are allowed. (#2634)
- Metrics SDK will not provide inactive Metrics to delta exporter. (#2629)
- Histogram bounds are validated when added to a View. (#2573)
- Changed
BatchExportActivityProcessorOptions
constructor to throwFormatException
if it fails to parse any of the supported environment variables. - Added
BaseExporter.ForceFlush
. (#2525) - Exposed public
Batch(T[] items, int count)
constructor onBatch<T>
struct (#2542) - Added wildcard support for AddMeter. (#2459)
- Add support for multiple Metric readers (#2596)
- Add ability to configure MaxMetricStreams, MaxMetricPointsPerMetricStream (#2635)
Released 2021-Oct-08
- Exception from Observable instrument callbacks does not result in entire metrics being lost.
- SDK is allocation-free on recording of measurements with up to 8 tags.
- TracerProviderBuilder.AddLegacySource now supports wildcard activity names. (#2183)
- Instrument and View names are validated according with the spec. (#2470)
Released 2021-Sep-23
BatchExportProcessor.OnShutdown
will now log the count of dropped telemetry items. (#2331)- Changed
CompositeProcessor<T>.OnForceFlush
to meet with the spec requirement. Now the SDK will invokeForceFlush
on all registered processors, even if there is a timeout. (#2388)
Released 2021-Sep-13
- Metrics perf improvements, bug fixes. Replace MetricProcessor with MetricReader. (#2306)
- Add
BatchExportActivityProcessorOptions
which supports field value overriding usingOTEL_BSP_SCHEDULE_DELAY
,OTEL_BSP_EXPORT_TIMEOUT
,OTEL_BSP_MAX_QUEUE_SIZE
,OTEL_BSP_MAX_EXPORT_BATCH_SIZE
environmental variables as defined in the specification. (#2219)
Released 2021-Aug-24
- More Metrics features. All instrument types, push/pull exporters, Delta/Cumulative temporality supported.
ResourceBuilder.CreateDefault
has detectors forOTEL_RESOURCE_ATTRIBUTES
,OTEL_SERVICE_NAME
environment variables so that explicitAddEnvironmentVariableDetector
call is not needed. (#2247)ResourceBuilder.AddEnvironmentVariableDetector
handlesOTEL_SERVICE_NAME
environmental variable. (#2209)- Removes upper constraint for Microsoft.Extensions.Logging dependencies. (#2179)
- OpenTelemetryLogger modified to not throw, when the formatter supplied in ILogger.Log call is null. (#2200)
Released 2021-Jul-23
- Add basic Metrics support with a single pipeline, and supporting Counter (sync) instrument. Push and Pull exporters are supported. (#2174)
- Removes .NET Framework 4.5.2, .NET 4.6 support. The minimum .NET Framework version supported is .NET 4.6.1. (#2138)
Released 2021-Jul-12
Released 2021-Jun-25
- Moved
IDeferredTracerProviderBuilder
to API library. (#2058)
Released 2021-Jun-09
Released 2021-May-11
AddLegacySource()
moved out ofTracerProviderBuilderExtensions
and into public API (#2019)- Fixed an issue causing inconsistent log scopes when using
BatchLogRecordExportProcessor
. To make parsing scopes easier theLogRecord.ForEachScope
signature has been changed to receive instances ofLogRecordScope
(a new type which implementsIEnumerator<KeyValuePair<string, object>>
for accessing scope items) (#2026)
Released 2021-Apr-23
- Use
AssemblyFileVersionAttribute
instead ofFileVersionInfo.GetVersionInfo
to get the SDK version attribute to ensure that it works when the assembly is not loaded directly from a file on disk (#1908)
Released 2021-Mar-19
- Removed SuppressScope Increment/Decrement from DiagnosticSourceListeners. (1893)
- Added
TracerProviderBuilder.SetErrorStatusOnException
which automatically sets the activity status toError
when exception happened. (#1858 #1875) - Added
ForceFlush
toTracerProvider
. (#1837) - Added a TracerProviderBuilder extension method called
AddLegacySource
which is used by instrumentation libraries that use DiagnosticSource to get activities processed without ActivitySourceAdapter. #1836 #1860 - Added new constructor with optional parameters to allow customization of
ParentBasedSampler
behavior. (#1727) - The application base directory is now tested after the current directory when searching for the self diagnostic configuration file. (#1865)
- Resource Attributes now accept primitive arrays as values. (#1852)
- Fixed
#1846:
ParentBasedSampler
will no longer explicitly consider Activity links. (#1851) - Added
IncludeScopes
,IncludeFormattedMessage
, &ParseStateValues
onOpenTelemetryLoggerOptions
. AddedFormattedMessage
,StateValues
, &ForEachScope
onLogRecord
. (#1869 #1883) - Added
SetResourceBuilder
support toOpenTelemetryLoggerOptions
. (#1913) - Added
IDeferredTracerProviderBuilder
andTracerProviderBuilderBase
to support dependency injection through OpenTelemetry.Extensions.Hosting. (#1889)
Released 2021-Feb-10
Released 2021-Feb-09
Released 2021-Feb-04
- Default
Resource
will now contain service.name instead of Telemetry SDK. (#1744) - Added GetDefaultResource() method to
Provider
. (#1768)
Released 2021-Jan-29
- The following extension methods on
ResourceBuilder
has been moved from theOpenTelemetry
namespace to theOpenTelemetry.Resources
namespace:AddEnvironmentVariableDetector
,AddAttributes
,AddService
, andAddTelemetrySdk
. (#1576) - Metrics API/SDK support is in an experimental state and is not recommended for
production use. All metric APIs have been marked with the
Obsolete
attribute. See #1501 for more information. (#1611) - Modified SimpleExportProcessor and BatchExportProcessor to abstract classes; Added SimpleActivityExportProcessor, SimpleLogRecordExportProcessor, BatchActivityExportProcessor, BatchLogRecordExportProcessor; Added the check for Activity.Recorded in SimpleActivityExportProcessor and BatchActivityExportProcessor (#1622)
- Added check in
ActivitySourceAdapter
class for root activity if trace ID is overridden by callingSetParentId
(#1355) - Resource Attributes now accept int, short, and float as values, converting them to supported data types (long for int/short, double for float). For invalid attributes we now throw an exception instead of logging an error. (#1720)
- Merging "this" resource with an "other" resource now prioritizes the "other" resource's attributes in a conflict. We've rectified to follow a recent change to the spec. We previously prioritized "this" resource's tags. (#1728)
BatchExportProcessor
will now flush any remaining spans left in aBatch
after the export operation has completed. (#1726)- Fixed a bug to allow the Self Diagnostics log file to be opened simultaneously by another process in read-only mode for .NET Framework. (#1693)
- Metrics removed as it is not part 1.0.0 release. See issue #1501 for details on Metric release plans.
- Fix Resource attribute telemetry.sdk.version to have correct file version.
- Metrics removed as it is not part 1.0.0 release. See issue #1501 for details on Metric release plans.
Released 2020-Nov-17
- Removed
GetResource
andSetResource
Activity
extension methods. AddedGetResource
extension method onBaseProvider
(#1463) - Added
ParentProvider
property onBaseProcessor
andBaseExporter
classes. (#1463) Resource
is no longer added to observedActivity
objects as aCustomProperty
. (#1463)- Removed
ReentrantExportProcessor
as it is not required by spec. (#1496) ActivitySourceAdapter
supports settingActivitySource
for Activities created withoutActivitySource
. (#1515)- Implemented
Shutdown
forTracerProvider
. (#1489) Resources.CreateServiceResource
has been removed in favor of theResourceBuilder
API. (#1533)TracerProviderBuilder.SetResource
has been changed toTracerProviderBuilder.SetResourceBuilder
. (#1533)- By default
TracerProvider
will set aResource
containing Telemetry SDK details (#1533):telemetry.sdk.name
=opentelemetry
telemetry.sdk.language
=dotnet
telemetry.sdk.version
= [SDK version]
Resource
constructor marked as internal, asResourceBuilder
is the recommended API to build resources. (#1566)- Changed BaseExportProcessor to have it override OnExport instead of OnEnd; Added check for ActivityTraceFlags to BaseExportProcessor OnEnd (#1574)
Released 2020-Nov-5
- TracerProviderBuilder API changes Renamed AddInstrumentation to AddDiagnosticSourceInstrumentation and made internal. Added AddInstrumentation (#1454)
- DiagnosticSource subscription helper classes (DiagnosticSourceSubscriber, ListenerHandler,PropertyFetcher) are made internal.
Released 2020-Oct-16
- Changed
ActivityExporter.OnShutdown
,ActivityExporter.Shutdown
,ActivityProcessor.OnShutdown
andActivityProcessor.Shutdown
to return boolean value (#1282 #1285) - Renamed
SamplingDecision
options (NotRecord
toDrop
,Record
toRecordOnly
, andRecordAndSampled
toRecordAndSample
) (#1297) - Added
ILogger
/Microsoft.Extensions.Logging
integration (#1308 #1315) - Changed exporter and processor to generic types
(#1328):
ActivityExporter
changed toBaseExporter<Activity>
ActivityProcessor
changed toBaseProcessor<Activity>
BatchExportActivityProcessor
changed toBatchExportProcessor<Activity>
ReentrantExportActivityProcessor
changed toReentrantExportProcessor<Activity>
SimpleExportActivityProcessor
changed toSimpleExportProcessor<Activity>
Released 2020-Sep-15
- Fixes 953
- Changes arising from
DiagnosticSource
changes (#1203) PropertyFetcher
is now public (#1232)PropertyFetcher
changed toPropertyFetcher<T>
(#1238)
Released 2020-08-28
- Changed
ActivityProcessor
to implementIDisposable
(#975) - Samplers now get the actual TraceId of the Activity to be created. (#1007)
- Changed the default sampler from
AlwaysOn
toParentOrElse(AlwaysOn)
to match the spec (#1013) - Added
SuppressInstrumentationScope
API (#988 #1067) - Changed
BroadcastActivityProcessor
toFanOutActivityProcessor
(#1015) - Changed
TracerProviderBuilder
andTracerProviderSdk
design to simply the flow and usage (#1008 #1027 #1035) - Changed
AddActivitySource
toAddSource
with params support (#1036) - Modified Sampler implementation to match the spec (#1037)
- Refactored simple export and batch export APIs (#1078 #1081 #1083 #1085 #1087 #1094 #1113 #1127 #1129 #1135)
- Changed
MeterProviderBuilder
andMeterProviderSdk
design to simply the flow and usage (#1149) - Renamed
ParentOrElseSampler
toParentBasedSampler
(#1173) - Renamed
ProbabilitySampler
toTraceIdRatioBasedSampler
(#1174)
Released 2020-07-24
- First beta release
Released 2020-07-23
- Initial release