# Available instrumentations

> OpenTelemetry .NET Automatic Instrumentation supported libraries.

---

Site [llms.txt](/pt/llms.txt)

---

The OpenTelemetry .NET Automatic Instrumentation supports a wide variety of
libraries.

## Instrumentations

All instrumentations are enabled by default for all signal types (traces,
metrics, and logs).

You can disable all instrumentations for a specific signal type by setting the
`OTEL_DOTNET_AUTO_{SIGNAL}_INSTRUMENTATION_ENABLED` environment variable to
`false`.

For a more granular approach, you can disable specific instrumentations for a
given signal type by setting the
`OTEL_DOTNET_AUTO_{SIGNAL}_{0}_INSTRUMENTATION_ENABLED` environment variable to
`false`, where `{SIGNAL}` is the type of signal, for example `TRACES`, and `{0}`
is the case-sensitive name of the instrumentation.

| Environment variable                                   | Description                                                                                                                                                                                                    | Default value                                                                          | Status                                                    |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`             | Enables all instrumentations.                                                                                                                                                                                  | `true`                                                                                 | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED`      | Enables all trace instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`.                                                                                                                      | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`         | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_{0}_INSTRUMENTATION_ENABLED`  | Configuration pattern for enabling a specific trace instrumentation, where `{0}` is the uppercase ID of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED`.   | Inherited from the current value of `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED`  | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED`     | Disables all metric instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`.                                                                                                                    | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`         | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_METRICS_{0}_INSTRUMENTATION_ENABLED` | Configuration pattern for enabling a specific metric instrumentation, where `{0}` is the uppercase ID of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED` | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED`        | Disables all log instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`.                                                                                                                       | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`         | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_LOGS_{0}_INSTRUMENTATION_ENABLED`    | Configuration pattern for enabling a specific log instrumentation, where `{0}` is the uppercase ID of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED`.       | Inherited from the current value of `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED`    | [Experimental](/docs/specs/otel/versioning-and-stability) |

## Traces instrumentations

**Status**: [Mixed](/docs/specs/otel/versioning-and-stability). Traces are
stable, but particular instrumentation libraries are in Experimental status due
to lack of stable semantic convention.

| ID                    | Instrumented library                                                                                                                                                                                                      | Supported versions     | Instrumentation type     | Status                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ------------------------ | --------------------------------------------------------- |
| `ADONET`              | ADO.NET \[1\]                                                                                                                                                                                                             | \[2\]                  | bytecode                 | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `ASPNET`              | ASP.NET (.NET Framework) MVC / WebApi \[3\] **Not supported on .NET**                                                                                                                                                     | \* \[4\]               | source & bytecode        | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `ASPNETCORE`          | ASP.NET Core **Not supported on .NET Framework**                                                                                                                                                                          | \*                     | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `AZURE`               | [Azure SDK](https://azure.github.io/azure-sdk/releases/latest/index.html)                                                                                                                                                 | \[5\]                  | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `ELASTICSEARCH`       | [Elastic.Clients.Elasticsearch](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch)                                                                                                                             | \* \[6\]               | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `ELASTICTRANSPORT`    | [Elastic.Transport](https://www.nuget.org/packages/Elastic.Transport)                                                                                                                                                     | ≥0.4.16                | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `ENTITYFRAMEWORKCORE` | [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) **Not supported on .NET Framework**                                                                                         | ≥6.0.12                | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `GRAPHQL`             | [GraphQL](https://www.nuget.org/packages/GraphQL) **Not supported on .NET Framework**                                                                                                                                     | ≥7.5.0                 | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `GRPCNETCLIENT`       | [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client)                                                                                                                                                         | ≥2.52.0 & < 3.0.0      | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `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)                           | \*                     | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `KAFKA`               | [Confluent.Kafka](https://www.nuget.org/packages/Confluent.Kafka)                                                                                                                                                         | ≥1.4.0 & < 3.0.0 \[7\] | bytecode                 | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `MASSTRANSIT`         | [MassTransit](https://www.nuget.org/packages/MassTransit) **Not supported on .NET Framework**                                                                                                                             | ≥8.0.0                 | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `MONGODB`             | [MongoDB.Driver.Core](https://www.nuget.org/packages/MongoDB.Driver.Core) / [MongoDB.Driver](https://www.nuget.org/packages/MongoDB.Driver)                                                                               | ≥2.7.0                 | source or bytecode \[8\] | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `MYSQLCONNECTOR`      | [MySqlConnector](https://www.nuget.org/packages/MySqlConnector)                                                                                                                                                           | ≥2.0.0                 | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `MYSQLDATA`           | [MySql.Data](https://www.nuget.org/packages/MySql.Data) **Not supported on .NET Framework**                                                                                                                               | ≥8.1.0                 | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `NPGSQL`              | [Npgsql](https://www.nuget.org/packages/Npgsql)                                                                                                                                                                           | ≥6.0.0                 | source & bytecode \[14\] | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `NSERVICEBUS`         | [NServiceBus](https://www.nuget.org/packages/NServiceBus)                                                                                                                                                                 | ≥8.0.0 & < 10.0.0      | source & bytecode        | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `ORACLEMDA`           | [Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core) and [Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess) **Not supported on ARM64**          | ≥23.4.0                | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `RABBITMQ`            | [RabbitMQ.Client](https://www.nuget.org/packages/RabbitMQ.Client/)                                                                                                                                                        | ≥5.0.0                 | source or bytecode \[9\] | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `QUARTZ`              | [Quartz](https://www.nuget.org/packages/Quartz) **Quartz 4.x is supported on .NET 10+ only; Quartz 3.x is not supported on .NET Framework 4.7.1 or earlier**                                                              | \[15\]                 | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `SQLCLIENT`           | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient), [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) \[10\] and `System.Data` (shipped with .NET Framework) | \* \[11\]              | source & bytecode \[12\] | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `SQLITE`              | [Microsoft.Data.Sqlite](https://www.nuget.org/packages/Microsoft.Data.Sqlite)                                                                                                                                             | ≥8.0.0 & < 12.0.0      | bytecode                 | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `STACKEXCHANGEREDIS`  | [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis)                                                                                                                                                 | \[13\]                 | source & bytecode        | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `WCFCLIENT`           | WCF                                                                                                                                                                                                                       | \*                     | source & bytecode        | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `WCFCORE`             | [CoreWCF.Primitives](https://www.nuget.org/packages/CoreWCF.Primitives) **Not supported on .NET Framework**                                                                                                               | ≥1.8.0                 | source                   | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `WCFSERVICE`          | WCF **Not supported on .NET**.                                                                                                                                                                                            | \*                     | source & bytecode        | [Experimental](/docs/specs/otel/versioning-and-stability) |

\[1\]: Generic ADO.NET instrumentation that covers `DbCommand` methods. It
covers only implementations for overridden methods. Typically, a lot of
implementations utilize the `new` C# keyword; such cases need specific
implementations. This instrumentation does not cover libraries covered by
specific instrumentations such as `SQLCLIENT`, `NPGSQL`, `MYSQLDATA`,
`MYSQLCONNECTOR`, `ORACLEMDA`, or `SQLITE`.

\[2\]: Supports `System.Data.Common` (≥4.0.0 and <12.0.0), `System.Data` for
.NET Framework (≥2.0.0 and <5.0.0), and `netstandard` (≥2.0.0 and <3.0.0).

\[3\]: Only integrated pipeline mode is supported.

\[4\]: `ASP.NET (.NET Framework) MVC / WebApi` is not supported on ARM64.

\[5\]: `Azure.` prefixed packages, released after October 1, 2021.

\[6\]: `Elastic.Clients.Elasticsearch` version ≥8.0.0 and <8.10.0. Version
≥8.10.0 is supported by `Elastic.Transport` instrumentation.

\[7\]: `Confluent.Kafka` is supported from version ≥1.8.2 on ARM64 for Windows
and Linux, and ≥1.9.2 on macOS.

\[8\]: `MongoDB.Driver` needs bytecode instrumentation only for < `3.7.0`
versions; `3.7.0+` uses only source instrumentation.

\[9\]: `RabbitMq.Client` needs bytecode instrumentation only for `5.*` and `6.*`
versions, `7.0.0+` uses only source instrumentation.

\[10\]: `System.Data.SqlClient` is
[deprecated](https://www.nuget.org/packages/System.Data.SqlClient/4.9.0#readme-body-tab).

\[11\]: `Microsoft.Data.SqlClient` v3.\* is not supported on .NET Framework, due
to [issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/4243).
`System.Data.SqlClient` is supported from version 4.8.5.

\[12\]: Bytecode instrumentation is used only for context propagation,
configurable by
`OTEL_DOTNET_EXPERIMENTAL_SQLCLIENT_ENABLE_TRACE_CONTEXT_PROPAGATION`.

\[13\]: `StackExchange.Redis` versions ≥2.6.122 and <4.0.0 are supported on
.NET, and versions ≥2.6.122 and <3.0.0 are supported on .NET Framework.

\[14\]: Bytecode instrumentation is used only for context propagation,
configurable by `OTEL_DOTNET_AUTO_NPGSQL_CONTEXT_PROPAGATION`.

\[15\]: `Quartz` versions ≥3.4.0 and <4.0.0 are supported, but support for
Quartz 3.x is deprecated. Versions ≥4.0.0 are supported on .NET 10+ only.

## Metrics instrumentations

**Status**: [Mixed](/docs/specs/otel/versioning-and-stability). Metrics are
stable, but particular instrumentation are in Experimental status 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.19.0/src/OpenTelemetry.Instrumentation.AspNet/README.md#list-of-metrics-produced)              | \*                 | source & bytecode    | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `ASPNETCORE`  | ASP.NET Core **Not supported on .NET Framework**                                                                                                                                                                         | [ASP.NET Core metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNetCore-1.19.0/src/OpenTelemetry.Instrumentation.AspNetCore/README.md#list-of-metrics-produced) | \*                 | source               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `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-contrib/blob/Instrumentation.Http-1.19.0/src/OpenTelemetry.Instrumentation.Http/README.md#list-of-metrics-produced)               | \*                 | source               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `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.19.0/src/OpenTelemetry.Instrumentation.Runtime/README.md#metrics)                             | \*                 | source               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `NPGSQL`      | [Npgsql](https://www.nuget.org/packages/Npgsql) **Not supported on .NET Framework**                                                                                                                                      | [Npgsql metrics](https://www.npgsql.org/doc/diagnostics/metrics.html)                                                                                                                                         | ≥6.0.0             | source               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `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 & < 10.0.0  | source & bytecode    | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `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-1.19.0-rc.1/src/OpenTelemetry.Instrumentation.Process/README.md#metrics)                        | \*                 | source               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `QUARTZ`      | [Quartz](https://www.nuget.org/packages/Quartz) **Supported on .NET 10+ only**                                                                                                                                           | [Quartz metrics](https://www.quartz-scheduler.net/documentation/quartz-4.x/packages/opentelemetry-integration.html#metrics)                                                                                   | ≥4.0.0             | source               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `SQLCLIENT`   | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient), [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) \[2\] and `System.Data` (shipped with .NET Framework) | [SqlClient metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/releases/tag/Instrumentation.SqlClient-1.19.0)                                                                             | \* \[3\]           | source               | [Experimental](/docs/specs/otel/versioning-and-stability) |

\[1\]: The ASP.NET metrics are generated only if the `AspNet` trace
instrumentation is also enabled.

\[2\]: `System.Data.SqlClient` is
[deprecated](https://www.nuget.org/packages/System.Data.SqlClient/4.9.0#readme-body-tab).

\[3\]: `Microsoft.Data.SqlClient` v3.\* is not supported on .NET Framework, due
to [issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/4243).
`System.Data.SqlClient` is supported from version 4.8.5.

## Logs instrumentations

**Status**: [Experimental](/docs/specs/otel/versioning-and-stability).

| ID        | Instrumented library                                                                                                            | Supported versions | Instrumentation type     | Status                                                    |
| --------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------------------ | --------------------------------------------------------- |
| `ILOGGER` | [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) **Not supported on .NET Framework** | ≥8.0.0 && < 12.0.0 | bytecode or source \[1\] | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `LOG4NET` | [log4net](https://www.nuget.org/packages/log4net) \[2\]                                                                         | ≥2.0.13 && < 4.0.0 | bytecode                 | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `NLOG`    | [NLog](https://www.nuget.org/packages/NLog) \[2\]                                                                               | ≥5.0.0 && < 7.0.0  | bytecode                 | [Experimental](/docs/specs/otel/versioning-and-stability) |

\[1\]: For ASP.NET Core applications, the `LoggingBuilder` instrumentation can
be enabled without using the .NET CLR Profiler by setting the
`ASPNETCORE_HOSTINGSTARTUPASSEMBLIES` environment variable to
`OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper`.

\[2\]: Instrumentation provides both trace context injection and logs bridge.

### Instrumentation options

| Environment variable                                                              | Description                                                                                                                                                                                                                                                                                          | Default value | Status                                                    |
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | --------------------------------------------------------- |
| `OTEL_DOTNET_AUTO_ENTITYFRAMEWORKCORE_SET_DBSTATEMENT_FOR_TEXT`                   | Whether the Entity Framework Core instrumentation can pass SQL statements through the `db.statement` attribute. Queries might contain sensitive information. If set to `false`, `db.statement` is recorded only for executing stored procedures.                                                     | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_GRAPHQL_SET_DOCUMENT`                                           | Whether the GraphQL instrumentation can pass raw queries through the `graphql.document` attribute. Queries might contain sensitive information.                                                                                                                                                      | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_NPGSQL_CONTEXT_PROPAGATION`                                     | Whether the Npgsql instrumentation propagates the W3C traceparent to PostgreSQL through `application_name` for non-multiplexed commands and Npgsql 10 COPY operations. \[3\]                                                                                                                         | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_ORACLEMDA_DATABASE_OPENTELEMETRY_TRACING`                       | Whether the Oracle Client instrumentation enables database OpenTelemetry tracing and propagates context to the server. \[1\]                                                                                                                                                                         | `true`        | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_ORACLEMDA_SET_DBSTATEMENT_FOR_TEXT`                             | Whether the Oracle Client instrumentation can pass SQL statements through the `db.statement` attribute. Queries might contain sensitive information. If set to `false`, `db.statement` is recorded only for executing stored procedures.                                                             | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_SQLCLIENT_SET_DBSTATEMENT_FOR_TEXT`                             | Whether the SQL Client instrumentation can pass SQL statements through the `db.statement` attribute. Queries might contain sensitive information. If set to `false`, `db.statement` is recorded only for executing stored procedures. **Not supported on .NET Framework for System.Data.SqlClient.** | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS`          | A comma-separated list of HTTP header names. ASP.NET instrumentations will capture HTTP request header values for all configured header names.                                                                                                                                                       |               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS`         | A comma-separated list of HTTP header names. ASP.NET instrumentations will capture HTTP response header values for all configured header names. **Not supported on IIS Classic mode.**                                                                                                               |               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS`      | A comma-separated list of HTTP header names. ASP.NET Core instrumentations will capture HTTP request header values for all configured header names.                                                                                                                                                  |               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS`     | A comma-separated list of HTTP header names. ASP.NET Core instrumentations will capture HTTP response header values for all configured header names.                                                                                                                                                 |               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_GRPCNETCLIENT_INSTRUMENTATION_CAPTURE_REQUEST_METADATA`  | A comma-separated list of gRPC metadata names. Grpc.Net.Client instrumentations will capture gRPC request metadata values for all configured metadata names.                                                                                                                                         |               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_GRPCNETCLIENT_INSTRUMENTATION_CAPTURE_RESPONSE_METADATA` | A comma-separated list of gRPC metadata names. Grpc.Net.Client instrumentations will capture gRPC response metadata values for all configured metadata names.                                                                                                                                        |               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_HTTP_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS`            | A comma-separated list of HTTP header names. HTTP Client instrumentations will capture HTTP request header values for all configured header names.                                                                                                                                                   |               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_TRACES_HTTP_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS`           | A comma-separated list of HTTP header names. HTTP Client instrumentations will capture HTTP response header values for all configured header names.                                                                                                                                                  |               | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_DISABLE_URL_QUERY_REDACTION`                 | Whether the ASP.NET Core instrumentation turns off redaction of the `url.query` attribute value.                                                                                                                                                                                                     | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_EXPERIMENTAL_HTTPCLIENT_DISABLE_URL_QUERY_REDACTION`                 | Whether the HTTP client instrumentation turns off redaction of the `url.full` attribute value.                                                                                                                                                                                                       | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_EXPERIMENTAL_ASPNET_DISABLE_URL_QUERY_REDACTION`                     | Whether the ASP.NET instrumentation turns off redaction of the `url.query` attribute value.                                                                                                                                                                                                          | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_EXPERIMENTAL_SQLCLIENT_ENABLE_TRACE_CONTEXT_PROPAGATION`             | .NET Framework only. Whether the `SQLCLIENT` instrumentation turns on context propagation to the SQL Server.                                                                                                                                                                                         | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |
| `OTEL_DOTNET_AUTO_SQLCLIENT_NETFX_ILREWRITE_ENABLED`                              | \[2\]                                                                                                                                                                                                                                                                                                | `false`       | [Experimental](/docs/specs/otel/versioning-and-stability) |

\[1\]: This feature is supported only by packages `23.26.200` and newer. It also
requires an Oracle AI Database 26ai server.

\[2\]: Enables IL rewriting of `SqlCommand` on .NET Framework to ensure
`CommandText` is present for `SqlClient` instrumentation, which is required for
`db.query.text` and `db.query.summary` to be populated. Previously,
`CommandText` was only available for stored procedures. With this setting
enabled, it is also available for raw queries. This changes the behavior of
events emitted by the
[`SqlEventSource`](https://github.com/dotnet/SqlClient/blob/v1.0.19239.1/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs#L6369),
which might impact other parts of the application if this mechanism is used.

\[3\]: The OpenTelemetry Collector Contrib PostgreSQL receiver exposes the value
as `postgresql.application_name` on its
[`db.server.query_sample` event](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/42f949127580c0d00088b785cd0b35842dc0ddb8/receiver/postgresqlreceiver/metadata.yaml).
Query-sample collection is disabled by default and requires `pg_monitor`; see
the
[pinned receiver configuration](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/42f949127580c0d00088b785cd0b35842dc0ddb8/receiver/postgresqlreceiver/README.md).
Propagation executes `SET application_name` through Npgsql's synchronous
[`ExecuteInternalCommand` path](https://github.com/npgsql/npgsql/blob/d3768398c17877b3a916c3c4d87e8e11698991fc/src/Npgsql/Internal/NpgsqlConnector.cs#L2864-L2875)
before each traced operation. Npgsql flushes that command and waits for its
`CommandComplete` and `ReadyForQuery` responses, so propagation adds one
database round trip per traced operation. It does not alter, prefix, or combine
the application's SQL. As Npgsql ends the user action, while it still owns the
connector, the instrumentation executes `RESET application_name` through the
same path. This adds one cleanup round trip per propagated operation and resets
the value to the session default configured when the connection was opened
before control returns to the caller or the connector can be used for another
operation. PostgreSQL
[`RESET`](https://www.postgresql.org/docs/18/sql-reset.html) does not restore a
value assigned later with `SET`; enabling this option can therefore overwrite
changes made by application code to `application_name` at runtime. See Npgsql's
[`EndUserAction` lifecycle](https://github.com/npgsql/npgsql/blob/d3768398c17877b3a916c3c4d87e8e11698991fc/src/Npgsql/Internal/NpgsqlConnector.cs#L2687-L2724).
These internal commands use PostgreSQL's Simple Query flow, which discards the
previous unnamed statement and portal; Npgsql's explicitly prepared and
automatically prepared statements are named and remain associated with the
physical connection. See the PostgreSQL
[extended-query protocol rules](https://www.postgresql.org/docs/17/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY)
and Npgsql's
[prepared-statement documentation](https://www.npgsql.org/doc/prepare.html).
Because `SET` and `RESET` are real PostgreSQL statements, an observer polling
during their short execution can theoretically sample them. Cleanup is deferred
while a transaction is failed so that `ROLLBACK` can run first, then executed as
the recovery action ends successfully. Npgsql 10+ COPY operations are covered
through its
[`TraceCopyStart` lifecycle](https://github.com/npgsql/npgsql/blob/d3768398c17877b3a916c3c4d87e8e11698991fc/src/Npgsql/Internal/NpgsqlConnector.cs#L2964-L2980).
Multiplexing is not supported: `application_name` is physical-session state,
while Npgsql can write multiple logical commands to the same connector in one
[multiplexing loop](https://github.com/npgsql/npgsql/blob/d3768398c17877b3a916c3c4d87e8e11698991fc/src/Npgsql/MultiplexingDataSource.cs#L176-L199).
The instrumentation safely skips propagation and logs one warning when it
detects a multiplexed connector.
