diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60813f1378..2b0b2b8cda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,6 +69,7 @@ jobs: continue-on-error: true powershell-script: + if: ${{ !contains(github.event.pull_request.labels.*.name, 'release PR') }} runs-on: windows-2022 steps: - uses: actions/setup-dotnet@v3.0.3 @@ -97,6 +98,7 @@ jobs: if (Test-Path $install_dir) { throw "Core files exist. Core uninstall failed." } shell-scripts: + if: ${{ !contains(github.event.pull_request.labels.*.name, 'release PR') }} strategy: fail-fast: false matrix: @@ -130,6 +132,7 @@ jobs: test "$(ls -A '${{ matrix.log-dir }}' )" shell-scripts-container: + if: ${{ !contains(github.event.pull_request.labels.*.name, 'release PR') }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/validate-documentation.yml b/.github/workflows/validate-documentation.yml index 80952902f1..f750150cb0 100644 --- a/.github/workflows/validate-documentation.yml +++ b/.github/workflows/validate-documentation.yml @@ -30,6 +30,7 @@ jobs: fail: true env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'release PR') }} - run: npm install diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ef298636e..7914128e17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,25 @@ 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/v0.4.0-beta.1...HEAD) +## [Unreleased](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/compare/v0.5.0...HEAD) + +## [0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) + +### Added + +- Add support for .NET 7. +- Add support for `OTEL_DOTNET_AUTO_LOGS_ENABLED`. +- Add error log if bytecode instrumentation type + is missing all instrumentation methods. +- Plugins can overwrite OpenTelemetry .NET SDK exporters' and instrumentations' options. ### Changed -- Replace `OTEL_DOTNET_AUTO_LOAD_TRACER_AT_STARTUP` by `OTEL_DOTNET_AUTO_TRACES_ENABLED` - and `OTEL_DOTNET_AUTO_LOAD_METER_AT_STARTUP` by `OTEL_DOTNET_AUTO_METRICS_ENABLED`. +- Replace `OTEL_DOTNET_AUTO_LOAD_TRACER_AT_STARTUP` with `OTEL_DOTNET_AUTO_TRACES_ENABLED` + and `OTEL_DOTNET_AUTO_LOAD_METER_AT_STARTUP` with `OTEL_DOTNET_AUTO_METRICS_ENABLED`. - Disable OpenTracing by default. OpenTracing can be re-enabled via `OTEL_DOTNET_AUTO_OPENTRACING_ENABLED`. - GraphQL exceptions are recorded as OTel events. +- `DOTNET_STARTUP_HOOKS` required value changed to `$INSTALL_DIR/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll`. ### Removed @@ -21,8 +32,6 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h - Remove support for `OTEL_DOTNET_AUTO_ENABLED`. Use `CORECLR_ENABLE_PROFILING` or `COR_ENABLE_PROFILING` instead. - Remove support for `OTEL_DOTNET_AUTO_INCLUDE_PROCESSES`. -- Remove traces instrumentation for [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) - as it is not working. ### Fixed @@ -30,16 +39,7 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h - Fix the IIS unregistration in the PowerShell script module. - Get rid of unnecessary service restarts during the IIS unregistration, in the PowerShell script module. -- `OTEL_DOTNET_AUTO_TRACES_ENABLED` is also respected by bytecode instrumentations - -### Added - -- Add support for .NET 7. -- Add support for `OTEL_DOTNET_AUTO_LOGS_ENABLED`. -- Error message on the native log if bytecode instrumentation type is missing all - instrumentation methods [#1499](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/1499). -- Plugins can overwrite OpenTelemetry dotnet SDK instrumentation and exporter options. - See more at [plugins.md](docs/plugins.md). +- `OTEL_DOTNET_AUTO_TRACES_ENABLED` is also respected by bytecode instrumentations. ## [0.4.0-beta.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.4.0-beta.1) diff --git a/OpenTelemetry.DotNet.Auto.psm1 b/OpenTelemetry.DotNet.Auto.psm1 index ac95659ac3..efafb4267c 100644 --- a/OpenTelemetry.DotNet.Auto.psm1 +++ b/OpenTelemetry.DotNet.Auto.psm1 @@ -74,7 +74,7 @@ function Get-Environment-Variables-Table([string]$InstallDir, [string]$OTelServi $DOTNET_ADDITIONAL_DEPS = Join-Path $InstallDir "AdditionalDeps" $DOTNET_SHARED_STORE = Join-Path $InstallDir "store" - $DOTNET_STARTUP_HOOKS = Join-Path $InstallDir "netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + $DOTNET_STARTUP_HOOKS = Join-Path $InstallDir "net/OpenTelemetry.AutoInstrumentation.StartupHook.dll" $OTEL_DOTNET_AUTO_HOME = $InstallDir $OTEL_DOTNET_AUTO_INTEGRATIONS_FILE = Join-Path $InstallDir "integrations.json" @@ -197,7 +197,7 @@ function Install-OpenTelemetryCore() { [string]$InstallDir = "" ) - $version = "v0.4.0-beta.1" + $version = "v0.5.0" $installDir = Get-CLIInstallDir-From-InstallDir $InstallDir $tempDir = Get-Temp-Directory $dlPath = $null diff --git a/dev/envvars.sh b/dev/envvars.sh index fe64b31ab7..5f0f473ed3 100644 --- a/dev/envvars.sh +++ b/dev/envvars.sh @@ -60,6 +60,9 @@ export DOTNET_ADDITIONAL_DEPS="${CURDIR}/bin/tracer-home/AdditionalDeps" export DOTNET_SHARED_STORE="${CURDIR}/bin/tracer-home/store" export DOTNET_STARTUP_HOOKS="${CURDIR}/bin/tracer-home/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll" +# Configure ASP.NET Core startup +export ASPNETCORE_HOSTINGSTARTUPASSEMBLIES="OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper" + # Configure OpenTelemetry .NET Auto-Instrumentation export OTEL_DOTNET_AUTO_HOME="${CURDIR}/bin/tracer-home" export OTEL_DOTNET_AUTO_INTEGRATIONS_FILE="${CURDIR}/bin/tracer-home/integrations.json" diff --git a/docs/README.md b/docs/README.md index 71629547b9..86c9ce1cf2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -132,7 +132,7 @@ and instrument your .NET application using the provided Shell scripts. Example usage: ```sh -curl -sSfL https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v0.4.0-beta.1/otel-dotnet-auto-install.sh -O +curl -sSfL https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v0.5.0/otel-dotnet-auto-install.sh -O sh ./otel-dotnet-auto-install.sh . $HOME/.otel-dotnet-auto/instrument.sh OTEL_SERVICE_NAME=myapp OTEL_RESOURCE_ATTRIBUTES=deployment.environment=staging,service.version=1.0.0 dotnet run @@ -146,7 +146,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 | `v0.4.0-beta.1` | +| `VERSION` | Version to download | No | `v0.5.0` | [instrument.sh](../instrument.sh) script uses environment variables as parameters: @@ -167,7 +167,7 @@ Example usage: ```powershell # Download and import the module -$module_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v0.4.0-beta.1/OpenTelemetry.DotNet.Auto.psm1" +$module_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v0.5.0/OpenTelemetry.DotNet.Auto.psm1" $download_path = Join-Path $env:temp "OpenTelemetry.DotNet.Auto.psm1" Invoke-WebRequest -Uri $module_url -OutFile $download_path Import-Module $download_path diff --git a/docs/config.md b/docs/config.md index f70e1cfc7f..c61cb2fb81 100644 --- a/docs/config.md +++ b/docs/config.md @@ -43,7 +43,7 @@ for more details. | `MongoDB` | [MongoDB.Driver.Core](https://www.nuget.org/packages/MongoDB.Driver.Core) **Not supported on .NET Framework** | ≥2.13.3 & < 3.0.0 | source & bytecode | | `MySqlData` | [MySql.Data](https://www.nuget.org/packages/MySql.Data) **Not supported on .NET Framework** | ≥6.10.7 | source & bytecode \[1\] | | `Npgsql` | [Npgsql](https://www.nuget.org/packages/Npgsql) | ≥6.0.0 | source | -| `SqlClient` | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) | * | source | +| `SqlClient` | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | * | source | | `StackExchangeRedis` | [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis) **Not supported on .NET Framework** | ≥2.0.405 < 3.0.0 | source & bytecode | | `Wcf` | [System.ServiceModel](https://www.nuget.org/packages/System.ServiceModel) **No support for server side on .NET**. For configuration see [WCF Instrumentation Configuration](wcf-config.md) | * \[2\] | source | diff --git a/docs/internal/instrumentation-libraries.md b/docs/internal/instrumentation-libraries.md index 688bea55a0..5bc1daaf99 100644 --- a/docs/internal/instrumentation-libraries.md +++ b/docs/internal/instrumentation-libraries.md @@ -36,7 +36,7 @@ submit an issue to request its inclusion. | [Entity Framework Core](https://docs.microsoft.com/ef/core/) | | | | Needs investigation. It might be implicitly supported based on the configured [database provider](https://docs.microsoft.com/ef/core/providers/). | | [Dapper](https://github.com/DapperLib/Dapper) | | | | Needs investigation. It might be implicitly supported based on the configured [database provider](https://github.com/DapperLib/Dapper#will-dapper-work-with-my-db-provider). | | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) | Yes | | [MS SQL Server](https://www.microsoft.com/sql-server/sql-server-2019) | | -| [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | | | | | +| [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | Yes | | | | | [MySql.Data](https://dev.mysql.com/doc/connector-net/en/connector-net-introduction.html) | Partial[^not_on_framework] | | | This is the official [MySQL](https://dev.mysql.com/) library. | | [MySqlConnector](https://mysqlconnector.net/) | | | | Seems to be the [recommended library for MariaDB](https://mariadb.com/kb/en/mysqlconnector-for-adonet/). | | [Npgsql](https://www.npgsql.org/) | Yes | | [PostgreSQL](https://www.postgresql.org/) | | diff --git a/docs/releasing.md b/docs/releasing.md index 5999a81c11..b979279ee9 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -18,9 +18,8 @@ 1. Stable release only! Update `PublicAPI.Shipped.txt` based on corresponding `PublicAPI.Unshipped.txt`. -1. Create a pull request on GitHub with the changes described in the changelog. - - `*scripts*` and `validate-documentation` jobs will fail - because the release is not published yet. +1. Create a pull request with `release PR` label on GitHub + with the changes described in the changelog. 1. Run the integration tests with Linux containers on Windows and macOS (not covered by CI): diff --git a/instrument.sh b/instrument.sh index d17391aadf..1fe8b040ca 100755 --- a/instrument.sh +++ b/instrument.sh @@ -93,9 +93,9 @@ else fi if [ -z "$DOTNET_STARTUP_HOOKS" ]; then - export DOTNET_STARTUP_HOOKS="${OTEL_DOTNET_AUTO_HOME}/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + export DOTNET_STARTUP_HOOKS="${OTEL_DOTNET_AUTO_HOME}/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll" else - export DOTNET_STARTUP_HOOKS="${OTEL_DOTNET_AUTO_HOME}/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll${SEPARATOR}${DOTNET_STARTUP_HOOKS}" + export DOTNET_STARTUP_HOOKS="${OTEL_DOTNET_AUTO_HOME}/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll${SEPARATOR}${DOTNET_STARTUP_HOOKS}" fi # Configure .NET CLR Profiler diff --git a/nuget/OpenTelemetry.AutoInstrumentation.nuspec b/nuget/OpenTelemetry.AutoInstrumentation.nuspec index 3b5a7353f0..d994b634d6 100644 --- a/nuget/OpenTelemetry.AutoInstrumentation.nuspec +++ b/nuget/OpenTelemetry.AutoInstrumentation.nuspec @@ -2,7 +2,7 @@ OpenTelemetry.AutoInstrumentation - 0.4.0-beta.1 + 0.5.0 OpenTelemetry Auto-Instrumentation OpenTelemetry Authors OpenTelemetry Authors diff --git a/otel-dotnet-auto-install.sh b/otel-dotnet-auto-install.sh index 52a0193585..a6115c3b27 100755 --- a/otel-dotnet-auto-install.sh +++ b/otel-dotnet-auto-install.sh @@ -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="v0.4.0-beta.1" +test -z "$VERSION" && VERSION="v0.5.0" RELEASES_URL="https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases" ARCHIVE="opentelemetry-dotnet-instrumentation-$OS_TYPE.zip" diff --git a/run-example.sh b/run-example.sh index ebb4af2f70..120f2d5dd1 100644 --- a/run-example.sh +++ b/run-example.sh @@ -36,7 +36,7 @@ if [[ $skipAppBuild != "true" && $skipAppBuild != "1" ]]; then dotnet publish -f $aspNetAppTargetFramework -c $configuration ./examples/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj # build plugin for HTTP server app - dotnet publish -f $vendorPluginTargetFramework -c $configuration ./examples/Vendor.Distro/Examples.Vendor.Distro.csproj -o bin/tracer-home/$vendorPluginTargetFramework + dotnet publish -f $vendorPluginTargetFramework -c $configuration ./examples/Vendor.Distro/Examples.Vendor.Distro.csproj -o bin/tracer-home/net # build the client app dotnet publish -f $exampleAppTargetFramework -c $configuration ./examples/${exampleApp}/Examples.${exampleApp}.csproj diff --git a/src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj b/src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj index e3acebed42..246b181c35 100644 --- a/src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj +++ b/src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj @@ -6,7 +6,7 @@ ..\bin\ProfilerResources\ - 0.4.0 + 0.5.0 false diff --git a/src/OpenTelemetry.AutoInstrumentation.Native/CMakeLists.txt b/src/OpenTelemetry.AutoInstrumentation.Native/CMakeLists.txt index 1556a5a645..adda88f1d3 100644 --- a/src/OpenTelemetry.AutoInstrumentation.Native/CMakeLists.txt +++ b/src/OpenTelemetry.AutoInstrumentation.Native/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_policy(SET CMP0015 NEW) # Project definition # ****************************************************** -project("OpenTelemetry.AutoInstrumentation.Native" VERSION 0.4.0) +project("OpenTelemetry.AutoInstrumentation.Native" VERSION 0.5.0) # ****************************************************** # Environment detection diff --git a/src/OpenTelemetry.AutoInstrumentation.Native/Resource.rc b/src/OpenTelemetry.AutoInstrumentation.Native/Resource.rc index dec4693678..863b115374 100644 --- a/src/OpenTelemetry.AutoInstrumentation.Native/Resource.rc +++ b/src/OpenTelemetry.AutoInstrumentation.Native/Resource.rc @@ -67,12 +67,12 @@ BEGIN BEGIN VALUE "CompanyName", "The OpenTelemetry Authors" VALUE "FileDescription", "OpenTelemetry CLR Profiler" - VALUE "FileVersion", "0.4.0.0" + VALUE "FileVersion", "0.5.0.0" VALUE "InternalName", "OpenTelemetry.AutoInstrumentation.Native.DLL" VALUE "LegalCopyright", "Copyright 2021 The OpenTelemetry Authors" VALUE "OriginalFilename", "OpenTelemetry.AutoInstrumentation.Native.DLL" VALUE "ProductName", "OpenTelemetry .NET AutoInstrumentation" - VALUE "ProductVersion", "0.4.0" + VALUE "ProductVersion", "0.5.0" END END BLOCK "VarFileInfo" diff --git a/src/OpenTelemetry.AutoInstrumentation.Native/otel_profiler_constants.h b/src/OpenTelemetry.AutoInstrumentation.Native/otel_profiler_constants.h index d46554d859..8231c19571 100644 --- a/src/OpenTelemetry.AutoInstrumentation.Native/otel_profiler_constants.h +++ b/src/OpenTelemetry.AutoInstrumentation.Native/otel_profiler_constants.h @@ -64,10 +64,10 @@ const WSTRING opentelemetry_autoinstrumentation_loader_assemblyName = WStr("Open const WSTRING managed_profiler_name = WStr("OpenTelemetry.AutoInstrumentation"); const WSTRING managed_profiler_full_assembly_version = - WStr("OpenTelemetry.AutoInstrumentation, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null"); + WStr("OpenTelemetry.AutoInstrumentation, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null"); const WSTRING managed_profiler_full_assembly_version_strong_name = - WStr("OpenTelemetry.AutoInstrumentation, Version=0.4.0.0, Culture=neutral, PublicKeyToken=c0db600a13f60b51"); + WStr("OpenTelemetry.AutoInstrumentation, Version=0.5.0.0, Culture=neutral, PublicKeyToken=c0db600a13f60b51"); const WSTRING nonwindows_nativemethods_type = WStr("OpenTelemetry.AutoInstrumentation.NativeMethods+NonWindows"); diff --git a/src/OpenTelemetry.AutoInstrumentation.Native/version.h b/src/OpenTelemetry.AutoInstrumentation.Native/version.h index b6a501e63c..cd937572eb 100644 --- a/src/OpenTelemetry.AutoInstrumentation.Native/version.h +++ b/src/OpenTelemetry.AutoInstrumentation.Native/version.h @@ -1,3 +1,3 @@ #pragma once -constexpr auto PROFILER_VERSION = "0.4.0"; +constexpr auto PROFILER_VERSION = "0.5.0"; diff --git a/src/OpenTelemetry.AutoInstrumentation/Constants.cs b/src/OpenTelemetry.AutoInstrumentation/Constants.cs index dc9b38a77b..d82246dc83 100644 --- a/src/OpenTelemetry.AutoInstrumentation/Constants.cs +++ b/src/OpenTelemetry.AutoInstrumentation/Constants.cs @@ -20,7 +20,7 @@ internal static class Constants { public static class Tracer { - public const string Version = "0.4.0"; + public const string Version = "0.5.0"; public const string AutoInstrumentationVersionName = "telemetry.auto.version"; } diff --git a/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj b/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj index d05789bee1..dc0e1cb63b 100644 --- a/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj +++ b/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj @@ -3,7 +3,7 @@ - 0.4.0 + 0.5.0