Bump OpenTelemetry to 1.6.0 (#2925)
* Bump OpenTelemetry from 1.5.1 to 1.6.0 Bumps [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet) from 1.5.1 to 1.6.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-dotnet/compare/core-1.5.1...core-1.6.0) --- updated-dependencies: - dependency-name: OpenTelemetry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump OpenTelemetry.Exporter.OpenTelemetryProtocol from 1.5.1 to 1.6.0 Bumps [OpenTelemetry.Exporter.OpenTelemetryProtocol](https://github.com/open-telemetry/opentelemetry-dotnet) from 1.5.1 to 1.6.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-dotnet/compare/core-1.5.1...core-1.6.0) --- updated-dependencies: - dependency-name: OpenTelemetry.Exporter.OpenTelemetryProtocol dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump OpenTelemetry.Exporter.Zipkin from 1.5.1 to 1.6.0 Bumps [OpenTelemetry.Exporter.Zipkin](https://github.com/open-telemetry/opentelemetry-dotnet) from 1.5.1 to 1.6.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-dotnet/compare/core-1.5.1...core-1.6.0) --- updated-dependencies: - dependency-name: OpenTelemetry.Exporter.Zipkin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump OpenTelemetry.Extensions.Propagators from 1.5.1 to 1.6.0 Bumps [OpenTelemetry.Extensions.Propagators](https://github.com/open-telemetry/opentelemetry-dotnet) from 1.5.1 to 1.6.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-dotnet/compare/core-1.5.1...core-1.6.0) --- updated-dependencies: - dependency-name: OpenTelemetry.Extensions.Propagators dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump OpenTelemetry.Api from 1.5.1 to 1.6.0 Bumps [OpenTelemetry.Api](https://github.com/open-telemetry/opentelemetry-dotnet) from 1.5.1 to 1.6.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-dotnet/compare/core-1.5.1...core-1.6.0) --- updated-dependencies: - dependency-name: OpenTelemetry.Api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump OpenTelemetry.Exporter.Console from 1.5.1 to 1.6.0 Bumps [OpenTelemetry.Exporter.Console](https://github.com/open-telemetry/opentelemetry-dotnet) from 1.5.1 to 1.6.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-dotnet/compare/core-1.5.1...core-1.6.0) --- updated-dependencies: - dependency-name: OpenTelemetry.Exporter.Console dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump OpenTelemetry.Shims.OpenTracing from 1.5.0-beta.1 to 1.6.0-beta.1 * Cleanup OTLP protocol references * Fix OpenTracing Shim integration * Bump OpenTelemetry.Exporter.Prometheus.HttpListener to 1.6.0-rc.1 * Changelog + documentation * Fix Quartz and MassTransit tests --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
afefa2cac8
commit
82b5624d8b
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -7,6 +7,12 @@ 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.0.0-rc.2...HEAD)
|
## [Unreleased](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/compare/v1.0.0-rc.2...HEAD)
|
||||||
|
|
||||||
|
This release 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.6.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.6.0)
|
||||||
|
- `System.Diagnostics.DiagnosticSource`: [`7.0.2`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.2)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Added support for Azure SDK traces instrumentation on .NET Framework.
|
- Added support for Azure SDK traces instrumentation on .NET Framework.
|
||||||
|
@ -14,8 +20,12 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||||
|
[`1.6.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.6.0).
|
||||||
- [MySql.Data](https://www.nuget.org/packages/MySql.Data/) instrumentation is now
|
- [MySql.Data](https://www.nuget.org/packages/MySql.Data/) instrumentation is now
|
||||||
supported from version 8.1.0 working on .NET.
|
supported from version 8.1.0 working on .NET.
|
||||||
|
- OpenTracing spans are registered under `opentracing-shim` name
|
||||||
|
instead of `OpenTelemetry.AutoInstrumentation.OpenTracingShim`.
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.1.1" />
|
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.1.1" />
|
||||||
<PackageVersion Include="MinVer" Version="4.3.0" />
|
<PackageVersion Include="MinVer" Version="4.3.0" />
|
||||||
<PackageVersion Include="OpenTelemetry" Version="1.5.1" />
|
<PackageVersion Include="OpenTelemetry" Version="1.6.0" />
|
||||||
<PackageVersion Include="OpenTelemetry.Api" Version="1.5.1" />
|
<PackageVersion Include="OpenTelemetry.Api" Version="1.6.0" />
|
||||||
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.5.1" />
|
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.6.0" />
|
||||||
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.5.1" />
|
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.6.0" />
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.5.1-beta.1" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.5.1-beta.1" />
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Wcf" Version="1.0.0-rc.12" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.Wcf" Version="1.0.0-rc.12" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
1
LICENSE
1
LICENSE
|
@ -227,7 +227,6 @@ Libraries
|
||||||
- OpenTelemetry.Api.ProviderBuilderExtensions,
|
- OpenTelemetry.Api.ProviderBuilderExtensions,
|
||||||
- OpenTelemetry.Exporter.Console,
|
- OpenTelemetry.Exporter.Console,
|
||||||
- OpenTelemetry.Exporter.OpenTelemetryProtocol,
|
- OpenTelemetry.Exporter.OpenTelemetryProtocol,
|
||||||
- OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs,
|
|
||||||
- OpenTelemetry.Exporter.Prometheus.HttpListener,
|
- OpenTelemetry.Exporter.Prometheus.HttpListener,
|
||||||
- OpenTelemetry.Exporter.Zipkin,
|
- OpenTelemetry.Exporter.Zipkin,
|
||||||
- OpenTelemetry.Extensions.Propagators,
|
- OpenTelemetry.Extensions.Propagators,
|
||||||
|
|
|
@ -41,8 +41,8 @@ OpenTelemetry .NET Automatic Instrumentation is built on top of
|
||||||
[OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):
|
[OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):
|
||||||
|
|
||||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||||
[`1.5.1`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.5.1)
|
[`1.6.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.6.0)
|
||||||
- `System.Diagnostics.DiagnosticSource`: [`7.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.0)
|
- `System.Diagnostics.DiagnosticSource`: [`7.0.2`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.2)
|
||||||
referencing `System.Runtime.CompilerServices.Unsafe`: [`6.0.0`](https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe/6.0.0)
|
referencing `System.Runtime.CompilerServices.Unsafe`: [`6.0.0`](https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe/6.0.0)
|
||||||
|
|
||||||
You can find all references in
|
You can find all references in
|
||||||
|
|
|
@ -12,7 +12,7 @@ To create your custom traces manually, follow these steps:
|
||||||
1. Add the `System.Diagnostics.DiagnosticSource` dependency to your project:
|
1. Add the `System.Diagnostics.DiagnosticSource` dependency to your project:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="7.0.0" />
|
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="7.0.2" />
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Create an `ActivitySource` instance:
|
2. Create an `ActivitySource` instance:
|
||||||
|
@ -48,7 +48,7 @@ To create your custom metrics manually, follow these steps:
|
||||||
1. Add the `System.Diagnostics.DiagnosticSource` dependency to your project:
|
1. Add the `System.Diagnostics.DiagnosticSource` dependency to your project:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="7.0.0" />
|
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="7.0.2" />
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Create a `Meter` instance:
|
2. Create a `Meter` instance:
|
||||||
|
|
|
@ -108,9 +108,9 @@ public class MyPlugin
|
||||||
|
|
||||||
| Options type | NuGet package | NuGet version |
|
| Options type | NuGet package | NuGet version |
|
||||||
|-------------------------------------------------------------------------------------------|---------------------------------------------------|---------------|
|
|-------------------------------------------------------------------------------------------|---------------------------------------------------|---------------|
|
||||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.5.1 |
|
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.6.0 |
|
||||||
| OpenTelemetry.Exporter.ZipkinExporterOptions | OpenTelemetry.Exporter.Zipkin | 1.5.1 |
|
| OpenTelemetry.Exporter.ZipkinExporterOptions | OpenTelemetry.Exporter.Zipkin | 1.6.0 |
|
||||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.5.1 |
|
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.6.0 |
|
||||||
| OpenTelemetry.Instrumentation.AspNet.AspNetInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.0.0-rc9.9 |
|
| OpenTelemetry.Instrumentation.AspNet.AspNetInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.0.0-rc9.9 |
|
||||||
| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.5.1-beta.1 |
|
| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.5.1-beta.1 |
|
||||||
| OpenTelemetry.Instrumentation.EntityFrameworkCore.EntityFrameworkInstrumentationOptions | OpenTelemetry.Instrumentation.EntityFrameworkCore | 1.0.0-beta.7 |
|
| OpenTelemetry.Instrumentation.EntityFrameworkCore.EntityFrameworkInstrumentationOptions | OpenTelemetry.Instrumentation.EntityFrameworkCore | 1.0.0-beta.7 |
|
||||||
|
@ -119,16 +119,16 @@ public class MyPlugin
|
||||||
| OpenTelemetry.Instrumentation.Quartz.QuartzInstrumentationOptions | OpenTelemetry.Instrumentation.Quartz | 1.0.0-alpha.3 |
|
| OpenTelemetry.Instrumentation.Quartz.QuartzInstrumentationOptions | OpenTelemetry.Instrumentation.Quartz | 1.0.0-alpha.3 |
|
||||||
| OpenTelemetry.Instrumentation.SqlClient.SqlClientInstrumentationOptions | OpenTelemetry.Instrumentation.SqlClient | 1.5.1-beta.1 |
|
| OpenTelemetry.Instrumentation.SqlClient.SqlClientInstrumentationOptions | OpenTelemetry.Instrumentation.SqlClient | 1.5.1-beta.1 |
|
||||||
| OpenTelemetry.Instrumentation.StackExchangeRedis.StackExchangeRedisInstrumentationOptions | OpenTelemetry.Instrumentation.StackExchangeRedis | 1.0.0-rc9.10 |
|
| OpenTelemetry.Instrumentation.StackExchangeRedis.StackExchangeRedisInstrumentationOptions | OpenTelemetry.Instrumentation.StackExchangeRedis | 1.0.0-rc9.10 |
|
||||||
| OpenTelemetry.Instrumentation.Wcf.WcfInstrumentationOptions | OpenTelemetry.Instrumentation.Wcf | 1.0.0-rc.10 |
|
| OpenTelemetry.Instrumentation.Wcf.WcfInstrumentationOptions | OpenTelemetry.Instrumentation.Wcf | 1.0.0-rc.12 |
|
||||||
|
|
||||||
### Metrics
|
### Metrics
|
||||||
|
|
||||||
| Options type | NuGet package | NuGet version |
|
| Options type | NuGet package | NuGet version |
|
||||||
|----------------------------------------------------------------------------------|------------------------------------------------|---------------|
|
|----------------------------------------------------------------------------------|------------------------------------------------|---------------|
|
||||||
| OpenTelemetry.Metrics.MetricReaderOptions | OpenTelemetry | 1.5.1 |
|
| OpenTelemetry.Metrics.MetricReaderOptions | OpenTelemetry | 1.6.0 |
|
||||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.5.1 |
|
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.6.0 |
|
||||||
| OpenTelemetry.Exporter.PrometheusExporterOptions | OpenTelemetry.Exporter.Prometheus.HttpListener | 1.5.0-rc.1 |
|
| OpenTelemetry.Exporter.PrometheusExporterOptions | OpenTelemetry.Exporter.Prometheus.HttpListener | 1.6.0-rc.1 |
|
||||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.5.1 |
|
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.6.0 |
|
||||||
| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreMetricsInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.5.1-beta.1 |
|
| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreMetricsInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.5.1-beta.1 |
|
||||||
| OpenTelemetry.Instrumentation.Runtime.RuntimeInstrumentationOptions | OpenTelemetry.Instrumentation.Runtime | 1.5.1 |
|
| OpenTelemetry.Instrumentation.Runtime.RuntimeInstrumentationOptions | OpenTelemetry.Instrumentation.Runtime | 1.5.1 |
|
||||||
|
|
||||||
|
@ -136,9 +136,9 @@ public class MyPlugin
|
||||||
|
|
||||||
| Options type | NuGet package | NuGet version |
|
| Options type | NuGet package | NuGet version |
|
||||||
|-----------------------------------------------|----------------------------------------------|---------------|
|
|-----------------------------------------------|----------------------------------------------|---------------|
|
||||||
| OpenTelemetry.Logs.OpenTelemetryLoggerOptions | OpenTelemetry | 1.5.0-rc.1 |
|
| OpenTelemetry.Logs.OpenTelemetryLoggerOptions | OpenTelemetry | 1.6.0 |
|
||||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.5.1 |
|
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.6.0 |
|
||||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.5.1 |
|
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.6.0 |
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,10 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- Versions from OpenTelemetry.AutoInstrumentation.csproj -->
|
<!-- Versions from OpenTelemetry.AutoInstrumentation.csproj -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!--Grpc.Net.Client is added here to force update version t0 2.52.0. It should be removed when we upgrade OTel to 1.6.0 -->
|
|
||||||
<PackageVersion Include="Grpc.Net.Client" Version="2.52.0" />
|
|
||||||
<PackageVersion Include="MongoDB.Driver.Core.Extensions.DiagnosticSources" Version="1.3.0" />
|
<PackageVersion Include="MongoDB.Driver.Core.Extensions.DiagnosticSources" Version="1.3.0" />
|
||||||
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs" Version="1.5.0-rc.1" />
|
<PackageVersion Include="OpenTelemetry.Exporter.Prometheus.HttpListener" Version="1.6.0-rc.1" />
|
||||||
<PackageVersion Include="OpenTelemetry.Exporter.Prometheus.HttpListener" Version="1.5.0-rc.1" />
|
<PackageVersion Include="OpenTelemetry.Exporter.Zipkin" Version="1.6.0" />
|
||||||
<PackageVersion Include="OpenTelemetry.Exporter.Zipkin" Version="1.5.1" />
|
<PackageVersion Include="OpenTelemetry.Extensions.Propagators" Version="1.6.0" />
|
||||||
<PackageVersion Include="OpenTelemetry.Extensions.Propagators" Version="1.5.1" />
|
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNet" Version="1.0.0-rc9.9" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNet" Version="1.0.0-rc9.9" />
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.5.1-beta.1" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.5.1-beta.1" />
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.7" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.7" />
|
||||||
|
@ -28,7 +25,7 @@
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.5.1" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.5.1" />
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.5.1-beta.1" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.5.1-beta.1" />
|
||||||
<PackageVersion Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc9.10" />
|
<PackageVersion Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc9.10" />
|
||||||
<PackageVersion Include="OpenTelemetry.Shims.OpenTracing" Version="1.5.0-beta.1" />
|
<PackageVersion Include="OpenTelemetry.Shims.OpenTracing" Version="1.6.0-beta.1" />
|
||||||
<PackageVersion Include="OpenTelemetry.ResourceDetectors.Azure" Version="1.0.0-beta.2" />
|
<PackageVersion Include="OpenTelemetry.ResourceDetectors.Azure" Version="1.0.0-beta.2" />
|
||||||
<PackageVersion Include="OpenTelemetry.ResourceDetectors.Container" Version="1.0.0-beta.4" />
|
<PackageVersion Include="OpenTelemetry.ResourceDetectors.Container" Version="1.0.0-beta.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -64,6 +64,11 @@ internal static class EnvironmentConfigurationTracerHelper
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings.OpenTracingEnabled)
|
||||||
|
{
|
||||||
|
builder.AddOpenTracingShimSource();
|
||||||
|
}
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.SetSampler(settings)
|
.SetSampler(settings)
|
||||||
// Exporters can cause dependency loads.
|
// Exporters can cause dependency loads.
|
||||||
|
|
|
@ -19,7 +19,6 @@ using OpenTelemetry.AutoInstrumentation.Diagnostics;
|
||||||
using OpenTelemetry.AutoInstrumentation.Loading;
|
using OpenTelemetry.AutoInstrumentation.Loading;
|
||||||
using OpenTelemetry.AutoInstrumentation.Logging;
|
using OpenTelemetry.AutoInstrumentation.Logging;
|
||||||
using OpenTelemetry.AutoInstrumentation.Plugins;
|
using OpenTelemetry.AutoInstrumentation.Plugins;
|
||||||
using OpenTelemetry.Context.Propagation;
|
|
||||||
using OpenTelemetry.Metrics;
|
using OpenTelemetry.Metrics;
|
||||||
using OpenTelemetry.Shims.OpenTracing;
|
using OpenTelemetry.Shims.OpenTracing;
|
||||||
using OpenTelemetry.Trace;
|
using OpenTelemetry.Trace;
|
||||||
|
@ -200,7 +199,7 @@ internal static class Instrumentation
|
||||||
|
|
||||||
if (TracerSettings.Value.OpenTracingEnabled)
|
if (TracerSettings.Value.OpenTracingEnabled)
|
||||||
{
|
{
|
||||||
EnableOpenTracing();
|
OpenTracingHelper.EnableOpenTracing(_tracerProvider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,43 +403,4 @@ internal static class Instrumentation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void EnableOpenTracing()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (_tracerProvider is not null)
|
|
||||||
{
|
|
||||||
const string OpenTracingShimActivitySourceName = "OpenTelemetry.AutoInstrumentation.OpenTracingShim";
|
|
||||||
|
|
||||||
// Instantiate the OpenTracing shim. The underlying OpenTelemetry tracer will create
|
|
||||||
// spans using the OpenTracingShimActivitySourceName source.
|
|
||||||
var openTracingShim = new TracerShim(
|
|
||||||
_tracerProvider.GetTracer(OpenTracingShimActivitySourceName),
|
|
||||||
Propagators.DefaultTextMapPropagator);
|
|
||||||
|
|
||||||
// This registration must occur prior to any reference to the OpenTracing tracer:
|
|
||||||
// otherwise the no-op tracer is going to be used by OpenTracing instead.
|
|
||||||
if (GlobalTracer.RegisterIfAbsent(openTracingShim))
|
|
||||||
{
|
|
||||||
Logger.Information("OpenTracingShim registered as the OpenTracing global tracer.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Logger.Error(
|
|
||||||
"OpenTracingShim could not be registered as the OpenTracing global tracer." +
|
|
||||||
"Another tracer was already registered. OpenTracing signals will not be captured.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Logger.Information("OpenTracingShim was not loaded as the provider is not initialized.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Logger.Error(ex, "OpenTracingShim exception.");
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,9 +51,6 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
|
||||||
<!--Grpc.Net.Client is added here to force update version t0 2.52.0. It should be removed when we upgrade OTel to 1.6.0 -->
|
|
||||||
<PackageReference Include="Grpc.Net.Client" />
|
|
||||||
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs" />
|
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" />
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
// <copyright file="OpenTracingHelper.cs" company="OpenTelemetry Authors">
|
||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
// </copyright>
|
||||||
|
|
||||||
|
using OpenTelemetry.AutoInstrumentation.Logging;
|
||||||
|
using OpenTelemetry.Shims.OpenTracing;
|
||||||
|
using OpenTelemetry.Trace;
|
||||||
|
using OpenTracing.Util;
|
||||||
|
|
||||||
|
namespace OpenTelemetry.AutoInstrumentation;
|
||||||
|
|
||||||
|
internal static class OpenTracingHelper
|
||||||
|
{
|
||||||
|
private static readonly IOtelLogger Logger = OtelLogging.GetLogger();
|
||||||
|
|
||||||
|
public static TracerProviderBuilder AddOpenTracingShimSource(this TracerProviderBuilder tracerProviderBuilder)
|
||||||
|
{
|
||||||
|
return tracerProviderBuilder.AddSource("opentracing-shim");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void EnableOpenTracing(TracerProvider? tracerProvider)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (tracerProvider is not null)
|
||||||
|
{
|
||||||
|
// Instantiate the OpenTracing shim. The underlying OpenTelemetry tracer will create
|
||||||
|
// spans using the opentracing-shim source.
|
||||||
|
var openTracingShim = new TracerShim(tracerProvider);
|
||||||
|
|
||||||
|
// This registration must occur prior to any reference to the OpenTracing tracer:
|
||||||
|
// otherwise the no-op tracer is going to be used by OpenTracing instead.
|
||||||
|
if (GlobalTracer.RegisterIfAbsent(openTracingShim))
|
||||||
|
{
|
||||||
|
Logger.Information("OpenTracingShim registered as the OpenTracing global tracer.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.Error(
|
||||||
|
"OpenTracingShim could not be registered as the OpenTracing global tracer." +
|
||||||
|
"Another tracer was already registered. OpenTracing signals will not be captured.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.Information("OpenTracingShim was not loaded as the provider is not initialized.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Error(ex, "OpenTracingShim exception.");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,7 +20,6 @@
|
||||||
/net/OpenTelemetry.AutoInstrumentation.dll,
|
/net/OpenTelemetry.AutoInstrumentation.dll,
|
||||||
/net/OpenTelemetry.AutoInstrumentation.pdb,
|
/net/OpenTelemetry.AutoInstrumentation.pdb,
|
||||||
/net/OpenTelemetry.Exporter.Console.dll,
|
/net/OpenTelemetry.Exporter.Console.dll,
|
||||||
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.dll,
|
|
||||||
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.dll,
|
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.dll,
|
||||||
/net/OpenTelemetry.Exporter.Prometheus.HttpListener.dll,
|
/net/OpenTelemetry.Exporter.Prometheus.HttpListener.dll,
|
||||||
/net/OpenTelemetry.Exporter.Zipkin.dll,
|
/net/OpenTelemetry.Exporter.Zipkin.dll,
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
/net/OpenTelemetry.AutoInstrumentation.dll,
|
/net/OpenTelemetry.AutoInstrumentation.dll,
|
||||||
/net/OpenTelemetry.AutoInstrumentation.pdb,
|
/net/OpenTelemetry.AutoInstrumentation.pdb,
|
||||||
/net/OpenTelemetry.Exporter.Console.dll,
|
/net/OpenTelemetry.Exporter.Console.dll,
|
||||||
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.dll,
|
|
||||||
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.dll,
|
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.dll,
|
||||||
/net/OpenTelemetry.Exporter.Prometheus.HttpListener.dll,
|
/net/OpenTelemetry.Exporter.Prometheus.HttpListener.dll,
|
||||||
/net/OpenTelemetry.Exporter.Zipkin.dll,
|
/net/OpenTelemetry.Exporter.Zipkin.dll,
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
/net/OpenTelemetry.AutoInstrumentation.dll,
|
/net/OpenTelemetry.AutoInstrumentation.dll,
|
||||||
/net/OpenTelemetry.AutoInstrumentation.pdb,
|
/net/OpenTelemetry.AutoInstrumentation.pdb,
|
||||||
/net/OpenTelemetry.Exporter.Console.dll,
|
/net/OpenTelemetry.Exporter.Console.dll,
|
||||||
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.dll,
|
|
||||||
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.dll,
|
/net/OpenTelemetry.Exporter.OpenTelemetryProtocol.dll,
|
||||||
/net/OpenTelemetry.Exporter.Prometheus.HttpListener.dll,
|
/net/OpenTelemetry.Exporter.Prometheus.HttpListener.dll,
|
||||||
/net/OpenTelemetry.Exporter.Zipkin.dll,
|
/net/OpenTelemetry.Exporter.Zipkin.dll,
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
\net\OpenTelemetry.AutoInstrumentation.dll,
|
\net\OpenTelemetry.AutoInstrumentation.dll,
|
||||||
\net\OpenTelemetry.AutoInstrumentation.pdb,
|
\net\OpenTelemetry.AutoInstrumentation.pdb,
|
||||||
\net\OpenTelemetry.Exporter.Console.dll,
|
\net\OpenTelemetry.Exporter.Console.dll,
|
||||||
\net\OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.dll,
|
|
||||||
\net\OpenTelemetry.Exporter.OpenTelemetryProtocol.dll,
|
\net\OpenTelemetry.Exporter.OpenTelemetryProtocol.dll,
|
||||||
\net\OpenTelemetry.Exporter.Prometheus.HttpListener.dll,
|
\net\OpenTelemetry.Exporter.Prometheus.HttpListener.dll,
|
||||||
\net\OpenTelemetry.Exporter.Zipkin.dll,
|
\net\OpenTelemetry.Exporter.Zipkin.dll,
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class OpenTracingTests : TestHelper
|
||||||
{
|
{
|
||||||
using var collector = new MockSpansCollector(Output);
|
using var collector = new MockSpansCollector(Output);
|
||||||
SetExporter(collector);
|
SetExporter(collector);
|
||||||
collector.Expect("OpenTelemetry.AutoInstrumentation.OpenTracingShim");
|
collector.Expect("opentracing-shim");
|
||||||
|
|
||||||
SetEnvironmentVariable("OTEL_DOTNET_AUTO_OPENTRACING_ENABLED", "true");
|
SetEnvironmentVariable("OTEL_DOTNET_AUTO_OPENTRACING_ENABLED", "true");
|
||||||
RunTestApplication();
|
RunTestApplication();
|
||||||
|
|
|
@ -7,5 +7,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" />
|
||||||
<PackageReference Include="MassTransit" VersionOverride="$(LibraryVersion)" />
|
<PackageReference Include="MassTransit" VersionOverride="$(LibraryVersion)" />
|
||||||
|
<!-- Microsoft.Extensions.Hosting 7.0.1 is referencing System.Diagnostics.DiagnosticSource 7.0.1. Minimal supported version is 7.0.2 -->
|
||||||
|
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
<PackageReference Include="Quartz" VersionOverride="$(LibraryVersion)" />
|
<PackageReference Include="Quartz" VersionOverride="$(LibraryVersion)" />
|
||||||
<PackageReference Include="Quartz.Extensions.DependencyInjection" VersionOverride="$(LibraryVersion)" />
|
<PackageReference Include="Quartz.Extensions.DependencyInjection" VersionOverride="$(LibraryVersion)" />
|
||||||
<PackageReference Include="Quartz.Extensions.Hosting" VersionOverride="$(LibraryVersion)" />
|
<PackageReference Include="Quartz.Extensions.Hosting" VersionOverride="$(LibraryVersion)" />
|
||||||
|
<!-- Microsoft.Extensions.Hosting 7.0.1 is referencing System.Diagnostics.DiagnosticSource 7.0.1. Minimal supported version is 7.0.2 -->
|
||||||
|
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in New Issue