Skip to content

Commit

Permalink
Elastic.Transport traces instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek committed Oct 9, 2023
1 parent 67681b9 commit a857aab
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h

### Added

- Added support `Elastic.Clients.Elasticsearch` traces instrumentation 8.10.0+.
- Added support for `Elastic.Transport` traces instrumentation 0.4.16+.
`Elastic.Clients.Elasticsearch` 8.10.0+ traces instrumentation is covered by
`Elastic.Transport` traces instrumentation.

### Changed

Expand Down
10 changes: 7 additions & 3 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ due to lack of stable semantic convention.
| `ASPNET` | ASP.NET (.NET Framework) MVC / WebApi \[1\] **Not supported on .NET** | * | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `ASPNETCORE` | ASP.NET Core **Not supported on .NET Framework** | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `AZURE` | [Azure SDK](https://azure.github.io/azure-sdk/releases/latest/index.html) | \[2\] | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `ELASTICSEARCH` | [Elastic.Clients.Elasticsearch](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch) | ≥8.0.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `ELASTICSEARCH` | [Elastic.Clients.Elasticsearch](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch) | * \[3\] | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `ELASTICTRANSPORT` | [Elastic.Transport](https://www.nuget.org/packages/Elastic.Transport) | ≥0.4.16 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `ENTITYFRAMEWORKCORE` | [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/) **Not supported on .NET Framework** | ≥6.0.12 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `GRAPHQL` | [GraphQL](https://www.nuget.org/packages/GraphQL) **Not supported on .NET Framework** | ≥7.5.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `GRPCNETCLIENT` | [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) | ≥2.52.0 & < 3.0.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
Expand All @@ -141,7 +142,7 @@ due to lack of stable semantic convention.
| `MYSQLDATA` | [MySql.Data](https://www.nuget.org/packages/MySql.Data) **Not supported on .NET Framework** | ≥8.1.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `NPGSQL` | [Npgsql](https://www.nuget.org/packages/Npgsql) | ≥6.0.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `NSERVICEBUS` | [NServiceBus](https://www.nuget.org/packages/NServiceBus) | ≥8.0.0 | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `SQLCLIENT` | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | * \[3\] | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `SQLCLIENT` | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | * \[4\] | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `STACKEXCHANGEREDIS` | [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis) **Not supported on .NET Framework** | ≥2.0.405 < 3.0.0 | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `WCFCLIENT` | WCF | * | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
| `WCFSERVICE` | WCF **Not supported on .NET**. | * | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
Expand All @@ -150,7 +151,10 @@ due to lack of stable semantic convention.

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

\[3\]: Microsoft.Data.SqlClient v3.* is not supported on .NET Framework, due to [issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/4243).
\[3\]: `Elastic.Clients.Elasticsearch` version ≥8.0.0 and <8.10.0.
Version ≥8.10.0 is supported by `Elastic.Transport` instrumentation.

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

### Metrics instrumentations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public static TracerProviderBuilder UseEnvironmentVariables(
TracerInstrumentation.Npgsql => builder.AddSource("Npgsql"),
TracerInstrumentation.SqlClient => Wrappers.AddSqlClientInstrumentation(builder, pluginManager, lazyInstrumentationLoader),
TracerInstrumentation.NServiceBus => builder.AddSource("NServiceBus.Core"),
TracerInstrumentation.Elasticsearch => builder.AddSource("Elastic.Clients.Elasticsearch.ElasticsearchClient").AddSource("Elastic.Transport"),
TracerInstrumentation.Elasticsearch => builder.AddSource("Elastic.Clients.Elasticsearch.ElasticsearchClient"),
TracerInstrumentation.ElasticTransport => builder.AddSource("Elastic.Transport"),
TracerInstrumentation.Quartz => Wrappers.AddQuartzInstrumentation(builder, pluginManager, lazyInstrumentationLoader),
TracerInstrumentation.MongoDB => builder.AddSource("MongoDB.Driver.Core.Extensions.DiagnosticSources"),
TracerInstrumentation.MySqlConnector => builder.AddSource("MySqlConnector"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,10 @@ internal enum TracerInstrumentation
/// <summary>
/// Azure SDK instrumentation.
/// </summary>
Azure = 18
Azure = 18,

/// <summary>
/// Elastic.Transport instrumentation.
/// </summary>
ElasticTransport = 19,
}
2 changes: 2 additions & 0 deletions src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ private static void AddLazilyLoadedTraceInstrumentations(LazyInstrumentationLoad
break;
case TracerInstrumentation.Elasticsearch:
break;
case TracerInstrumentation.ElasticTransport:
break;
case TracerInstrumentation.MySqlConnector:
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ internal void Propagators_FailFast()
[InlineData("WCFCLIENT", TracerInstrumentation.WcfClient)]
[InlineData("MYSQLCONNECTOR", TracerInstrumentation.MySqlConnector)]
[InlineData("AZURE", TracerInstrumentation.Azure)]
[InlineData("ELASTICTRANSPORT", TracerInstrumentation.ElasticTransport)]
internal void TracerSettings_Instrumentations_SupportedValues(string tracerInstrumentation, TracerInstrumentation expectedTracerInstrumentation)
{
Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.TracesInstrumentationEnabled, "false");
Expand Down

0 comments on commit a857aab

Please sign in to comment.