From 9f35394f1f4170f41b642ce0c7bfa4f2b11acb0d Mon Sep 17 00:00:00 2001 From: Rajkumar Rangaraj Date: Tue, 3 Oct 2023 11:40:01 -0700 Subject: [PATCH 1/6] Update Changelog --- .../Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md index 3376fb2699905..162c6743d2133 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md @@ -6,10 +6,19 @@ ### Breaking Changes +- Removed package references to the beta versions of `OpenTelemetry.Instrumentation.AspNetCore`, `OpenTelemetry.Instrumentation.Http`, and `OpenTelemetry.Instrumentation.SqlClient`. + Due to this change, users will no longer be able to access the public APIs of these beta packages. + ### Bugs Fixed ### Other Changes +- Forked (or vendored) the code of instrumentation libraries `OpenTelemetry.Instrumentation.AspNetCore`, `OpenTelemetry.Instrumentation.Http`, and `OpenTelemetry.Instrumentation.SqlClient` from the OpenTelemetry .NET repository. + Integrated the forked code and converted all of its public API to internal. + This ensures that `Azure.Monitor.OpenTelemetry.AspNetCore` has native support for ASP.NET Core, HTTP Client, and SQL instrumentation without needing external beta package references. +- Forked (or vendored) the code of the `OpenTelemetry.ResourceDetectors.Azure` resource detector from the OpenTelemetry .NET Contrib repository and made its public API internal. +- Removed reference to the `OpenTelemetry.ResourceDetectors.Azure` resource detector package. + ## 1.0.0-beta.7 (2023-09-20) ### Other Changes From ef475f112f3c2741885d92e3e173a2537f06e88a Mon Sep 17 00:00:00 2001 From: Rajkumar Rangaraj Date: Tue, 3 Oct 2023 11:49:59 -0700 Subject: [PATCH 2/6] Remove forked. --- .../Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md index 162c6743d2133..db6b61095a864 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md @@ -13,10 +13,10 @@ ### Other Changes -- Forked (or vendored) the code of instrumentation libraries `OpenTelemetry.Instrumentation.AspNetCore`, `OpenTelemetry.Instrumentation.Http`, and `OpenTelemetry.Instrumentation.SqlClient` from the OpenTelemetry .NET repository. +- Vendored the code of instrumentation libraries `OpenTelemetry.Instrumentation.AspNetCore`, `OpenTelemetry.Instrumentation.Http`, and `OpenTelemetry.Instrumentation.SqlClient` from the OpenTelemetry .NET repository. Integrated the forked code and converted all of its public API to internal. This ensures that `Azure.Monitor.OpenTelemetry.AspNetCore` has native support for ASP.NET Core, HTTP Client, and SQL instrumentation without needing external beta package references. -- Forked (or vendored) the code of the `OpenTelemetry.ResourceDetectors.Azure` resource detector from the OpenTelemetry .NET Contrib repository and made its public API internal. +- Vendored the code of the `OpenTelemetry.ResourceDetectors.Azure` resource detector from the OpenTelemetry .NET Contrib repository and made its public API internal. - Removed reference to the `OpenTelemetry.ResourceDetectors.Azure` resource detector package. ## 1.0.0-beta.7 (2023-09-20) From 6e55c3150344ddf7c2a85c8711dbf6054fea2425 Mon Sep 17 00:00:00 2001 From: Rajkumar Rangaraj Date: Tue, 3 Oct 2023 12:08:06 -0700 Subject: [PATCH 3/6] Update Readme --- .../README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md index 264a5545e0d51..b549b0af44e92 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md @@ -12,16 +12,16 @@ The Azure Monitor Distro is a client library that sends telemetry data to Azure ### What is Included in the Distro -The Azure Monitor Distro is a distribution of the .NET OpenTelemetry SDK and related instrumentation libraries. It includes the following components: +The Azure Monitor Distro is a distribution of the .NET OpenTelemetry SDK with internally vendored instrumentation libraries, including: * Traces - * [ASP.NET Core Instrumentation Library](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore/) provides automatic tracing for incoming HTTP requests to ASP.NET Core applications. - * [HTTP Client Instrumentation Library](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Http/) provides automatic tracing for outgoing HTTP requests made using [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient). - * [SQL Client Instrumentation Library](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.SqlClient) provides automatic tracing for SQL queries executed using the [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) packages. + * **ASP.NET Core Instrumentation**: Provides automatic tracing for incoming HTTP requests to ASP.NET Core applications. + * **HTTP Client Instrumentation**: Provides automatic tracing for outgoing HTTP requests made using [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient). + * **SQL Client Instrumentation** Provides automatic tracing for SQL queries executed using the [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) packages. * Metrics - * [ASP.NET Core Instrumentation Library](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore/) provides automatic collection of common ASP.NET Core metrics. - * [HTTP Client Instrumentation Library](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Http/) provides automatic collection of HTTP client metrics. + * **ASP.NET Core Instrumentation**: Provides automatic collection of common ASP.NET Core metrics. + * **HTTP Client Instrumentation**: Provides automatic collection of HTTP client metrics. * [Logs](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/logs/getting-started-console) @@ -184,7 +184,7 @@ environmental variables: ## Key concepts -The Azure Monitor Distro is a distribution package which enables users to send telemetry data to Azure Monitor. It includes the .NET OpenTelemetry SDK and instrumentation libraries for [ASP.NET Core](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNetCore/), [HttpClient](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Http/), and [SQLClient](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.SqlClient). +The Azure Monitor Distro is a distribution package that facilitates users in sending telemetry data to Azure Monitor. It encompasses the .NET OpenTelemetry SDK and internally vendored instrumentation libraries for ASP.NET Core, HttpClient, and SQLClient, ensuring seamless integration and data collection. ## Examples From 347541edc6d665468c959f38b54be33e88745d25 Mon Sep 17 00:00:00 2001 From: Rajkumar Rangaraj Date: Tue, 3 Oct 2023 14:36:34 -0700 Subject: [PATCH 4/6] pr feedback --- .../Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md | 2 ++ sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md index db6b61095a864..f88645eaa333b 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md @@ -8,6 +8,8 @@ - Removed package references to the beta versions of `OpenTelemetry.Instrumentation.AspNetCore`, `OpenTelemetry.Instrumentation.Http`, and `OpenTelemetry.Instrumentation.SqlClient`. Due to this change, users will no longer be able to access the public APIs of these beta packages. + Manually adding package references to these instrumentation libraries in an application will cause the internal vendored instrumentation from the distro to be ignored. + If users choose to add these references, they must ensure to update their configuration subsequently. This includes incorporating the necessary instrumentation using either TracerProviderBuilder or MeterProviderBuilder. ### Bugs Fixed diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md index b549b0af44e92..308b5f0935941 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md @@ -20,8 +20,7 @@ The Azure Monitor Distro is a distribution of the .NET OpenTelemetry SDK with in * **SQL Client Instrumentation** Provides automatic tracing for SQL queries executed using the [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) packages. * Metrics - * **ASP.NET Core Instrumentation**: Provides automatic collection of common ASP.NET Core metrics. - * **HTTP Client Instrumentation**: Provides automatic collection of HTTP client metrics. + * Provides automatic collection of Application Insights Standard metrics. * [Logs](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/logs/getting-started-console) From bf1001d2107981562b1fcdc7f99b403a37ce9a1f Mon Sep 17 00:00:00 2001 From: Rajkumar Rangaraj Date: Tue, 3 Oct 2023 15:15:34 -0700 Subject: [PATCH 5/6] Update API Comment. --- .../src/OpenTelemetryBuilderExtensions.cs | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/OpenTelemetryBuilderExtensions.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/OpenTelemetryBuilderExtensions.cs index 7864054779c7b..a0348dbdd5b79 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/OpenTelemetryBuilderExtensions.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/OpenTelemetryBuilderExtensions.cs @@ -42,17 +42,11 @@ public static class OpenTelemetryBuilderExtensions /// parsed state values. /// /// - /// The following instrumentations are added for distributed tracing: + /// The following vendored instrumentations are added for distributed tracing: /// - /// ASP.NET Core: . - /// HTTP Client: . - /// SQL Client: . - /// - /// - /// The following instrumentations are added for metrics: - /// - /// ASP.NET Core: . - /// HTTP Client: . + /// ASP.NET Core. + /// HTTP Client. + /// SQL Client. /// /// public static OpenTelemetryBuilder UseAzureMonitor(this OpenTelemetryBuilder builder) @@ -75,17 +69,11 @@ public static OpenTelemetryBuilder UseAzureMonitor(this OpenTelemetryBuilder bui /// parsed state values. /// /// - /// The following instrumentations are added for distributed tracing: - /// - /// ASP.NET Core: . - /// HTTP Client: . - /// SQL Client: . - /// - /// - /// The following instrumentations are added for metrics: + /// The following vendored instrumentations are added for distributed tracing: /// - /// ASP.NET Core: . - /// HTTP Client: . + /// ASP.NET Core. + /// HTTP Client. + /// SQL Client. /// /// public static OpenTelemetryBuilder UseAzureMonitor(this OpenTelemetryBuilder builder, Action configureAzureMonitor) From 687910c9477378e086bcb14c7db3d36224d07214 Mon Sep 17 00:00:00 2001 From: Rajkumar Rangaraj Date: Tue, 3 Oct 2023 15:45:08 -0700 Subject: [PATCH 6/6] Update changelog --- sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md index f88645eaa333b..71fe7cb3eca13 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes - Removed package references to the beta versions of `OpenTelemetry.Instrumentation.AspNetCore`, `OpenTelemetry.Instrumentation.Http`, and `OpenTelemetry.Instrumentation.SqlClient`. + Instead, these packages are now internally vendored within the distro. Due to this change, users will no longer be able to access the public APIs of these beta packages. Manually adding package references to these instrumentation libraries in an application will cause the internal vendored instrumentation from the distro to be ignored. If users choose to add these references, they must ensure to update their configuration subsequently. This includes incorporating the necessary instrumentation using either TracerProviderBuilder or MeterProviderBuilder.