Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0-rc.2 #2795

Merged
merged 3 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@ All notable changes to this component are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/compare/v1.0.0-rc.1...HEAD)
## [Unreleased](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/compare/v1.0.0-rc.2...HEAD)

### Added

### Changed

### Deprecated

### Removed

### Fixed

Kielek marked this conversation as resolved.
Show resolved Hide resolved
### Security

## [1.0.0-rc.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.0.0-rc.2)

### Added

Expand All @@ -14,7 +28,7 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
- Added `BeforeConfigureTracerProvider`, `BeforeConfigureMeterProvider`,
`TracerProviderInitialized` and `MeterProviderInitialized` for plugins.
See [plugins documentation](/docs/plugins.md) for details.
- Added support for Azure SDK traces instrumentation.
- Added support for Azure SDK traces instrumentation on .NET.

### Changed

Expand All @@ -23,16 +37,13 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
See [plugins documentation](/docs/plugins.md) for details.
- Minimal version of `Grpc.Net.Client` supported on .NET updated to `2.52.0`.

### Deprecated

### Removed

### Fixed

- `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES` works correctly when .NET CLR Profiler
is not enabled.

### Security
- Fixed manual tracing when instrumented project is referencing
`System.Diagnostics.DiagnosticSource` `7.0.2`
[#2780](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2780).

## [1.0.0-rc.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.0.0-rc.1)

Expand Down
2 changes: 1 addition & 1 deletion OpenTelemetry.DotNet.Auto.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function Install-OpenTelemetryCore() {
[string]$LocalPath
)

$version = "v1.0.0-rc.1"
$version = "v1.0.0-rc.2"
$installDir = Get-CLIInstallDir-From-InstallDir $InstallDir
$archivePath = $null
$deleteArchive = $true
Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ to .NET applications without having to modify their source code.
> **Warning**
> The following documentation refers to the in-development version
of OpenTelemetry .NET Automatic Instrumentation. Docs for the latest version
([1.0.0-rc.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest))
can be found [here](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.0.0-rc.1/docs/README.md).
([1.0.0-rc.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest))
can be found [here](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.0.0-rc.2/docs/README.md).

---

Expand Down Expand Up @@ -167,7 +167,7 @@ Example usage:

```sh
# Download the bash script
curl -sSfL https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v1.0.0-rc.1/otel-dotnet-auto-install.sh -O
curl -sSfL https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v1.0.0-rc.2/otel-dotnet-auto-install.sh -O

# Install core files
sh ./otel-dotnet-auto-install.sh
Expand All @@ -190,7 +190,7 @@ uses environment variables as parameters:
| `OTEL_DOTNET_AUTO_HOME` | Location where binaries are to be installed | No | `$HOME/.otel-dotnet-auto` |
| `OS_TYPE` | Possible values: `linux-glibc`, `linux-musl`, `macos`, `windows` | No | *Calculated* |
| `TMPDIR` | Temporary directory used when downloading the files | No | `$(mktemp -d)` |
| `VERSION` | Version to download | No | `1.0.0-rc.1` |
| `VERSION` | Version to download | No | `1.0.0-rc.2` |

[instrument.sh](../instrument.sh) script
uses environment variables as parameters:
Expand All @@ -209,7 +209,7 @@ Example usage (run as administrator):

```powershell
# Download the module
$module_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v1.0.0-rc.1/OpenTelemetry.DotNet.Auto.psm1"
$module_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v1.0.0-rc.2/OpenTelemetry.DotNet.Auto.psm1"
$download_path = Join-Path $env:temp "OpenTelemetry.DotNet.Auto.psm1"
Invoke-WebRequest -Uri $module_url -OutFile $download_path -UseBasicParsing

Expand Down
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ 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) |
| `AZURE` | [Azure SDK](https://azure.github.io/azure-sdk/releases/latest/index.html) **Not supported on .NET Framework** | \[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) |
| `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) |
Expand Down
2 changes: 1 addition & 1 deletion otel-dotnet-auto-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ esac

test -z "$OTEL_DOTNET_AUTO_HOME" && OTEL_DOTNET_AUTO_HOME="$HOME/.otel-dotnet-auto"
test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"
test -z "$VERSION" && VERSION="v1.0.0-rc.1"
test -z "$VERSION" && VERSION="v1.0.0-rc.2"

RELEASES_URL="https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases"
ARCHIVE="opentelemetry-dotnet-instrumentation-$OS_TYPE.zip"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ public static TracerProviderBuilder UseEnvironmentVariables(
TracerInstrumentation.Quartz => Wrappers.AddQuartzInstrumentation(builder, pluginManager, lazyInstrumentationLoader),
TracerInstrumentation.MongoDB => builder.AddSource("MongoDB.Driver.Core.Extensions.DiagnosticSources"),
TracerInstrumentation.MySqlConnector => builder.AddSource("MySqlConnector"),
TracerInstrumentation.Azure => Wrappers.AddAzureInstrumentation(builder),
#if NET6_0_OR_GREATER
TracerInstrumentation.AspNetCore => Wrappers.AddAspNetCoreInstrumentation(builder, pluginManager, lazyInstrumentationLoader),
TracerInstrumentation.MassTransit => builder.AddSource("MassTransit"),
TracerInstrumentation.MySqlData => Wrappers.AddMySqlClientInstrumentation(builder, pluginManager, lazyInstrumentationLoader),
TracerInstrumentation.StackExchangeRedis => builder.AddSource("OpenTelemetry.Instrumentation.StackExchangeRedis"),
TracerInstrumentation.EntityFrameworkCore => Wrappers.AddEntityFrameworkCoreInstrumentation(builder, pluginManager, lazyInstrumentationLoader),
TracerInstrumentation.GraphQL => Wrappers.AddGraphQLInstrumentation(builder, pluginManager, lazyInstrumentationLoader, settings),
TracerInstrumentation.Azure => Wrappers.AddAzureInstrumentation(builder),
#endif
_ => null
};
Expand Down Expand Up @@ -174,6 +174,13 @@ public static TracerProviderBuilder AddGraphQLInstrumentation(TracerProviderBuil

return builder.AddSource("GraphQL");
}

[MethodImpl(MethodImplOptions.NoInlining)]
public static TracerProviderBuilder AddAzureInstrumentation(TracerProviderBuilder builder)
{
AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true);
return builder.AddSource("Azure.*");
}
#endif

[MethodImpl(MethodImplOptions.NoInlining)]
Expand Down Expand Up @@ -242,12 +249,5 @@ public static TracerProviderBuilder AddOtlpExporter(TracerProviderBuilder builde
pluginManager.ConfigureTracesOptions(options);
});
}

[MethodImpl(MethodImplOptions.NoInlining)]
public static TracerProviderBuilder AddAzureInstrumentation(TracerProviderBuilder builder)
{
AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true);
return builder.AddSource("Azure.*");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ internal enum TracerInstrumentation
/// </summary>
MySqlConnector = 17,

#if NET6_0_OR_GREATER
/// <summary>
/// Azure SDK instrumentation.
/// </summary>
Azure = 18
#endif
}
4 changes: 2 additions & 2 deletions src/OpenTelemetry.AutoInstrumentation/Instrumentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ private static void AddLazilyLoadedTraceInstrumentations(LazyInstrumentationLoad
case TracerInstrumentation.GraphQL:
DelayedInitialization.Traces.AddGraphQL(LazyInstrumentationLoader, pluginManager, tracerSettings);
break;
case TracerInstrumentation.Azure:
break;
#endif
case TracerInstrumentation.MongoDB:
break;
Expand All @@ -314,8 +316,6 @@ private static void AddLazilyLoadedTraceInstrumentations(LazyInstrumentationLoad
break;
case TracerInstrumentation.MySqlConnector:
break;
case TracerInstrumentation.Azure:
break;
default:
Logger.Warning($"Configured trace instrumentation type is not supported: {instrumentation}");
if (FailFastSettings.Value.FailFast)
Expand Down
4 changes: 3 additions & 1 deletion test/IntegrationTests/AzureCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
// limitations under the License.
// </copyright>

#if NET6_0_OR_GREATER

using DotNet.Testcontainers.Builders;
using DotNet.Testcontainers.Configurations;
using DotNet.Testcontainers.Containers;
using IntegrationTests.Helpers;
using static IntegrationTests.Helpers.DockerFileHelper;
Expand Down Expand Up @@ -74,3 +75,4 @@ private static async Task ShutdownAzureContainerAsync(IContainer container)
await container.DisposeAsync();
}
}
#endif
3 changes: 3 additions & 0 deletions test/IntegrationTests/AzureTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
// </copyright>

#if NET6_0_OR_GREATER

using IntegrationTests.Helpers;
using Xunit.Abstractions;

Expand Down Expand Up @@ -57,3 +59,4 @@ public void SubmitsTraces(string packageVersion)
collector.AssertExpectations();
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ internal void Propagators_FailFast()
[InlineData("WCFCLIENT", TracerInstrumentation.WcfClient)]
#endif
[InlineData("MYSQLCONNECTOR", TracerInstrumentation.MySqlConnector)]
#if NET6_0_OR_GREATER
[InlineData("AZURE", TracerInstrumentation.Azure)]
#endif
internal void TracerSettings_Instrumentations_SupportedValues(string tracerInstrumentation, TracerInstrumentation expectedTracerInstrumentation)
{
Environment.SetEnvironmentVariable(ConfigurationKeys.Traces.TracesInstrumentationEnabled, "false");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

var port = GetBlobServicePortPort(args);

// connection string based on https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio#well-known-storage-account-and-key
// connection string based on https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio#well-known-storage-account-and-key
var developerConnectionString = $"DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:{port}/devstoreaccount1;";

Expand Down
Loading