diff --git a/CHANGELOG.md b/CHANGELOG.md
index 86b07cb4be..b66479b3a9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
## [Unreleased](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/compare/v1.4.0..HEAD)
+- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
+ [`1.8.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.8.0)
+- `System.Diagnostics.DiagnosticSource`: [`8.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/8.0.0)
+
### Added
- .NET only, warning in logs about End of Support date
@@ -16,16 +20,39 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
### Changed
+- Changed supported method parameters for plugins
+ - from `OpenTelemetry.Instrumentation.AspNet.AspNetInstrumentationOptions`
+ to `OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions`.
+
#### Dependency updates
+- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
+ [`1.8.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.8.0).
- Following packages updated
- `MongoDB.Driver.Core.Extensions.DiagnosticSources` from `1.3.0` to `1.4.0`.
+ - `OpenTelemetry.Exporter.Prometheus.HttpListener` from `1.7.0-rc.1` to `1.8.0-rc.1`,
+ - `OpenTelemetry.Instrumentation.Http` from `1.7.1` to `1.8.0`,
+ - `OpenTelemetry.Instrumentation.Process` from `0.5.0-beta.4` to `0.5.0-beta.5`,
+ - `OpenTelemetry.Instrumentation.Quartz` from `1.0.0-beta.1` to `1.0.0-beta.2`,
+ - `OpenTelemetry.Instrumentation.Runtime` from `1.7.0` to `1.8.0`,
+ - `OpenTelemetry.Instrumentation.SqlClient` from `1.7.0-beta.1` to `1.8.0-beta.1`,
+ - `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.0.0-rc9.14` to `1.0.0-rc9.14`,
+ - `OpenTelemetry.Instrumentation.Wcf` from `1.0.0-rc.15` to `1.0.0-rc.16`,
+ - `OpenTelemetry.ResourceDetectors.Azure` from `1.0.0-beta.5` to `1.0.0-beta.6`,
+ - `OpenTelemetry.ResourceDetectors.Host` from `0.1.0-alpha.2` to `0.1.0-alpha.3`.
+ - `OpenTelemetry.ResourceDetectors.Process` from `0.1.0-alpha.2` to `0.1.0-alpha.3`.
+ - `OpenTelemetry.ResourceDetectors.ProcessRuntime` from `0.1.0-alpha.2` to `0.1.0-alpha.3`.
+- .NET only, following packages updated
+ - `OpenTelemetry.Instrumentation.AspNetCore` from `1.7.1` to `1.8.0`,
+ - `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.0.0-beta.10` to `1.0.0-beta.11`,
+ - `OpenTelemetry.ResourceDetectors.Container` from `1.0.0-beta.6` to `1.0.0-beta.7`.
- .NET Framework only, following packages updated
- `Google.Protobuf` updated from `3.25.2` to `3.26.1`,
- `Grpc.Core.Api` from `2.60.0` to `2.62.0`,
- `Microsoft.Extensions.DependencyInjection.Abstractions` from `8.0.0` to `8.0.1`,
- `Microsoft.Extensions.Options` from `8.0.1` to `8.0.2`,
- `Microsoft.Extensions.Logging.Abstractions` from `8.0.0` to `8.0.1`,
+ - `OpenTelemetry.Instrumentation.AspNet` from `1.7.0-beta.2` to `1.8.0-beta.1`,
- `System.Text.Json` from `8.0.1` to `8.0.3`.
### Deprecated
diff --git a/Directory.Packages.props b/Directory.Packages.props
index e4cfd7c529..5245104c4a 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -8,11 +8,11 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/docs/README.md b/docs/README.md
index 740831a77a..ba73e5aed3 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -45,7 +45,7 @@ OpenTelemetry .NET Automatic Instrumentation is built on top of
[OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
-[`1.7.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.7.0)
+[`1.8.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.8.0)
- `System.Diagnostics.DiagnosticSource`: [`8.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/8.0.0)
referencing `System.Runtime.CompilerServices.Unsafe`: [`6.0.0`](https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe/6.0.0)
diff --git a/docs/config.md b/docs/config.md
index 527161fd8c..fd4dcfc109 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -90,11 +90,11 @@ The following resource detectors are included and enabled by default:
| ID | Description | Documentation | Status |
|-------------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
-| `AZUREAPPSERVICE` | Azure App Service detector | [Azure resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.Azure-1.0.0-beta.4/src/OpenTelemetry.ResourceDetectors.Azure/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
-| `CONTAINER` | Container detector | [Container resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.Container-1.0.0-beta.6/src/OpenTelemetry.ResourceDetectors.Container/README.md) **Not supported on .NET Framework** | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
-| `HOST` | Host detector | [Host resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.Host-0.1.0-alpha.2/src/OpenTelemetry.ResourceDetectors.Host/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
-| `PROCESS` | Process detector | [Process resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.Process-0.1.0-alpha.2/src/OpenTelemetry.ResourceDetectors.Process/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
-| `PROCESSRUNTIME` | Process Runtime detector | [Process Runtime resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.ProcessRuntime-0.1.0-alpha.2/src/OpenTelemetry.ResourceDetectors.ProcessRuntime/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `AZUREAPPSERVICE` | Azure App Service detector | [Azure resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.Azure-1.0.0-beta.5/src/OpenTelemetry.ResourceDetectors.Azure/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `CONTAINER` | Container detector | [Container resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.Container-1.0.0-beta.7/src/OpenTelemetry.ResourceDetectors.Container/README.md) **Not supported on .NET Framework** | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `HOST` | Host detector | [Host resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.Host-0.1.0-alpha.3/src/OpenTelemetry.ResourceDetectors.Host/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `PROCESS` | Process detector | [Process resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.Process-0.1.0-alpha.3/src/OpenTelemetry.ResourceDetectors.Process/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `PROCESSRUNTIME` | Process Runtime detector | [Process Runtime resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/ResourceDetectors.ProcessRuntime-0.1.0-alpha.3/src/OpenTelemetry.ResourceDetectors.ProcessRuntime/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
## Instrumentations
@@ -174,11 +174,11 @@ due to lack of stable semantic convention.
| ID | Instrumented library | Documentation | Supported versions | Instrumentation type | Status |
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------|
-| `ASPNET` | ASP.NET Framework \[1\] **Not supported on .NET** | [ASP.NET metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNet-1.7.0-beta.1/src/OpenTelemetry.Instrumentation.AspNet/README.md#list-of-metrics-produced) | * | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
-| `ASPNETCORE` | ASP.NET Core \[2\] **Not supported on .NET Framework** | [ASP.NET Core metrics](https://github.com/open-telemetry/opentelemetry-dotnet/blob/Instrumentation.AspNetCore-1.7.1/src/OpenTelemetry.Instrumentation.AspNetCore/README.md#list-of-metrics-produced) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
-| `HTTPCLIENT` | [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) and [System.Net.HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | [HttpClient metrics](https://github.com/open-telemetry/opentelemetry-dotnet/blob/Instrumentation.Http-1.7.1/src/OpenTelemetry.Instrumentation.Http/README.md#list-of-metrics-produced) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
-| `NETRUNTIME` | [OpenTelemetry.Instrumentation.Runtime](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) | [Runtime metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Runtime-1.7.0/src/OpenTelemetry.Instrumentation.Runtime/README.md#metrics) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
-| `PROCESS` | [OpenTelemetry.Instrumentation.Process](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Process) | [Process metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Process-0.5.0-beta.4/src/OpenTelemetry.Instrumentation.Process/README.md#metrics) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `ASPNET` | ASP.NET Framework \[1\] **Not supported on .NET** | [ASP.NET metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNet-1.8.0-beta.1/src/OpenTelemetry.Instrumentation.AspNet/README.md#list-of-metrics-produced) | * | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `ASPNETCORE` | ASP.NET Core \[2\] **Not supported on .NET Framework** | [ASP.NET Core metrics](https://github.com/open-telemetry/opentelemetry-dotnet/blob/Instrumentation.AspNetCore-1.8.0/src/OpenTelemetry.Instrumentation.AspNetCore/README.md#list-of-metrics-produced) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `HTTPCLIENT` | [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) and [System.Net.HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | [HttpClient metrics](https://github.com/open-telemetry/opentelemetry-dotnet/blob/Instrumentation.Http-1.8.0/src/OpenTelemetry.Instrumentation.Http/README.md#list-of-metrics-produced) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `NETRUNTIME` | [OpenTelemetry.Instrumentation.Runtime](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) | [Runtime metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Runtime-1.8.0/src/OpenTelemetry.Instrumentation.Runtime/README.md#metrics) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
+| `PROCESS` | [OpenTelemetry.Instrumentation.Process](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Process) | [Process metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Process-0.5.0-beta.5/src/OpenTelemetry.Instrumentation.Process/README.md#metrics) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `NSERVICEBUS` | [NServiceBus](https://www.nuget.org/packages/NServiceBus) | [NServiceBus metrics](https://docs.particular.net/samples/open-telemetry/prometheus-grafana/#reporting-metric-values) | ≥8.0.0 | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
\[1\]: The ASP.NET metrics are generated only if the `AspNet` trace instrumentation
@@ -307,7 +307,7 @@ Important environment variables include:
which differs from the OpenTelemetry .NET SDK default value of `grpc`.
- On .NET 6 and higher, the application must reference [`Grpc.Net.Client`](https://www.nuget.org/packages/Grpc.Net.Client/)
to use the `grpc` OTLP exporter protocol. For example, by adding
- `` to the
+ `` to the
`.csproj` file.
- On .NET Framework, the `grpc` OTLP exporter protocol is not supported.
@@ -321,8 +321,8 @@ Important environment variables include:
> Prometheus exporter is intended for the inner dev loop.
> Production environments can use a combination of OTLP exporter
> with [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-releases)
-> having [`otlp` receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.91.0/receiver/otlpreceiver)
-> and [`prometheus` exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.91.0/exporter/prometheusexporter).
+> having [`otlp` receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.97.0/receiver/otlpreceiver)
+> and [`prometheus` exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.97.0/exporter/prometheusexporter).
To enable the Prometheus exporter, set the `OTEL_METRICS_EXPORTER` environment
variable to `prometheus`.
@@ -331,7 +331,7 @@ The exporter exposes the metrics HTTP endpoint on `http://localhost:9464/metrics
and it caches the responses for 300 milliseconds.
See the
-[Prometheus Exporter HttpListener documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.7.0-rc.1/src/OpenTelemetry.Exporter.Prometheus.HttpListener).
+[Prometheus Exporter HttpListener documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.8.0-rc.1/src/OpenTelemetry.Exporter.Prometheus.HttpListener).
to learn more.
### Zipkin
@@ -342,7 +342,7 @@ To enable the Zipkin exporter, set the `OTEL_TRACES_EXPORTER` environment
variable to `zipkin`.
To customize the Zipkin exporter using environment variables,
-see the [Zipkin exporter documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.7.0/src/OpenTelemetry.Exporter.Zipkin#configuration-using-environment-variables).
+see the [Zipkin exporter documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.8.0/src/OpenTelemetry.Exporter.Zipkin#configuration-using-environment-variables).
Important environment variables include:
| Environment variable | Description | Default value | Status |
diff --git a/docs/plugins.md b/docs/plugins.md
index 60ffd277f5..1190954f53 100644
--- a/docs/plugins.md
+++ b/docs/plugins.md
@@ -108,37 +108,37 @@ public class MyPlugin
| Options type | NuGet package | NuGet version |
|-------------------------------------------------------------------------------------------|---------------------------------------------------|---------------|
-| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.7.0 |
-| OpenTelemetry.Exporter.ZipkinExporterOptions | OpenTelemetry.Exporter.Zipkin | 1.7.0 |
-| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.7.0 |
-| OpenTelemetry.Instrumentation.AspNet.AspNetInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.7.0-beta.2 |
-| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.7.1 |
-| OpenTelemetry.Instrumentation.EntityFrameworkCore.EntityFrameworkInstrumentationOptions | OpenTelemetry.Instrumentation.EntityFrameworkCore | 1.0.0-beta.10 |
-| OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.GrpcNetClient | 1.7.0-beta.1 |
-| OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.Http | 1.7.1 |
-| OpenTelemetry.Instrumentation.Quartz.QuartzInstrumentationOptions | OpenTelemetry.Instrumentation.Quartz | 1.0.0-beta.1 |
-| OpenTelemetry.Instrumentation.SqlClient.SqlClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.SqlClient | 1.7.0-beta.1 |
-| OpenTelemetry.Instrumentation.StackExchangeRedis.StackExchangeRedisInstrumentationOptions | OpenTelemetry.Instrumentation.StackExchangeRedis | 1.0.0-rc9.13 |
-| OpenTelemetry.Instrumentation.Wcf.WcfInstrumentationOptions | OpenTelemetry.Instrumentation.Wcf | 1.0.0-rc.15 |
+| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.8.0 |
+| OpenTelemetry.Exporter.ZipkinExporterOptions | OpenTelemetry.Exporter.Zipkin | 1.8.0 |
+| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.8.0 |
+| OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.8.0-beta.1 |
+| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.8.0 |
+| OpenTelemetry.Instrumentation.EntityFrameworkCore.EntityFrameworkInstrumentationOptions | OpenTelemetry.Instrumentation.EntityFrameworkCore | 1.0.0-beta.11 |
+| OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.GrpcNetClient | 1.8.0-beta.1 |
+| OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.Http | 1.8.0 |
+| OpenTelemetry.Instrumentation.Quartz.QuartzInstrumentationOptions | OpenTelemetry.Instrumentation.Quartz | 1.0.0-beta.2 |
+| OpenTelemetry.Instrumentation.SqlClient.SqlClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.SqlClient | 1.8.0-beta.1 |
+| OpenTelemetry.Instrumentation.StackExchangeRedis.StackExchangeRedisInstrumentationOptions | OpenTelemetry.Instrumentation.StackExchangeRedis | 1.0.0-rc9.14 |
+| OpenTelemetry.Instrumentation.Wcf.WcfInstrumentationOptions | OpenTelemetry.Instrumentation.Wcf | 1.0.0-rc.16 |
### Metrics
| Options type | NuGet package | NuGet version |
|--------------------------------------------------------------------------|------------------------------------------------|---------------|
-| OpenTelemetry.Metrics.MetricReaderOptions | OpenTelemetry | 1.7.0 |
-| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.7.0 |
-| OpenTelemetry.Exporter.PrometheusExporterOptions | OpenTelemetry.Exporter.Prometheus.HttpListener | 1.7.0-rc.1 |
-| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.7.0 |
-| OpenTelemetry.Instrumentation.AspNet.AspNetMetricsInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.7.0-beta.1 |
-| OpenTelemetry.Instrumentation.Runtime.RuntimeInstrumentationOptions | OpenTelemetry.Instrumentation.Runtime | 1.7.0 |
+| OpenTelemetry.Metrics.MetricReaderOptions | OpenTelemetry | 1.8.0 |
+| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.8.0 |
+| OpenTelemetry.Exporter.PrometheusExporterOptions | OpenTelemetry.Exporter.Prometheus.HttpListener | 1.8.0-rc.1 |
+| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.8.0 |
+| OpenTelemetry.Instrumentation.AspNet.AspNetMetricsInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.8.0-beta.1 |
+| OpenTelemetry.Instrumentation.Runtime.RuntimeInstrumentationOptions | OpenTelemetry.Instrumentation.Runtime | 1.8.0 |
### Logs
| Options type | NuGet package | NuGet version |
|-----------------------------------------------|----------------------------------------------|---------------|
-| OpenTelemetry.Logs.OpenTelemetryLoggerOptions | OpenTelemetry | 1.7.0 |
-| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.7.0 |
-| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.7.0 |
+| OpenTelemetry.Logs.OpenTelemetryLoggerOptions | OpenTelemetry | 1.8.0 |
+| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.8.0 |
+| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.8.0 |
## Requirements
diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props
index b746ae5e79..5e6812aef4 100644
--- a/src/Directory.Packages.props
+++ b/src/Directory.Packages.props
@@ -13,24 +13,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
@@ -71,6 +71,7 @@
+
diff --git a/src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h b/src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h
index a10e26d4f6..b2443a822d 100644
--- a/src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h
+++ b/src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h
@@ -27,6 +27,7 @@ void CorProfiler::InitNetFxAssemblyRedirectsMap()
{ L"Microsoft.Extensions.Configuration.Binder", {8, 0, 0, 1} },
{ L"Microsoft.Extensions.DependencyInjection", {8, 0, 0, 0} },
{ L"Microsoft.Extensions.DependencyInjection.Abstractions", {8, 0, 0, 1} },
+ { L"Microsoft.Extensions.Diagnostics.Abstractions", {8, 0, 0, 0} },
{ L"Microsoft.Extensions.Logging", {8, 0, 0, 0} },
{ L"Microsoft.Extensions.Logging.Abstractions", {8, 0, 0, 1} },
{ L"Microsoft.Extensions.Logging.Configuration", {8, 0, 0, 0} },
@@ -44,19 +45,19 @@ void CorProfiler::InitNetFxAssemblyRedirectsMap()
{ L"OpenTelemetry.Exporter.Prometheus.HttpListener", {1, 0, 0, 0} },
{ L"OpenTelemetry.Exporter.Zipkin", {1, 0, 0, 0} },
{ L"OpenTelemetry.Extensions.Propagators", {1, 0, 0, 0} },
- { L"OpenTelemetry.Instrumentation.AspNet", {1, 7, 0, 2} },
- { L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 7, 0, 2} },
+ { L"OpenTelemetry.Instrumentation.AspNet", {1, 8, 0, 1} },
+ { L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 8, 0, 1} },
{ L"OpenTelemetry.Instrumentation.GrpcNetClient", {1, 0, 0, 0} },
{ L"OpenTelemetry.Instrumentation.Http", {1, 0, 0, 0} },
- { L"OpenTelemetry.Instrumentation.Process", {0, 5, 0, 4} },
- { L"OpenTelemetry.Instrumentation.Quartz", {1, 0, 0, 1} },
- { L"OpenTelemetry.Instrumentation.Runtime", {1, 7, 0, 0} },
+ { L"OpenTelemetry.Instrumentation.Process", {0, 5, 0, 5} },
+ { L"OpenTelemetry.Instrumentation.Quartz", {1, 0, 0, 2} },
+ { L"OpenTelemetry.Instrumentation.Runtime", {1, 8, 0, 0} },
{ L"OpenTelemetry.Instrumentation.SqlClient", {1, 0, 0, 0} },
- { L"OpenTelemetry.Instrumentation.Wcf", {1, 0, 0, 15} },
- { L"OpenTelemetry.ResourceDetectors.Azure", {1, 0, 0, 5} },
- { L"OpenTelemetry.ResourceDetectors.Host", {0, 1, 0, 2} },
- { L"OpenTelemetry.ResourceDetectors.Process", {0, 1, 0, 2} },
- { L"OpenTelemetry.ResourceDetectors.ProcessRuntime", {0, 1, 0, 2} },
+ { L"OpenTelemetry.Instrumentation.Wcf", {1, 0, 0, 16} },
+ { L"OpenTelemetry.ResourceDetectors.Azure", {1, 0, 0, 6} },
+ { L"OpenTelemetry.ResourceDetectors.Host", {0, 1, 0, 3} },
+ { L"OpenTelemetry.ResourceDetectors.Process", {0, 1, 0, 3} },
+ { L"OpenTelemetry.ResourceDetectors.ProcessRuntime", {0, 1, 0, 3} },
{ L"OpenTelemetry.Shims.OpenTracing", {1, 0, 0, 0} },
{ L"OpenTracing", {0, 12, 1, 0} },
{ L"System.AppContext", {4, 1, 2, 0} },
diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/ConfigurationKeys.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/ConfigurationKeys.cs
index 79d7319bb3..784dc9d3ae 100644
--- a/src/OpenTelemetry.AutoInstrumentation/Configurations/ConfigurationKeys.cs
+++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/ConfigurationKeys.cs
@@ -103,16 +103,6 @@ public static class Traces
///
public const string AdditionalLegacySources = "OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_LEGACY_SOURCES";
- ///
- /// Configuration key for sampler to be used for traces.
- ///
- public const string TracesSampler = "OTEL_TRACES_SAMPLER";
-
- ///
- /// Configuration key for string value to be used as the sampler argument.
- ///
- public const string TracesSamplerArguments = "OTEL_TRACES_SAMPLER_ARG";
-
///
/// Configuration keys for instrumentation options.
///
diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationTracerHelper.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationTracerHelper.cs
index 9db75043fd..46ff79c145 100644
--- a/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationTracerHelper.cs
+++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/EnvironmentConfigurationTracerHelper.cs
@@ -58,7 +58,6 @@ public static TracerProviderBuilder UseEnvironmentVariables(
}
builder
- .SetSampler(settings)
// Exporters can cause dependency loads.
// Should be called later if dependency listeners are already setup.
.SetExporter(settings, pluginManager)
@@ -89,23 +88,6 @@ private static TracerProviderBuilder AddWcfIfNeeded(
return tracerProviderBuilder;
}
- private static TracerProviderBuilder SetSampler(this TracerProviderBuilder builder, TracerSettings settings)
- {
- if (settings.TracesSampler == null)
- {
- return builder;
- }
-
- var sampler = TracerSamplerHelper.GetSampler(settings.TracesSampler, settings.TracesSamplerArguments);
-
- if (sampler == null)
- {
- return builder;
- }
-
- return builder.SetSampler(sampler);
- }
-
private static TracerProviderBuilder SetExporter(this TracerProviderBuilder builder, TracerSettings settings, PluginManager pluginManager)
{
if (settings.ConsoleExporterEnabled)
diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerSamplerHelper.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerSamplerHelper.cs
deleted file mode 100644
index 79dd2d1ba9..0000000000
--- a/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerSamplerHelper.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-using System.Globalization;
-using OpenTelemetry.Trace;
-
-namespace OpenTelemetry.AutoInstrumentation.Configurations;
-
-internal static class TracerSamplerHelper
-{
- public static Sampler? GetSampler(string tracerSampler, string? tracerSamplerArguments)
- {
- switch (tracerSampler)
- {
- case "always_on":
- return new AlwaysOnSampler();
- case "always_off":
- return new AlwaysOffSampler();
- case "traceidratio":
- return CreateTraceIdRatioBasedSampler(tracerSamplerArguments);
- case "parentbased_always_on":
- return new ParentBasedSampler(new AlwaysOnSampler());
- case "parentbased_always_off":
- return new ParentBasedSampler(new AlwaysOffSampler());
- case "parentbased_traceidratio":
- return new ParentBasedSampler(CreateTraceIdRatioBasedSampler(tracerSamplerArguments));
- }
-
- return null;
- }
-
- private static TraceIdRatioBasedSampler CreateTraceIdRatioBasedSampler(string? arguments)
- {
- const double defaultRatio = 1.0;
-
- var ratio = defaultRatio;
-
- if (double.TryParse(arguments, NumberStyles.Any, CultureInfo.InvariantCulture, out var parsedRatio)
- && parsedRatio >= 0.0 && parsedRatio <= 1.0)
- {
- ratio = parsedRatio;
- }
-
- return new TraceIdRatioBasedSampler(ratio);
- }
-}
diff --git a/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerSettings.cs b/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerSettings.cs
index 6a03d99004..37bcfbbcdc 100644
--- a/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerSettings.cs
+++ b/src/OpenTelemetry.AutoInstrumentation/Configurations/TracerSettings.cs
@@ -52,16 +52,6 @@ internal class TracerSettings : Settings
///
public InstrumentationOptions InstrumentationOptions { get; private set; } = new(new Configuration(failFast: false));
- ///
- /// Gets sampler to be used for traces.
- ///
- public string? TracesSampler { get; private set; }
-
- ///
- /// Gets a value to be used as the sampler argument.
- ///
- public string? TracesSamplerArguments { get; private set; }
-
protected override void OnLoad(Configuration configuration)
{
TracesExporter = ParseTracesExporter(configuration);
@@ -97,9 +87,6 @@ protected override void OnLoad(Configuration configuration)
OpenTracingEnabled = configuration.GetBool(ConfigurationKeys.Traces.OpenTracingEnabled) ?? false;
InstrumentationOptions = new InstrumentationOptions(configuration);
-
- TracesSampler = configuration.GetString(ConfigurationKeys.Traces.TracesSampler);
- TracesSamplerArguments = configuration.GetString(ConfigurationKeys.Traces.TracesSamplerArguments);
}
private static TracesExporter ParseTracesExporter(Configuration configuration)
diff --git a/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetInitializer.cs b/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetInitializer.cs
index 849fd052b5..62d9c59035 100644
--- a/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetInitializer.cs
+++ b/src/OpenTelemetry.AutoInstrumentation/Loading/Initializers/AspNetInitializer.cs
@@ -30,7 +30,7 @@ private void InitializeOnFirstCall(ILifespanManager lifespanManager)
var instrumentationType = Type.GetType("OpenTelemetry.Instrumentation.AspNet.AspNetInstrumentation, OpenTelemetry.Instrumentation.AspNet");
- var options = new OpenTelemetry.Instrumentation.AspNet.AspNetInstrumentationOptions();
+ var options = new OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions();
_pluginManager.ConfigureTracesOptions(options);
var instrumentation = Activator.CreateInstance(instrumentationType, args: options);
diff --git a/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj b/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj
index 796b293fce..490d7fa94e 100644
--- a/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj
+++ b/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj
@@ -70,6 +70,7 @@
+
diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt
index 1fe4eb77bd..cdd48c7318 100644
--- a/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt
+++ b/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-arm64.verified.txt
@@ -9,6 +9,7 @@
/net/Grpc.Core.Api.dll,
/net/Grpc.Net.Client.dll,
/net/Grpc.Net.Common.dll,
+ /net/Microsoft.Extensions.Diagnostics.Abstractions.dll,
/net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll,
/net/OpenTelemetry.Api.ProviderBuilderExtensions.dll,
/net/OpenTelemetry.Api.dll,
diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt
index 2952a925fb..dcd67dc894 100644
--- a/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt
+++ b/test/IntegrationTests/BuildTests.DistributionStructure_alpine-linux-x64.verified.txt
@@ -9,6 +9,7 @@
/net/Grpc.Core.Api.dll,
/net/Grpc.Net.Client.dll,
/net/Grpc.Net.Common.dll,
+ /net/Microsoft.Extensions.Diagnostics.Abstractions.dll,
/net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll,
/net/OpenTelemetry.Api.ProviderBuilderExtensions.dll,
/net/OpenTelemetry.Api.dll,
diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt
index c047b89c91..8885afc484 100644
--- a/test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt
+++ b/test/IntegrationTests/BuildTests.DistributionStructure_linux-arm64.verified.txt
@@ -9,6 +9,7 @@
/net/Grpc.Core.Api.dll,
/net/Grpc.Net.Client.dll,
/net/Grpc.Net.Common.dll,
+ /net/Microsoft.Extensions.Diagnostics.Abstractions.dll,
/net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll,
/net/OpenTelemetry.Api.ProviderBuilderExtensions.dll,
/net/OpenTelemetry.Api.dll,
diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt
index 1478539831..f9ed7bfb56 100644
--- a/test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt
+++ b/test/IntegrationTests/BuildTests.DistributionStructure_linux-x64.verified.txt
@@ -9,6 +9,7 @@
/net/Grpc.Core.Api.dll,
/net/Grpc.Net.Client.dll,
/net/Grpc.Net.Common.dll,
+ /net/Microsoft.Extensions.Diagnostics.Abstractions.dll,
/net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll,
/net/OpenTelemetry.Api.ProviderBuilderExtensions.dll,
/net/OpenTelemetry.Api.dll,
diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt
index 4ee796444e..04c174bc74 100644
--- a/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt
+++ b/test/IntegrationTests/BuildTests.DistributionStructure_osx.verified.txt
@@ -8,6 +8,7 @@
/net/Grpc.Core.Api.dll,
/net/Grpc.Net.Client.dll,
/net/Grpc.Net.Common.dll,
+ /net/Microsoft.Extensions.Diagnostics.Abstractions.dll,
/net/MongoDB.Driver.Core.Extensions.DiagnosticSources.dll,
/net/OpenTelemetry.Api.ProviderBuilderExtensions.dll,
/net/OpenTelemetry.Api.dll,
diff --git a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt
index 5d1bf294ab..9f9ef4e361 100644
--- a/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt
+++ b/test/IntegrationTests/BuildTests.DistributionStructure_windows.verified.txt
@@ -8,6 +8,7 @@
\net\Grpc.Core.Api.dll,
\net\Grpc.Net.Client.dll,
\net\Grpc.Net.Common.dll,
+ \net\Microsoft.Extensions.Diagnostics.Abstractions.dll,
\net\MongoDB.Driver.Core.Extensions.DiagnosticSources.dll,
\net\OpenTelemetry.Api.ProviderBuilderExtensions.dll,
\net\OpenTelemetry.Api.dll,
@@ -56,6 +57,7 @@
\netfx\Microsoft.Extensions.Configuration.dll,
\netfx\Microsoft.Extensions.DependencyInjection.Abstractions.dll,
\netfx\Microsoft.Extensions.DependencyInjection.dll,
+ \netfx\Microsoft.Extensions.Diagnostics.Abstractions.dll,
\netfx\Microsoft.Extensions.Logging.Abstractions.dll,
\netfx\Microsoft.Extensions.Logging.Configuration.dll,
\netfx\Microsoft.Extensions.Logging.dll,
diff --git a/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/SettingsTests.cs b/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/SettingsTests.cs
index 3a445d049a..609edad787 100644
--- a/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/SettingsTests.cs
+++ b/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/SettingsTests.cs
@@ -53,8 +53,6 @@ internal void TracerSettings_DefaultValues()
settings.EnabledInstrumentations.Should().NotBeEmpty();
settings.ActivitySources.Should().BeEquivalentTo(new List { "OpenTelemetry.AutoInstrumentation.*" });
settings.AdditionalLegacySources.Should().BeEmpty();
- settings.TracesSampler.Should().BeNull();
- settings.TracesSamplerArguments.Should().BeNull();
// Instrumentation options tests
settings.InstrumentationOptions.GraphQLSetDocument.Should().BeFalse();
@@ -252,21 +250,6 @@ internal void TracerSettings_Instrumentations_SupportedValues(string tracerInstr
settings.EnabledInstrumentations.Should().BeEquivalentTo(new List { expectedTracerInstrumentation });
}
- [Fact]
- internal void TracerSettings_TracerSampler()
- {
- const string expectedTracesSampler = nameof(expectedTracesSampler);
- const string expectedTracesSamplerArguments = nameof(expectedTracesSamplerArguments);
-
- Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.TracesSampler, expectedTracesSampler);
- Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.TracesSamplerArguments, expectedTracesSamplerArguments);
-
- var settings = Settings.FromDefaultSources(false);
-
- settings.TracesSampler.Should().Be(expectedTracesSampler);
- settings.TracesSamplerArguments.Should().Be(expectedTracesSamplerArguments);
- }
-
[Theory]
#if NETFRAMEWORK
[InlineData("ASPNET", MetricInstrumentation.AspNet)]
@@ -384,8 +367,6 @@ private static void ClearEnvVars()
}
Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.Exporter, null);
- Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.TracesSampler, null);
- Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.TracesSamplerArguments, null);
Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.InstrumentationOptions.GraphQLSetDocument, null);
Environment.SetEnvironmentVariable(ConfigurationKeys.ExporterOtlpProtocol, null);
Environment.SetEnvironmentVariable(ConfigurationKeys.FlushOnUnhandledException, null);
diff --git a/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/TracerSamplerHelperTests.cs b/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/TracerSamplerHelperTests.cs
deleted file mode 100644
index 3c7f73b1d1..0000000000
--- a/test/OpenTelemetry.AutoInstrumentation.Tests/Configurations/TracerSamplerHelperTests.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-using FluentAssertions;
-using OpenTelemetry.AutoInstrumentation.Configurations;
-using Xunit;
-
-namespace OpenTelemetry.AutoInstrumentation.Tests.Configurations;
-
-public class TracerSamplerHelperTests
-{
- [Theory]
- [InlineData("always_on", null, "AlwaysOnSampler")]
- [InlineData("always_off", null, "AlwaysOffSampler")]
- [InlineData("traceidratio", null, "TraceIdRatioBasedSampler{1.000000}")]
- [InlineData("traceidratio", "2", "TraceIdRatioBasedSampler{1.000000}")]
- [InlineData("traceidratio", "-1", "TraceIdRatioBasedSampler{1.000000}")]
- [InlineData("traceidratio", "non-a-number", "TraceIdRatioBasedSampler{1.000000}")]
- [InlineData("traceidratio", "0.25", "TraceIdRatioBasedSampler{0.250000}")]
- [InlineData("parentbased_always_on", null, "ParentBased{AlwaysOnSampler}")]
- [InlineData("parentbased_always_off", null, "ParentBased{AlwaysOffSampler}")]
- [InlineData("parentbased_traceidratio", null, "ParentBased{TraceIdRatioBasedSampler{1.000000}}")]
- [InlineData("parentbased_traceidratio", "0.25", "ParentBased{TraceIdRatioBasedSampler{0.250000}}")]
- public void GetSamplerSupportedValues(string tracesSampler, string? tracerSamplerArguments, string expectedDescription)
- {
- var sampler = TracerSamplerHelper.GetSampler(tracesSampler, tracerSamplerArguments);
-
- sampler.Should().NotBeNull();
- sampler!.Description.Should().Be(expectedDescription);
- }
-
- [Fact]
- public void GetSamplerNonSupportedValues()
- {
- var sampler = TracerSamplerHelper.GetSampler("non-supported-value", null);
-
- sampler.Should().BeNull();
- }
-}