From 3b4db6df3509a7f391243f5ff4560f15ff6c175b Mon Sep 17 00:00:00 2001 From: Mikel Blanchard Date: Thu, 10 Aug 2023 13:50:09 -0700 Subject: [PATCH] [build] Use compiler constant to toggle experimental public apis (#4735) --- .editorconfig | 2 +- .github/workflows/apicompatibility.yml | 2 +- .github/workflows/ci.yml | 32 ++- .github/workflows/code-coverage.yml | 2 +- Directory.Packages.props | 4 +- NuGet.config | 11 +- build/Common.prod.props | 13 +- build/Common.props | 7 +- build/test-aot-compatibility.ps1 | 80 +++--- examples/AspNetCore/Program.cs | 2 + .../net462/PublicAPI.Unshipped.txt | 0 .../net6.0/PublicAPI.Unshipped.txt | 9 + .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../{ => Stable}/net462/PublicAPI.Shipped.txt | 0 .../Stable}/net462/PublicAPI.Unshipped.txt | 0 .../net6.0}/PublicAPI.Shipped.txt | 0 .../Stable}/net6.0/PublicAPI.Unshipped.txt | 0 .../netstandard2.0/PublicAPI.Shipped.txt} | 47 ++-- .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../AssemblyInfo.cs | 19 ++ .../CHANGELOG.md | 6 +- ...njectionLoggerProviderBuilderExtensions.cs | 69 ++++- ...ctionLoggingServiceCollectionExtensions.cs | 67 ++++- .../net462/PublicAPI.Unshipped.txt | 0 .../net6.0}/PublicAPI.Unshipped.txt | 0 .../netstandard2.0/PublicAPI.Unshipped.txt | 80 ++++++ .../{ => Stable}/net462/PublicAPI.Shipped.txt | 0 .../Stable/net462/PublicAPI.Unshipped.txt} | 0 .../net6.0}/PublicAPI.Shipped.txt | 0 .../net6.0/PublicAPI.Unshipped.txt} | 0 .../netstandard2.0/PublicAPI.Shipped.txt} | 258 ++++++------------ .../netstandard2.0/PublicAPI.Unshipped.txt} | 0 src/OpenTelemetry.Api/AssemblyInfo.cs | 14 +- src/OpenTelemetry.Api/CHANGELOG.md | 12 +- .../Logs/IDeferredLoggerProviderBuilder.cs | 13 +- .../Logs/LogRecordAttributeList.cs | 11 +- src/OpenTelemetry.Api/Logs/LogRecordData.cs | 11 +- .../Logs/LogRecordSeverity.cs | 11 +- .../Logs/LogRecordSeverityExtensions.cs | 11 +- src/OpenTelemetry.Api/Logs/Logger.cs | 11 +- src/OpenTelemetry.Api/Logs/LoggerProvider.cs | 11 +- .../Logs/LoggerProviderBuilder.cs | 11 +- .../net462/PublicAPI.Unshipped.txt | 0 .../net6.0/PublicAPI.Unshipped.txt | 3 + .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../{ => Stable}/net462/PublicAPI.Shipped.txt | 0 .../Stable/net462/PublicAPI.Unshipped.txt} | 0 .../net6.0}/PublicAPI.Shipped.txt | 0 .../Stable/net6.0/PublicAPI.Unshipped.txt | 0 .../netstandard2.0/PublicAPI.Shipped.txt} | 9 +- .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../CHANGELOG.md | 23 +- .../ConsoleExporterLoggingExtensions.cs | 42 ++- .../OpenTelemetry.Exporter.Console.csproj | 9 +- .../net462/PublicAPI.Unshipped.txt | 0 .../net6.0/PublicAPI.Unshipped.txt | 1 + .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../{ => Stable}/net462/PublicAPI.Shipped.txt | 0 .../Stable/net462/PublicAPI.Unshipped.txt | 0 .../net6.0}/PublicAPI.Shipped.txt | 0 .../Stable/net6.0/PublicAPI.Unshipped.txt | 0 .../netstandard2.0/PublicAPI.Shipped.txt} | 49 ++-- .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../CHANGELOG.md | 6 +- .../InMemoryExporterLoggingExtensions.cs | 14 +- .../OpenTelemetry.Exporter.InMemory.csproj | 2 +- .../net462/PublicAPI.Unshipped.txt | 0 .../net6.0/PublicAPI.Unshipped.txt | 0 .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../netstandard2.1/PublicAPI.Unshipped.txt | 0 .../{ => Stable}/net462/PublicAPI.Shipped.txt | 0 .../net462/PublicAPI.Unshipped.txt | 0 .../{ => Stable}/net6.0/PublicAPI.Shipped.txt | 0 .../net6.0/PublicAPI.Unshipped.txt | 0 .../netstandard2.0/PublicAPI.Shipped.txt | 0 .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../netstandard2.1/PublicAPI.Shipped.txt | 0 .../netstandard2.1/PublicAPI.Unshipped.txt | 0 .../CHANGELOG.md | 22 +- ...etry.Exporter.OpenTelemetryProtocol.csproj | 9 +- .../net462/PublicAPI.Unshipped.txt | 2 + .../net6.0/PublicAPI.Unshipped.txt | 2 + .../netstandard2.0/PublicAPI.Unshipped.txt | 2 + .../{ => Stable}/net462/PublicAPI.Shipped.txt | 0 .../Stable/net462/PublicAPI.Unshipped.txt | 0 .../{ => Stable}/net6.0/PublicAPI.Shipped.txt | 0 .../Stable/net6.0/PublicAPI.Unshipped.txt | 0 .../netstandard2.0/PublicAPI.Shipped.txt | 0 .../netstandard2.0/PublicAPI.Unshipped.txt | 0 .../AssemblyInfo.cs | 4 +- .../CHANGELOG.md | 5 + .../OpenTelemetry.Extensions.Hosting.csproj | 2 +- .../OpenTelemetryBuilder.cs | 33 ++- .../.publicApi/net6.0/PublicAPI.Unshipped.txt | 1 + .../.publicApi/net7.0/PublicAPI.Unshipped.txt | 1 + .../netstandard2.0/PublicAPI.Unshipped.txt | 1 + .../netstandard2.1/PublicAPI.Unshipped.txt | 1 + .../net462}/PublicAPI.Unshipped.txt | 8 - .../net6.0}/PublicAPI.Unshipped.txt | 8 - .../netstandard2.0/PublicAPI.Unshipped.txt | 8 - .../netstandard2.1}/PublicAPI.Unshipped.txt | 8 - .../{ => Stable}/net462/PublicAPI.Shipped.txt | 0 .../Stable/net462/PublicAPI.Unshipped.txt | 8 + .../{ => Stable}/net6.0/PublicAPI.Shipped.txt | 0 .../Stable/net6.0/PublicAPI.Unshipped.txt | 8 + .../netstandard2.0/PublicAPI.Shipped.txt | 0 .../netstandard2.0/PublicAPI.Unshipped.txt | 8 + .../netstandard2.1/PublicAPI.Shipped.txt | 0 .../netstandard2.1/PublicAPI.Unshipped.txt | 8 + src/OpenTelemetry/AssemblyInfo.cs | 20 ++ src/OpenTelemetry/CHANGELOG.md | 45 +-- .../LoggerProviderBuilderExtensions.cs | 90 +++++- src/OpenTelemetry/Logs/LogRecord.cs | 33 ++- .../Logs/LoggerProviderExtensions.cs | 67 ++++- .../Builder/MeterProviderBuilderExtensions.cs | 45 +-- .../Exemplar/AlwaysOffExemplarFilter.cs | 12 +- .../Exemplar/AlwaysOnExemplarFilter.cs | 11 +- .../Metrics/Exemplar/Exemplar.cs | 16 +- .../Metrics/Exemplar/ExemplarFilter.cs | 11 +- .../Exemplar/TraceBasedExemplarFilter.cs | 12 +- src/OpenTelemetry/Metrics/MetricPoint.cs | 13 +- src/OpenTelemetry/Sdk.cs | 43 ++- 122 files changed, 1112 insertions(+), 439 deletions(-) rename src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/{ => Experimental}/net462/PublicAPI.Unshipped.txt (100%) create mode 100644 src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/{ => Experimental}/netstandard2.0/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/{ => Stable}/net462/PublicAPI.Shipped.txt (100%) rename src/{OpenTelemetry.Extensions.Hosting/.publicApi => OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable}/net462/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/{netstandard2.0 => Stable/net6.0}/PublicAPI.Shipped.txt (100%) rename src/{OpenTelemetry.Extensions.Hosting/.publicApi => OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable}/net6.0/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/{net6.0/PublicAPI.Unshipped.txt => Stable/netstandard2.0/PublicAPI.Shipped.txt} (66%) rename src/{OpenTelemetry.Extensions.Hosting/.publicApi => OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable}/netstandard2.0/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Api/.publicApi/{ => Experimental}/net462/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Api/.publicApi/{netstandard2.0 => Experimental/net6.0}/PublicAPI.Unshipped.txt (100%) create mode 100644 src/OpenTelemetry.Api/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Api/.publicApi/{ => Stable}/net462/PublicAPI.Shipped.txt (100%) rename src/{OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net6.0/PublicAPI.Shipped.txt => OpenTelemetry.Api/.publicApi/Stable/net462/PublicAPI.Unshipped.txt} (100%) rename src/OpenTelemetry.Api/.publicApi/{netstandard2.0 => Stable/net6.0}/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.Api/.publicApi/{net6.0/PublicAPI.Shipped.txt => Stable/net6.0/PublicAPI.Unshipped.txt} (100%) rename src/OpenTelemetry.Api/.publicApi/{net6.0/PublicAPI.Unshipped.txt => Stable/netstandard2.0/PublicAPI.Shipped.txt} (77%) rename src/{OpenTelemetry.Exporter.Console/.publicApi/net6.0/PublicAPI.Shipped.txt => OpenTelemetry.Api/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt} (100%) rename src/OpenTelemetry.Exporter.Console/.publicApi/{ => Experimental}/net462/PublicAPI.Unshipped.txt (100%) create mode 100644 src/OpenTelemetry.Exporter.Console/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Exporter.Console/.publicApi/{ => Experimental}/netstandard2.0/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Exporter.Console/.publicApi/{ => Stable}/net462/PublicAPI.Shipped.txt (100%) rename src/{OpenTelemetry.Exporter.InMemory/.publicApi/net6.0/PublicAPI.Shipped.txt => OpenTelemetry.Exporter.Console/.publicApi/Stable/net462/PublicAPI.Unshipped.txt} (100%) rename src/OpenTelemetry.Exporter.Console/.publicApi/{netstandard2.0 => Stable/net6.0}/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Exporter.Console/.publicApi/{net6.0/PublicAPI.Unshipped.txt => Stable/netstandard2.0/PublicAPI.Shipped.txt} (86%) create mode 100644 src/OpenTelemetry.Exporter.Console/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Exporter.InMemory/.publicApi/{ => Experimental}/net462/PublicAPI.Unshipped.txt (100%) create mode 100644 src/OpenTelemetry.Exporter.InMemory/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Exporter.InMemory/.publicApi/{ => Experimental}/netstandard2.0/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Exporter.InMemory/.publicApi/{ => Stable}/net462/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net462/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Exporter.InMemory/.publicApi/{netstandard2.0 => Stable/net6.0}/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Exporter.InMemory/.publicApi/{net6.0/PublicAPI.Unshipped.txt => Stable/netstandard2.0/PublicAPI.Shipped.txt} (92%) create mode 100644 src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt create mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt create mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt create mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt create mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/netstandard2.1/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/{ => Stable}/net462/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/{ => Stable}/net462/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/{ => Stable}/net6.0/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/{ => Stable}/net6.0/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/{ => Stable}/netstandard2.0/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/{ => Stable}/netstandard2.0/PublicAPI.Unshipped.txt (100%) rename src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/{ => Stable}/netstandard2.1/PublicAPI.Shipped.txt (100%) rename src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/{ => Stable}/netstandard2.1/PublicAPI.Unshipped.txt (100%) create mode 100644 src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt create mode 100644 src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt create mode 100644 src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Extensions.Hosting/.publicApi/{ => Stable}/net462/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net462/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Extensions.Hosting/.publicApi/{ => Stable}/net6.0/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry.Extensions.Hosting/.publicApi/{ => Stable}/netstandard2.0/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry/.publicApi/{netstandard2.1 => Experimental/net462}/PublicAPI.Unshipped.txt (87%) rename src/OpenTelemetry/.publicApi/{net462 => Experimental/net6.0}/PublicAPI.Unshipped.txt (87%) rename src/OpenTelemetry/.publicApi/{ => Experimental}/netstandard2.0/PublicAPI.Unshipped.txt (87%) rename src/OpenTelemetry/.publicApi/{net6.0 => Experimental/netstandard2.1}/PublicAPI.Unshipped.txt (87%) rename src/OpenTelemetry/.publicApi/{ => Stable}/net462/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry/.publicApi/Stable/net462/PublicAPI.Unshipped.txt rename src/OpenTelemetry/.publicApi/{ => Stable}/net6.0/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry/.publicApi/{ => Stable}/netstandard2.0/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt rename src/OpenTelemetry/.publicApi/{ => Stable}/netstandard2.1/PublicAPI.Shipped.txt (100%) create mode 100644 src/OpenTelemetry/.publicApi/Stable/netstandard2.1/PublicAPI.Unshipped.txt diff --git a/.editorconfig b/.editorconfig index fcbf24f9a5d..63cdbe40a1a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -34,7 +34,7 @@ csharp_indent_switch_labels = true csharp_indent_labels = flush_left # Modifier preferences -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion +csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent # this. preferences diff --git a/.github/workflows/apicompatibility.yml b/.github/workflows/apicompatibility.yml index 1242d3e5542..8451c890c87 100644 --- a/.github/workflows/apicompatibility.yml +++ b/.github/workflows/apicompatibility.yml @@ -24,4 +24,4 @@ jobs: run: dotnet restore - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f532267044..68105bc9234 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: - '**.md' jobs: - build-test: + build-test-stable: strategy: fail-fast: false # ensures the entire test matrix is run, even if one permutation fails matrix: @@ -34,7 +34,35 @@ jobs: run: dotnet restore - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=false + + - name: Test ${{ matrix.version }} + run: dotnet test **/bin/**/${{ matrix.version }}/*.Tests.dll --logger:"console;verbosity=detailed" + + build-test-experimental: + strategy: + fail-fast: false # ensures the entire test matrix is run, even if one permutation fails + matrix: + os: [ windows-latest, ubuntu-latest ] + version: [ net462, net6.0, net7.0 ] + exclude: + - os: ubuntu-latest + version: net462 + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # fetching all + + - name: Setup dotnet + uses: actions/setup-dotnet@v3 + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=true - name: Test ${{ matrix.version }} run: dotnet test **/bin/**/${{ matrix.version }}/*.Tests.dll --logger:"console;verbosity=detailed" diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 571b6cf8f60..4ff17a15ea6 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -31,7 +31,7 @@ jobs: run: dotnet restore - name: dotnet build - run: dotnet build --configuration Release --no-restore + run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=true # - name: dotnet test # run: dotnet test --collect:"XPlat Code Coverage" --results-directory:"TestResults" --configuration Release --no-build -- RunConfiguration.DisableAppDomain=true diff --git a/Directory.Packages.props b/Directory.Packages.props index a5a8514dc1d..fc53674953f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -67,7 +67,7 @@ - + @@ -81,7 +81,7 @@ - + diff --git a/NuGet.config b/NuGet.config index c821ba89f4e..6f5c8246395 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,11 +1,9 @@ - + - + @@ -16,8 +14,11 @@ + + + - + diff --git a/build/Common.prod.props b/build/Common.prod.props index 0db040be0dd..0968f64c5a0 100644 --- a/build/Common.prod.props +++ b/build/Common.prod.props @@ -46,14 +46,17 @@ $(NoWarn),1573,1712 $(Build_ArtifactStagingDirectory) true - $(RepoRoot)\build\GlobalAttrExclusions.txt $(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(BuildNumber) + true + false + + @@ -89,10 +92,10 @@ - - - - + + + + diff --git a/build/Common.props b/build/Common.props index c76d4fc1d51..90abd8e31cc 100644 --- a/build/Common.props +++ b/build/Common.props @@ -1,6 +1,6 @@ - 10.0 + latest true $([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName) $(MSBuildThisFileDirectory)debug.snk @@ -11,6 +11,11 @@ enable + true + + + + $(DefineConstants);EXPOSE_EXPERIMENTAL_FEATURES diff --git a/build/test-aot-compatibility.ps1 b/build/test-aot-compatibility.ps1 index 62f2f5770b6..c249e7a4089 100644 --- a/build/test-aot-compatibility.ps1 +++ b/build/test-aot-compatibility.ps1 @@ -1,40 +1,40 @@ -param([string]$targetNetFramework) - -$rootDirectory = Split-Path $PSScriptRoot -Parent -$publishOutput = dotnet publish $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj -nodeReuse:false /p:UseSharedCompilation=false - -$actualWarningCount = 0 - -foreach ($line in $($publishOutput -split "`r`n")) -{ - if ($line -like "*analysis warning IL*") - { - Write-Host $line - $actualWarningCount += 1 - } -} - -pushd $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Debug/$targetNetFramework/linux-x64 - -Write-Host "Executing test App..." -./OpenTelemetry.AotCompatibility.TestApp -Write-Host "Finished executing test App" - -if ($LastExitCode -ne 0) -{ - Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode -} - -popd - -Write-Host "Actual warning count is:", $actualWarningCount -$expectedWarningCount = 28 - -$testPassed = 0 -if ($actualWarningCount -ne $expectedWarningCount) -{ - $testPassed = 1 - Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount -} - -Exit $testPassed +param([string]$targetNetFramework) + +$rootDirectory = Split-Path $PSScriptRoot -Parent +$publishOutput = dotnet publish $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj -nodeReuse:false /p:UseSharedCompilation=false /p:ExposeExperimentalFeatures=true + +$actualWarningCount = 0 + +foreach ($line in $($publishOutput -split "`r`n")) +{ + if ($line -like "*analysis warning IL*") + { + Write-Host $line + $actualWarningCount += 1 + } +} + +pushd $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Debug/$targetNetFramework/linux-x64 + +Write-Host "Executing test App..." +./OpenTelemetry.AotCompatibility.TestApp +Write-Host "Finished executing test App" + +if ($LastExitCode -ne 0) +{ + Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode +} + +popd + +Write-Host "Actual warning count is:", $actualWarningCount +$expectedWarningCount = 28 + +$testPassed = 0 +if ($actualWarningCount -ne $expectedWarningCount) +{ + $testPassed = 1 + Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount +} + +Exit $testPassed diff --git a/examples/AspNetCore/Program.cs b/examples/AspNetCore/Program.cs index bc4e0602cda..33e2a08abf0 100644 --- a/examples/AspNetCore/Program.cs +++ b/examples/AspNetCore/Program.cs @@ -110,7 +110,9 @@ // Ensure the MeterProvider subscribes to any custom Meters. builder .AddMeter(Instrumentation.MeterName) +#if EXPOSE_EXPERIMENTAL_FEATURES .SetExemplarFilter(new TraceBasedExemplarFilter()) +#endif .AddRuntimeInstrumentation() .AddHttpClientInstrumentation() .AddAspNetCoreInstrumentation(); diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net462/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..a0f2e472dd6 --- /dev/null +++ b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt @@ -0,0 +1,9 @@ +OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions +OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions +static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder) -> OpenTelemetry.Logs.LoggerProviderBuilder! +static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Logs.LoggerProviderBuilder! +static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Logs.LoggerProviderBuilder! +static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, T! instrumentation) -> OpenTelemetry.Logs.LoggerProviderBuilder! +static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Action! configure) -> OpenTelemetry.Logs.LoggerProviderBuilder! +static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.ConfigureOpenTelemetryLoggerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! +static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.ConfigureOpenTelemetryLoggerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/net462/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net462/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/net462/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/net462/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Extensions.Hosting/.publicApi/net462/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/net462/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/netstandard2.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Extensions.Hosting/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt similarity index 66% rename from src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt index b552d2cb69c..a647699c919 100644 --- a/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt @@ -1,28 +1,19 @@ -#nullable enable -OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions -OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMetricsServiceCollectionExtensions -OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions -OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracingServiceCollectionExtensions -static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder) -> OpenTelemetry.Metrics.MeterProviderBuilder! -static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Metrics.MeterProviderBuilder! -static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Metrics.MeterProviderBuilder! -static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, T! instrumentation) -> OpenTelemetry.Metrics.MeterProviderBuilder! -static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Action! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder! -static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMetricsServiceCollectionExtensions.ConfigureOpenTelemetryMeterProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMetricsServiceCollectionExtensions.ConfigureOpenTelemetryMeterProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder) -> OpenTelemetry.Trace.TracerProviderBuilder! -static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder! -static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder! -static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, T! instrumentation) -> OpenTelemetry.Trace.TracerProviderBuilder! -static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, System.Action! configure) -> OpenTelemetry.Trace.TracerProviderBuilder! -static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracingServiceCollectionExtensions.ConfigureOpenTelemetryTracerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracingServiceCollectionExtensions.ConfigureOpenTelemetryTracerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions -OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions -static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder) -> OpenTelemetry.Logs.LoggerProviderBuilder! -static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Logs.LoggerProviderBuilder! -static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Logs.LoggerProviderBuilder! -static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, T! instrumentation) -> OpenTelemetry.Logs.LoggerProviderBuilder! -static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Logs.LoggerProviderBuilder! loggerProviderBuilder, System.Action! configure) -> OpenTelemetry.Logs.LoggerProviderBuilder! -static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.ConfigureOpenTelemetryLoggerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! -static OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.ConfigureOpenTelemetryLoggerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! \ No newline at end of file +#nullable enable +OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions +OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMetricsServiceCollectionExtensions +OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions +OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracingServiceCollectionExtensions +static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder) -> OpenTelemetry.Metrics.MeterProviderBuilder! +static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Metrics.MeterProviderBuilder! +static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Metrics.MeterProviderBuilder! +static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, T! instrumentation) -> OpenTelemetry.Metrics.MeterProviderBuilder! +static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Action! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder! +static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMetricsServiceCollectionExtensions.ConfigureOpenTelemetryMeterProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! +static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMetricsServiceCollectionExtensions.ConfigureOpenTelemetryMeterProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! +static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder) -> OpenTelemetry.Trace.TracerProviderBuilder! +static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder! +static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, System.Func! instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder! +static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.AddInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, T! instrumentation) -> OpenTelemetry.Trace.TracerProviderBuilder! +static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, System.Action! configure) -> OpenTelemetry.Trace.TracerProviderBuilder! +static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracingServiceCollectionExtensions.ConfigureOpenTelemetryTracerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! +static OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracingServiceCollectionExtensions.ConfigureOpenTelemetryTracerProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Extensions.Hosting/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/AssemblyInfo.cs b/src/OpenTelemetry.Api.ProviderBuilderExtensions/AssemblyInfo.cs index e1ba813e7aa..678ad1e5c91 100644 --- a/src/OpenTelemetry.Api.ProviderBuilderExtensions/AssemblyInfo.cs +++ b/src/OpenTelemetry.Api.ProviderBuilderExtensions/AssemblyInfo.cs @@ -19,3 +19,22 @@ [assembly: InternalsVisibleTo("OpenTelemetry" + AssemblyInfo.PublicKey)] [assembly: InternalsVisibleTo("OpenTelemetry.Tests" + AssemblyInfo.PublicKey)] [assembly: InternalsVisibleTo("OpenTelemetry.Api.ProviderBuilderExtensions.Tests" + AssemblyInfo.PublicKey)] + +#if !EXPOSE_EXPERIMENTAL_FEATURES +[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Console" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.Hosting" + AssemblyInfo.PublicKey)] +#endif + +#if SIGNED +file static class AssemblyInfo +{ + public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898"; + public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7"; +} +#else +file static class AssemblyInfo +{ + public const string PublicKey = ""; + public const string MoqPublicKey = ""; +} +#endif diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/CHANGELOG.md b/src/OpenTelemetry.Api.ProviderBuilderExtensions/CHANGELOG.md index 135e8f96372..80639a59e98 100644 --- a/src/OpenTelemetry.Api.ProviderBuilderExtensions/CHANGELOG.md +++ b/src/OpenTelemetry.Api.ProviderBuilderExtensions/CHANGELOG.md @@ -6,10 +6,12 @@ Released 2023-Jul-12 -* Added extension methods to support using the [Logs Bridge +* **Experimental (pre-release builds only):** Added extension methods to support + using the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/976432b74c565e8a84af3570e9b82cb95e1d844c/specification/logs/bridge-api.md) implementation (eg `LoggerProviderBuilder`) with dependency injection. - ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433)) + ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433), + [#4735](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4735)) ## 1.5.1 diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/Logs/OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.cs b/src/OpenTelemetry.Api.ProviderBuilderExtensions/Logs/OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.cs index 4c2a12c27ec..e113baa8cd4 100644 --- a/src/OpenTelemetry.Api.ProviderBuilderExtensions/Logs/OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Api.ProviderBuilderExtensions/Logs/OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions.cs @@ -26,8 +26,26 @@ namespace OpenTelemetry.Logs; /// /// Contains extension methods for the class. /// -public static class OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions +#if EXPOSE_EXPERIMENTAL_FEATURES + public +#else + internal +#endif + static class OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions { +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Adds instrumentation to the provider. + /// + /// + /// + /// Note: The type specified by will be + /// registered as a singleton service into application services. + /// + /// Instrumentation type. + /// . + /// The supplied for chaining. +#else /// /// Adds instrumentation to the provider. /// @@ -38,6 +56,7 @@ public static class OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensi /// Instrumentation type. /// . /// The supplied for chaining. +#endif public static LoggerProviderBuilder AddInstrumentation< #if NET6_0_OR_GREATER [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] @@ -55,13 +74,24 @@ public static LoggerProviderBuilder AddInstrumentation< return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Adds instrumentation to the provider. /// /// Instrumentation type. + /// WARNING: This is an experimental API which might change or be removed in the future. Use at your own risk. /// . /// Instrumentation instance. /// The supplied for chaining. +#else + /// + /// Adds instrumentation to the provider. + /// + /// Instrumentation type. + /// . + /// Instrumentation instance. + /// The supplied for chaining. +#endif public static LoggerProviderBuilder AddInstrumentation(this LoggerProviderBuilder loggerProviderBuilder, T instrumentation) where T : class { @@ -75,6 +105,16 @@ public static LoggerProviderBuilder AddInstrumentation(this LoggerProviderBui return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Adds instrumentation to the provider. + /// + /// Instrumentation type. + /// + /// . + /// Instrumentation factory. + /// The supplied for chaining. +#else /// /// Adds instrumentation to the provider. /// @@ -82,6 +122,7 @@ public static LoggerProviderBuilder AddInstrumentation(this LoggerProviderBui /// . /// Instrumentation factory. /// The supplied for chaining. +#endif public static LoggerProviderBuilder AddInstrumentation( this LoggerProviderBuilder loggerProviderBuilder, Func instrumentationFactory) @@ -97,6 +138,16 @@ public static LoggerProviderBuilder AddInstrumentation( return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Adds instrumentation to the provider. + /// + /// Instrumentation type. + /// + /// . + /// Instrumentation factory. + /// The supplied for chaining. +#else /// /// Adds instrumentation to the provider. /// @@ -104,6 +155,7 @@ public static LoggerProviderBuilder AddInstrumentation( /// . /// Instrumentation factory. /// The supplied for chaining. +#endif public static LoggerProviderBuilder AddInstrumentation( this LoggerProviderBuilder loggerProviderBuilder, Func instrumentationFactory) @@ -123,17 +175,32 @@ public static LoggerProviderBuilder AddInstrumentation( return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Register a callback action to configure the where logging services are configured. /// /// + /// /// Note: Logging services are only available during the application /// configuration phase. /// /// . /// Configuration callback. /// The supplied for chaining. +#else + /// + /// Register a callback action to configure the where logging services are configured. + /// + /// + /// Note: Logging services are only available during the application + /// configuration phase. + /// + /// . + /// Configuration callback. + /// The supplied for chaining. +#endif public static LoggerProviderBuilder ConfigureServices( this LoggerProviderBuilder loggerProviderBuilder, Action configure) diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/Logs/OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.cs b/src/OpenTelemetry.Api.ProviderBuilderExtensions/Logs/OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.cs index f9679b1e9de..14102cf30da 100644 --- a/src/OpenTelemetry.Api.ProviderBuilderExtensions/Logs/OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.cs +++ b/src/OpenTelemetry.Api.ProviderBuilderExtensions/Logs/OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.cs @@ -22,13 +22,20 @@ namespace OpenTelemetry.Logs; /// /// Extension methods for setting up OpenTelemetry logging services in an . /// -public static class OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions +#if EXPOSE_EXPERIMENTAL_FEATURES + public +#else + internal +#endif + static class OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions { +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Registers an action used to configure the OpenTelemetry . /// /// + /// /// Notes: /// /// This is safe to be called multiple times and by library authors. @@ -45,6 +52,29 @@ public static class OpenTelemetryDependencyInjectionLoggingServiceCollectionExte /// cref="LoggerProviderBuilder"/>. /// The so that additional calls /// can be chained. +#else + /// + /// Registers an action used to configure the OpenTelemetry . + /// + /// + /// Notes: + /// + /// This is safe to be called multiple times and by library authors. + /// Each registered configuration action will be applied + /// sequentially. + /// A will NOT be created automatically + /// using this method. To begin collecting logs use the + /// IServiceCollection.AddOpenTelemetry extension in the + /// OpenTelemetry.Extensions.Hosting package. + /// + /// + /// . + /// Callback action to configure the . + /// The so that additional calls + /// can be chained. +#endif public static IServiceCollection ConfigureOpenTelemetryLoggerProvider( this IServiceCollection services, Action configure) @@ -57,6 +87,40 @@ public static IServiceCollection ConfigureOpenTelemetryLoggerProvider( return services; } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Registers an action used to configure the OpenTelemetry once the + /// is available. + /// + /// + /// + /// Notes: + /// + /// This is safe to be called multiple times and by library authors. + /// Each registered configuration action will be applied + /// sequentially. + /// A will NOT be created automatically + /// using this method. To begin collecting logs use the + /// IServiceCollection.AddOpenTelemetry extension in the + /// OpenTelemetry.Extensions.Hosting package. + /// The supplied configuration delegate is called once the is available. Services may NOT be added to a + /// once the has been created. Many helper extensions + /// register services and may throw if invoked inside the configuration + /// delegate. If you don't need access to the + /// call instead which is safe to be used with + /// helper extensions. + /// + /// + /// . + /// Callback action to configure the . + /// The so that additional calls + /// can be chained. +#else /// /// Registers an action used to configure the OpenTelemetry once the @@ -88,6 +152,7 @@ public static IServiceCollection ConfigureOpenTelemetryLoggerProvider( /// cref="LoggerProviderBuilder"/>. /// The so that additional calls /// can be chained. +#endif public static IServiceCollection ConfigureOpenTelemetryLoggerProvider( this IServiceCollection services, Action configure) diff --git a/src/OpenTelemetry.Api/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Api/.publicApi/net462/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Api/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..29b616ee92c --- /dev/null +++ b/src/OpenTelemetry.Api/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt @@ -0,0 +1,80 @@ +abstract OpenTelemetry.Logs.Logger.EmitLog(in OpenTelemetry.Logs.LogRecordData data, in OpenTelemetry.Logs.LogRecordAttributeList attributes) -> void +abstract OpenTelemetry.Logs.LoggerProviderBuilder.AddInstrumentation(System.Func! instrumentationFactory) -> OpenTelemetry.Logs.LoggerProviderBuilder! +OpenTelemetry.Logs.IDeferredLoggerProviderBuilder +OpenTelemetry.Logs.IDeferredLoggerProviderBuilder.Configure(System.Action! configure) -> OpenTelemetry.Logs.LoggerProviderBuilder! +OpenTelemetry.Logs.Logger +OpenTelemetry.Logs.Logger.EmitLog(in OpenTelemetry.Logs.LogRecordData data) -> void +OpenTelemetry.Logs.Logger.Logger(string? name) -> void +OpenTelemetry.Logs.Logger.Name.get -> string! +OpenTelemetry.Logs.Logger.Version.get -> string? +OpenTelemetry.Logs.LoggerProvider +OpenTelemetry.Logs.LoggerProvider.GetLogger() -> OpenTelemetry.Logs.Logger! +OpenTelemetry.Logs.LoggerProvider.GetLogger(string? name) -> OpenTelemetry.Logs.Logger! +OpenTelemetry.Logs.LoggerProvider.GetLogger(string? name, string? version) -> OpenTelemetry.Logs.Logger! +OpenTelemetry.Logs.LoggerProvider.LoggerProvider() -> void +OpenTelemetry.Logs.LoggerProviderBuilder +OpenTelemetry.Logs.LoggerProviderBuilder.LoggerProviderBuilder() -> void +OpenTelemetry.Logs.LogRecordAttributeList +OpenTelemetry.Logs.LogRecordAttributeList.Add(string! key, object? value) -> void +OpenTelemetry.Logs.LogRecordAttributeList.Add(System.Collections.Generic.KeyValuePair attribute) -> void +OpenTelemetry.Logs.LogRecordAttributeList.Clear() -> void +OpenTelemetry.Logs.LogRecordAttributeList.Count.get -> int +OpenTelemetry.Logs.LogRecordAttributeList.Enumerator +OpenTelemetry.Logs.LogRecordAttributeList.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair +OpenTelemetry.Logs.LogRecordAttributeList.Enumerator.Dispose() -> void +OpenTelemetry.Logs.LogRecordAttributeList.Enumerator.Enumerator() -> void +OpenTelemetry.Logs.LogRecordAttributeList.Enumerator.MoveNext() -> bool +OpenTelemetry.Logs.LogRecordAttributeList.GetEnumerator() -> OpenTelemetry.Logs.LogRecordAttributeList.Enumerator +OpenTelemetry.Logs.LogRecordAttributeList.LogRecordAttributeList() -> void +OpenTelemetry.Logs.LogRecordAttributeList.RecordException(System.Exception! exception) -> void +OpenTelemetry.Logs.LogRecordAttributeList.this[int index].get -> System.Collections.Generic.KeyValuePair +OpenTelemetry.Logs.LogRecordAttributeList.this[int index].set -> void +OpenTelemetry.Logs.LogRecordAttributeList.this[string! key].set -> void +OpenTelemetry.Logs.LogRecordData +OpenTelemetry.Logs.LogRecordData.Body.get -> string? +OpenTelemetry.Logs.LogRecordData.Body.set -> void +OpenTelemetry.Logs.LogRecordData.LogRecordData() -> void +OpenTelemetry.Logs.LogRecordData.LogRecordData(in System.Diagnostics.ActivityContext activityContext) -> void +OpenTelemetry.Logs.LogRecordData.LogRecordData(System.Diagnostics.Activity? activity) -> void +OpenTelemetry.Logs.LogRecordData.Severity.get -> OpenTelemetry.Logs.LogRecordSeverity? +OpenTelemetry.Logs.LogRecordData.Severity.set -> void +OpenTelemetry.Logs.LogRecordData.SeverityText.get -> string? +OpenTelemetry.Logs.LogRecordData.SeverityText.set -> void +OpenTelemetry.Logs.LogRecordData.SpanId.get -> System.Diagnostics.ActivitySpanId +OpenTelemetry.Logs.LogRecordData.SpanId.set -> void +OpenTelemetry.Logs.LogRecordData.Timestamp.get -> System.DateTime +OpenTelemetry.Logs.LogRecordData.Timestamp.set -> void +OpenTelemetry.Logs.LogRecordData.TraceFlags.get -> System.Diagnostics.ActivityTraceFlags +OpenTelemetry.Logs.LogRecordData.TraceFlags.set -> void +OpenTelemetry.Logs.LogRecordData.TraceId.get -> System.Diagnostics.ActivityTraceId +OpenTelemetry.Logs.LogRecordData.TraceId.set -> void +OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Debug = 5 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Debug2 = 6 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Debug3 = 7 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Debug4 = 8 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Error = 17 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Error2 = 18 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Error3 = 19 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Error4 = 20 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Fatal = 21 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Fatal2 = 22 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Fatal3 = 23 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Fatal4 = 24 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Info = 9 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Info2 = 10 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Info3 = 11 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Info4 = 12 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Trace = 1 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Trace2 = 2 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Trace3 = 3 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Trace4 = 4 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Unspecified = 0 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Warn = 13 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Warn2 = 14 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Warn3 = 15 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverity.Warn4 = 16 -> OpenTelemetry.Logs.LogRecordSeverity +OpenTelemetry.Logs.LogRecordSeverityExtensions +static OpenTelemetry.Logs.LogRecordAttributeList.CreateFromEnumerable(System.Collections.Generic.IEnumerable>! attributes) -> OpenTelemetry.Logs.LogRecordAttributeList +static OpenTelemetry.Logs.LogRecordSeverityExtensions.ToShortName(this OpenTelemetry.Logs.LogRecordSeverity logRecordSeverity) -> string! +virtual OpenTelemetry.Logs.LoggerProvider.TryCreateLogger(string? name, out OpenTelemetry.Logs.Logger? logger) -> bool diff --git a/src/OpenTelemetry.Api/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry.Api/.publicApi/Stable/net462/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Api/.publicApi/net462/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Api/.publicApi/Stable/net462/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Api/.publicApi/Stable/net462/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Api.ProviderBuilderExtensions/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Api/.publicApi/Stable/net462/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Api/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Api/.publicApi/netstandard2.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Api/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Api/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Api/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Api/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Api/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Api/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt similarity index 77% rename from src/OpenTelemetry.Api/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Api/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt index 7f881125632..b33cbc15745 100644 --- a/src/OpenTelemetry.Api/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Api/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt @@ -1,22 +1,45 @@ #nullable enable +~abstract OpenTelemetry.Context.Propagation.TextMapPropagator.Extract(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Func> getter) -> OpenTelemetry.Context.Propagation.PropagationContext +~abstract OpenTelemetry.Context.Propagation.TextMapPropagator.Fields.get -> System.Collections.Generic.ISet +~abstract OpenTelemetry.Context.Propagation.TextMapPropagator.Inject(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Action setter) -> void +abstract OpenTelemetry.Context.RuntimeContextSlot.Get() -> T +abstract OpenTelemetry.Context.RuntimeContextSlot.Set(T value) -> void +~abstract OpenTelemetry.Metrics.MeterProviderBuilder.AddInstrumentation(System.Func instrumentationFactory) -> OpenTelemetry.Metrics.MeterProviderBuilder +~abstract OpenTelemetry.Metrics.MeterProviderBuilder.AddMeter(params string[] names) -> OpenTelemetry.Metrics.MeterProviderBuilder +~abstract OpenTelemetry.Trace.TracerProviderBuilder.AddInstrumentation(System.Func instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder +~abstract OpenTelemetry.Trace.TracerProviderBuilder.AddLegacySource(string operationName) -> OpenTelemetry.Trace.TracerProviderBuilder +~abstract OpenTelemetry.Trace.TracerProviderBuilder.AddSource(params string[] names) -> OpenTelemetry.Trace.TracerProviderBuilder OpenTelemetry.ActivityContextExtensions OpenTelemetry.Baggage OpenTelemetry.Baggage.Baggage() -> void OpenTelemetry.Baggage.ClearBaggage() -> OpenTelemetry.Baggage OpenTelemetry.Baggage.Count.get -> int OpenTelemetry.Baggage.Equals(OpenTelemetry.Baggage other) -> bool +~OpenTelemetry.Baggage.GetBaggage() -> System.Collections.Generic.IReadOnlyDictionary +~OpenTelemetry.Baggage.GetBaggage(string name) -> string +~OpenTelemetry.Baggage.GetEnumerator() -> System.Collections.Generic.Dictionary.Enumerator +~OpenTelemetry.Baggage.RemoveBaggage(string name) -> OpenTelemetry.Baggage +~OpenTelemetry.Baggage.SetBaggage(params System.Collections.Generic.KeyValuePair[] baggageItems) -> OpenTelemetry.Baggage +~OpenTelemetry.Baggage.SetBaggage(string name, string value) -> OpenTelemetry.Baggage +~OpenTelemetry.Baggage.SetBaggage(System.Collections.Generic.IEnumerable> baggageItems) -> OpenTelemetry.Baggage OpenTelemetry.BaseProvider +OpenTelemetry.BaseProvider.~BaseProvider() -> void OpenTelemetry.BaseProvider.BaseProvider() -> void OpenTelemetry.BaseProvider.Dispose() -> void -OpenTelemetry.BaseProvider.~BaseProvider() -> void OpenTelemetry.Context.AsyncLocalRuntimeContextSlot +~OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.AsyncLocalRuntimeContextSlot(string name) -> void +~OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.Value.get -> object +~OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.Value.set -> void OpenTelemetry.Context.IRuntimeContextSlotValueAccessor +~OpenTelemetry.Context.IRuntimeContextSlotValueAccessor.Value.get -> object +~OpenTelemetry.Context.IRuntimeContextSlotValueAccessor.Value.set -> void OpenTelemetry.Context.Propagation.B3Propagator OpenTelemetry.Context.Propagation.B3Propagator.B3Propagator() -> void OpenTelemetry.Context.Propagation.B3Propagator.B3Propagator(bool singleHeader) -> void OpenTelemetry.Context.Propagation.BaggagePropagator OpenTelemetry.Context.Propagation.BaggagePropagator.BaggagePropagator() -> void OpenTelemetry.Context.Propagation.CompositeTextMapPropagator +~OpenTelemetry.Context.Propagation.CompositeTextMapPropagator.CompositeTextMapPropagator(System.Collections.Generic.IEnumerable propagators) -> void OpenTelemetry.Context.Propagation.PropagationContext OpenTelemetry.Context.Propagation.PropagationContext.ActivityContext.get -> System.Diagnostics.ActivityContext OpenTelemetry.Context.Propagation.PropagationContext.Baggage.get -> OpenTelemetry.Baggage @@ -31,105 +54,50 @@ OpenTelemetry.Context.Propagation.TraceContextPropagator.TraceContextPropagator( OpenTelemetry.Context.RuntimeContext OpenTelemetry.Context.RuntimeContextSlot OpenTelemetry.Context.RuntimeContextSlot.Dispose() -> void +~OpenTelemetry.Context.RuntimeContextSlot.Name.get -> string +~OpenTelemetry.Context.RuntimeContextSlot.RuntimeContextSlot(string name) -> void OpenTelemetry.Context.ThreadLocalRuntimeContextSlot -OpenTelemetry.Logs.IDeferredLoggerProviderBuilder -OpenTelemetry.Logs.IDeferredLoggerProviderBuilder.Configure(System.Action! configure) -> OpenTelemetry.Logs.LoggerProviderBuilder! -OpenTelemetry.Logs.LogRecordAttributeList -OpenTelemetry.Logs.LogRecordAttributeList.Add(System.Collections.Generic.KeyValuePair attribute) -> void -OpenTelemetry.Logs.LogRecordAttributeList.Add(string! key, object? value) -> void -OpenTelemetry.Logs.LogRecordAttributeList.Clear() -> void -OpenTelemetry.Logs.LogRecordAttributeList.Count.get -> int -OpenTelemetry.Logs.LogRecordAttributeList.Enumerator -OpenTelemetry.Logs.LogRecordAttributeList.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair -OpenTelemetry.Logs.LogRecordAttributeList.Enumerator.Dispose() -> void -OpenTelemetry.Logs.LogRecordAttributeList.Enumerator.Enumerator() -> void -OpenTelemetry.Logs.LogRecordAttributeList.Enumerator.MoveNext() -> bool -OpenTelemetry.Logs.LogRecordAttributeList.GetEnumerator() -> OpenTelemetry.Logs.LogRecordAttributeList.Enumerator -OpenTelemetry.Logs.LogRecordAttributeList.LogRecordAttributeList() -> void -OpenTelemetry.Logs.LogRecordAttributeList.RecordException(System.Exception! exception) -> void -OpenTelemetry.Logs.LogRecordAttributeList.this[int index].get -> System.Collections.Generic.KeyValuePair -OpenTelemetry.Logs.LogRecordAttributeList.this[int index].set -> void -OpenTelemetry.Logs.LogRecordAttributeList.this[string! key].set -> void -OpenTelemetry.Logs.LogRecordData -OpenTelemetry.Logs.LogRecordData.Body.get -> string? -OpenTelemetry.Logs.LogRecordData.Body.set -> void -OpenTelemetry.Logs.LogRecordData.LogRecordData() -> void -OpenTelemetry.Logs.LogRecordData.LogRecordData(System.Diagnostics.Activity? activity) -> void -OpenTelemetry.Logs.LogRecordData.LogRecordData(in System.Diagnostics.ActivityContext activityContext) -> void -OpenTelemetry.Logs.LogRecordData.Severity.get -> OpenTelemetry.Logs.LogRecordSeverity? -OpenTelemetry.Logs.LogRecordData.Severity.set -> void -OpenTelemetry.Logs.LogRecordData.SeverityText.get -> string? -OpenTelemetry.Logs.LogRecordData.SeverityText.set -> void -OpenTelemetry.Logs.LogRecordData.SpanId.get -> System.Diagnostics.ActivitySpanId -OpenTelemetry.Logs.LogRecordData.SpanId.set -> void -OpenTelemetry.Logs.LogRecordData.Timestamp.get -> System.DateTime -OpenTelemetry.Logs.LogRecordData.Timestamp.set -> void -OpenTelemetry.Logs.LogRecordData.TraceFlags.get -> System.Diagnostics.ActivityTraceFlags -OpenTelemetry.Logs.LogRecordData.TraceFlags.set -> void -OpenTelemetry.Logs.LogRecordData.TraceId.get -> System.Diagnostics.ActivityTraceId -OpenTelemetry.Logs.LogRecordData.TraceId.set -> void -OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Debug = 5 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Debug2 = 6 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Debug3 = 7 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Debug4 = 8 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Error = 17 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Error2 = 18 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Error3 = 19 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Error4 = 20 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Fatal = 21 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Fatal2 = 22 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Fatal3 = 23 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Fatal4 = 24 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Info = 9 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Info2 = 10 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Info3 = 11 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Info4 = 12 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Trace = 1 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Trace2 = 2 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Trace3 = 3 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Trace4 = 4 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Unspecified = 0 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Warn = 13 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Warn2 = 14 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Warn3 = 15 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverity.Warn4 = 16 -> OpenTelemetry.Logs.LogRecordSeverity -OpenTelemetry.Logs.LogRecordSeverityExtensions -OpenTelemetry.Logs.Logger -OpenTelemetry.Logs.Logger.EmitLog(in OpenTelemetry.Logs.LogRecordData data) -> void -OpenTelemetry.Logs.Logger.Logger(string? name) -> void -OpenTelemetry.Logs.Logger.Name.get -> string! -OpenTelemetry.Logs.Logger.Version.get -> string? -OpenTelemetry.Logs.LoggerProvider -OpenTelemetry.Logs.LoggerProvider.GetLogger() -> OpenTelemetry.Logs.Logger! -OpenTelemetry.Logs.LoggerProvider.GetLogger(string? name) -> OpenTelemetry.Logs.Logger! -OpenTelemetry.Logs.LoggerProvider.GetLogger(string? name, string? version) -> OpenTelemetry.Logs.Logger! -OpenTelemetry.Logs.LoggerProvider.LoggerProvider() -> void -OpenTelemetry.Logs.LoggerProviderBuilder -OpenTelemetry.Logs.LoggerProviderBuilder.LoggerProviderBuilder() -> void +~OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.ThreadLocalRuntimeContextSlot(string name) -> void +~OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Value.get -> object +~OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Value.set -> void OpenTelemetry.Metrics.IDeferredMeterProviderBuilder +~OpenTelemetry.Metrics.IDeferredMeterProviderBuilder.Configure(System.Action configure) -> OpenTelemetry.Metrics.MeterProviderBuilder OpenTelemetry.Metrics.MeterProvider OpenTelemetry.Metrics.MeterProvider.MeterProvider() -> void OpenTelemetry.Metrics.MeterProviderBuilder OpenTelemetry.Metrics.MeterProviderBuilder.MeterProviderBuilder() -> void OpenTelemetry.Trace.ActivityExtensions OpenTelemetry.Trace.IDeferredTracerProviderBuilder +~OpenTelemetry.Trace.IDeferredTracerProviderBuilder.Configure(System.Action configure) -> OpenTelemetry.Trace.TracerProviderBuilder OpenTelemetry.Trace.Link +~OpenTelemetry.Trace.Link.Attributes.get -> System.Collections.Generic.IEnumerable> OpenTelemetry.Trace.Link.Context.get -> OpenTelemetry.Trace.SpanContext OpenTelemetry.Trace.Link.Equals(OpenTelemetry.Trace.Link other) -> bool OpenTelemetry.Trace.Link.Link() -> void OpenTelemetry.Trace.Link.Link(in OpenTelemetry.Trace.SpanContext spanContext) -> void +~OpenTelemetry.Trace.Link.Link(in OpenTelemetry.Trace.SpanContext spanContext, OpenTelemetry.Trace.SpanAttributes attributes) -> void OpenTelemetry.Trace.SpanAttributes +~OpenTelemetry.Trace.SpanAttributes.Add(string key, bool value) -> void +~OpenTelemetry.Trace.SpanAttributes.Add(string key, bool[] values) -> void +~OpenTelemetry.Trace.SpanAttributes.Add(string key, double value) -> void +~OpenTelemetry.Trace.SpanAttributes.Add(string key, double[] values) -> void +~OpenTelemetry.Trace.SpanAttributes.Add(string key, long value) -> void +~OpenTelemetry.Trace.SpanAttributes.Add(string key, long[] values) -> void +~OpenTelemetry.Trace.SpanAttributes.Add(string key, string value) -> void +~OpenTelemetry.Trace.SpanAttributes.Add(string key, string[] values) -> void OpenTelemetry.Trace.SpanAttributes.SpanAttributes() -> void +~OpenTelemetry.Trace.SpanAttributes.SpanAttributes(System.Collections.Generic.IEnumerable> attributes) -> void OpenTelemetry.Trace.SpanContext OpenTelemetry.Trace.SpanContext.Equals(OpenTelemetry.Trace.SpanContext other) -> bool OpenTelemetry.Trace.SpanContext.IsRemote.get -> bool OpenTelemetry.Trace.SpanContext.IsValid.get -> bool OpenTelemetry.Trace.SpanContext.SpanContext() -> void OpenTelemetry.Trace.SpanContext.SpanContext(in System.Diagnostics.ActivityContext activityContext) -> void +~OpenTelemetry.Trace.SpanContext.SpanContext(in System.Diagnostics.ActivityTraceId traceId, in System.Diagnostics.ActivitySpanId spanId, System.Diagnostics.ActivityTraceFlags traceFlags, bool isRemote = false, System.Collections.Generic.IEnumerable> traceState = null) -> void OpenTelemetry.Trace.SpanContext.SpanId.get -> System.Diagnostics.ActivitySpanId OpenTelemetry.Trace.SpanContext.TraceFlags.get -> System.Diagnostics.ActivityTraceFlags OpenTelemetry.Trace.SpanContext.TraceId.get -> System.Diagnostics.ActivityTraceId +~OpenTelemetry.Trace.SpanContext.TraceState.get -> System.Collections.Generic.IEnumerable> OpenTelemetry.Trace.SpanKind OpenTelemetry.Trace.SpanKind.Client = 3 -> OpenTelemetry.Trace.SpanKind OpenTelemetry.Trace.SpanKind.Consumer = 5 -> OpenTelemetry.Trace.SpanKind @@ -137,104 +105,28 @@ OpenTelemetry.Trace.SpanKind.Internal = 1 -> OpenTelemetry.Trace.SpanKind OpenTelemetry.Trace.SpanKind.Producer = 4 -> OpenTelemetry.Trace.SpanKind OpenTelemetry.Trace.SpanKind.Server = 2 -> OpenTelemetry.Trace.SpanKind OpenTelemetry.Trace.Status +~OpenTelemetry.Trace.Status.Description.get -> string OpenTelemetry.Trace.Status.Equals(OpenTelemetry.Trace.Status other) -> bool OpenTelemetry.Trace.Status.Status() -> void OpenTelemetry.Trace.Status.StatusCode.get -> OpenTelemetry.Trace.StatusCode +~OpenTelemetry.Trace.Status.WithDescription(string description) -> OpenTelemetry.Trace.Status OpenTelemetry.Trace.StatusCode OpenTelemetry.Trace.StatusCode.Error = 2 -> OpenTelemetry.Trace.StatusCode OpenTelemetry.Trace.StatusCode.Ok = 1 -> OpenTelemetry.Trace.StatusCode OpenTelemetry.Trace.StatusCode.Unset = 0 -> OpenTelemetry.Trace.StatusCode OpenTelemetry.Trace.TelemetrySpan +~OpenTelemetry.Trace.TelemetrySpan.AddEvent(string name) -> OpenTelemetry.Trace.TelemetrySpan +~OpenTelemetry.Trace.TelemetrySpan.AddEvent(string name, OpenTelemetry.Trace.SpanAttributes attributes) -> OpenTelemetry.Trace.TelemetrySpan +~OpenTelemetry.Trace.TelemetrySpan.AddEvent(string name, System.DateTimeOffset timestamp) -> OpenTelemetry.Trace.TelemetrySpan +~OpenTelemetry.Trace.TelemetrySpan.AddEvent(string name, System.DateTimeOffset timestamp, OpenTelemetry.Trace.SpanAttributes attributes) -> OpenTelemetry.Trace.TelemetrySpan OpenTelemetry.Trace.TelemetrySpan.Context.get -> OpenTelemetry.Trace.SpanContext OpenTelemetry.Trace.TelemetrySpan.Dispose() -> void OpenTelemetry.Trace.TelemetrySpan.End() -> void OpenTelemetry.Trace.TelemetrySpan.End(System.DateTimeOffset endTimestamp) -> void OpenTelemetry.Trace.TelemetrySpan.IsRecording.get -> bool OpenTelemetry.Trace.TelemetrySpan.ParentSpanId.get -> System.Diagnostics.ActivitySpanId -OpenTelemetry.Trace.TelemetrySpan.SetStatus(OpenTelemetry.Trace.Status value) -> void -OpenTelemetry.Trace.Tracer -OpenTelemetry.Trace.TracerProvider -OpenTelemetry.Trace.TracerProvider.TracerProvider() -> void -OpenTelemetry.Trace.TracerProviderBuilder -OpenTelemetry.Trace.TracerProviderBuilder.TracerProviderBuilder() -> void -abstract OpenTelemetry.Context.RuntimeContextSlot.Get() -> T -abstract OpenTelemetry.Context.RuntimeContextSlot.Set(T value) -> void -abstract OpenTelemetry.Logs.Logger.EmitLog(in OpenTelemetry.Logs.LogRecordData data, in OpenTelemetry.Logs.LogRecordAttributeList attributes) -> void -abstract OpenTelemetry.Logs.LoggerProviderBuilder.AddInstrumentation(System.Func! instrumentationFactory) -> OpenTelemetry.Logs.LoggerProviderBuilder! -override OpenTelemetry.Baggage.GetHashCode() -> int -override OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.Get() -> T -override OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.Set(T value) -> void -override OpenTelemetry.Context.Propagation.PropagationContext.GetHashCode() -> int -override OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Dispose(bool disposing) -> void -override OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Get() -> T -override OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Set(T value) -> void -override OpenTelemetry.Trace.Link.GetHashCode() -> int -override OpenTelemetry.Trace.SpanContext.GetHashCode() -> int -override OpenTelemetry.Trace.Status.GetHashCode() -> int -static OpenTelemetry.ActivityContextExtensions.IsValid(this System.Diagnostics.ActivityContext ctx) -> bool -static OpenTelemetry.Baggage.ClearBaggage(OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> OpenTelemetry.Baggage -static OpenTelemetry.Baggage.Current.get -> OpenTelemetry.Baggage -static OpenTelemetry.Baggage.Current.set -> void -static OpenTelemetry.Baggage.operator !=(OpenTelemetry.Baggage left, OpenTelemetry.Baggage right) -> bool -static OpenTelemetry.Baggage.operator ==(OpenTelemetry.Baggage left, OpenTelemetry.Baggage right) -> bool -static OpenTelemetry.Context.Propagation.PropagationContext.operator !=(OpenTelemetry.Context.Propagation.PropagationContext left, OpenTelemetry.Context.Propagation.PropagationContext right) -> bool -static OpenTelemetry.Context.Propagation.PropagationContext.operator ==(OpenTelemetry.Context.Propagation.PropagationContext left, OpenTelemetry.Context.Propagation.PropagationContext right) -> bool -static OpenTelemetry.Logs.LogRecordAttributeList.CreateFromEnumerable(System.Collections.Generic.IEnumerable>! attributes) -> OpenTelemetry.Logs.LogRecordAttributeList -static OpenTelemetry.Logs.LogRecordSeverityExtensions.ToShortName(this OpenTelemetry.Logs.LogRecordSeverity logRecordSeverity) -> string! -static OpenTelemetry.Trace.Link.operator !=(OpenTelemetry.Trace.Link link1, OpenTelemetry.Trace.Link link2) -> bool -static OpenTelemetry.Trace.Link.operator ==(OpenTelemetry.Trace.Link link1, OpenTelemetry.Trace.Link link2) -> bool -static OpenTelemetry.Trace.SpanContext.implicit operator System.Diagnostics.ActivityContext(OpenTelemetry.Trace.SpanContext spanContext) -> System.Diagnostics.ActivityContext -static OpenTelemetry.Trace.SpanContext.operator !=(OpenTelemetry.Trace.SpanContext spanContext1, OpenTelemetry.Trace.SpanContext spanContext2) -> bool -static OpenTelemetry.Trace.SpanContext.operator ==(OpenTelemetry.Trace.SpanContext spanContext1, OpenTelemetry.Trace.SpanContext spanContext2) -> bool -static OpenTelemetry.Trace.Status.operator !=(OpenTelemetry.Trace.Status status1, OpenTelemetry.Trace.Status status2) -> bool -static OpenTelemetry.Trace.Status.operator ==(OpenTelemetry.Trace.Status status1, OpenTelemetry.Trace.Status status2) -> bool -static readonly OpenTelemetry.Trace.Status.Error -> OpenTelemetry.Trace.Status -static readonly OpenTelemetry.Trace.Status.Ok -> OpenTelemetry.Trace.Status -static readonly OpenTelemetry.Trace.Status.Unset -> OpenTelemetry.Trace.Status -virtual OpenTelemetry.BaseProvider.Dispose(bool disposing) -> void -virtual OpenTelemetry.Context.RuntimeContextSlot.Dispose(bool disposing) -> void -virtual OpenTelemetry.Logs.LoggerProvider.TryCreateLogger(string? name, out OpenTelemetry.Logs.Logger? logger) -> bool -~OpenTelemetry.Baggage.GetBaggage() -> System.Collections.Generic.IReadOnlyDictionary -~OpenTelemetry.Baggage.GetBaggage(string name) -> string -~OpenTelemetry.Baggage.GetEnumerator() -> System.Collections.Generic.Dictionary.Enumerator -~OpenTelemetry.Baggage.RemoveBaggage(string name) -> OpenTelemetry.Baggage -~OpenTelemetry.Baggage.SetBaggage(System.Collections.Generic.IEnumerable> baggageItems) -> OpenTelemetry.Baggage -~OpenTelemetry.Baggage.SetBaggage(params System.Collections.Generic.KeyValuePair[] baggageItems) -> OpenTelemetry.Baggage -~OpenTelemetry.Baggage.SetBaggage(string name, string value) -> OpenTelemetry.Baggage -~OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.AsyncLocalRuntimeContextSlot(string name) -> void -~OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.Value.get -> object -~OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.Value.set -> void -~OpenTelemetry.Context.IRuntimeContextSlotValueAccessor.Value.get -> object -~OpenTelemetry.Context.IRuntimeContextSlotValueAccessor.Value.set -> void -~OpenTelemetry.Context.Propagation.CompositeTextMapPropagator.CompositeTextMapPropagator(System.Collections.Generic.IEnumerable propagators) -> void -~OpenTelemetry.Context.RuntimeContextSlot.Name.get -> string -~OpenTelemetry.Context.RuntimeContextSlot.RuntimeContextSlot(string name) -> void -~OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.ThreadLocalRuntimeContextSlot(string name) -> void -~OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Value.get -> object -~OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Value.set -> void -~OpenTelemetry.Metrics.IDeferredMeterProviderBuilder.Configure(System.Action configure) -> OpenTelemetry.Metrics.MeterProviderBuilder -~OpenTelemetry.Trace.IDeferredTracerProviderBuilder.Configure(System.Action configure) -> OpenTelemetry.Trace.TracerProviderBuilder -~OpenTelemetry.Trace.Link.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.Link.Link(in OpenTelemetry.Trace.SpanContext spanContext, OpenTelemetry.Trace.SpanAttributes attributes) -> void -~OpenTelemetry.Trace.SpanAttributes.Add(string key, bool value) -> void -~OpenTelemetry.Trace.SpanAttributes.Add(string key, bool[] values) -> void -~OpenTelemetry.Trace.SpanAttributes.Add(string key, double value) -> void -~OpenTelemetry.Trace.SpanAttributes.Add(string key, double[] values) -> void -~OpenTelemetry.Trace.SpanAttributes.Add(string key, long value) -> void -~OpenTelemetry.Trace.SpanAttributes.Add(string key, long[] values) -> void -~OpenTelemetry.Trace.SpanAttributes.Add(string key, string value) -> void -~OpenTelemetry.Trace.SpanAttributes.Add(string key, string[] values) -> void -~OpenTelemetry.Trace.SpanAttributes.SpanAttributes(System.Collections.Generic.IEnumerable> attributes) -> void -~OpenTelemetry.Trace.SpanContext.SpanContext(in System.Diagnostics.ActivityTraceId traceId, in System.Diagnostics.ActivitySpanId spanId, System.Diagnostics.ActivityTraceFlags traceFlags, bool isRemote = false, System.Collections.Generic.IEnumerable> traceState = null) -> void -~OpenTelemetry.Trace.SpanContext.TraceState.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.Status.Description.get -> string -~OpenTelemetry.Trace.Status.WithDescription(string description) -> OpenTelemetry.Trace.Status -~OpenTelemetry.Trace.TelemetrySpan.AddEvent(string name) -> OpenTelemetry.Trace.TelemetrySpan -~OpenTelemetry.Trace.TelemetrySpan.AddEvent(string name, OpenTelemetry.Trace.SpanAttributes attributes) -> OpenTelemetry.Trace.TelemetrySpan -~OpenTelemetry.Trace.TelemetrySpan.AddEvent(string name, System.DateTimeOffset timestamp) -> OpenTelemetry.Trace.TelemetrySpan -~OpenTelemetry.Trace.TelemetrySpan.AddEvent(string name, System.DateTimeOffset timestamp, OpenTelemetry.Trace.SpanAttributes attributes) -> OpenTelemetry.Trace.TelemetrySpan -~OpenTelemetry.Trace.TelemetrySpan.RecordException(System.Exception ex) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.TelemetrySpan.RecordException(string type, string message, string stacktrace) -> OpenTelemetry.Trace.TelemetrySpan +~OpenTelemetry.Trace.TelemetrySpan.RecordException(System.Exception ex) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.TelemetrySpan.SetAttribute(string key, bool value) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.TelemetrySpan.SetAttribute(string key, bool[] values) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.TelemetrySpan.SetAttribute(string key, double value) -> OpenTelemetry.Trace.TelemetrySpan @@ -243,22 +135,23 @@ virtual OpenTelemetry.Logs.LoggerProvider.TryCreateLogger(string? name, out Open ~OpenTelemetry.Trace.TelemetrySpan.SetAttribute(string key, int[] values) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.TelemetrySpan.SetAttribute(string key, string value) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.TelemetrySpan.SetAttribute(string key, string[] values) -> OpenTelemetry.Trace.TelemetrySpan +OpenTelemetry.Trace.TelemetrySpan.SetStatus(OpenTelemetry.Trace.Status value) -> void ~OpenTelemetry.Trace.TelemetrySpan.UpdateName(string name) -> OpenTelemetry.Trace.TelemetrySpan +OpenTelemetry.Trace.Tracer ~OpenTelemetry.Trace.Tracer.StartActiveSpan(string name, OpenTelemetry.Trace.SpanKind kind = OpenTelemetry.Trace.SpanKind.Internal, in OpenTelemetry.Trace.SpanContext parentContext = default(OpenTelemetry.Trace.SpanContext), OpenTelemetry.Trace.SpanAttributes initialAttributes = null, System.Collections.Generic.IEnumerable links = null, System.DateTimeOffset startTime = default(System.DateTimeOffset)) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.Tracer.StartActiveSpan(string name, OpenTelemetry.Trace.SpanKind kind, in OpenTelemetry.Trace.TelemetrySpan parentSpan, OpenTelemetry.Trace.SpanAttributes initialAttributes = null, System.Collections.Generic.IEnumerable links = null, System.DateTimeOffset startTime = default(System.DateTimeOffset)) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.Tracer.StartRootSpan(string name, OpenTelemetry.Trace.SpanKind kind = OpenTelemetry.Trace.SpanKind.Internal, OpenTelemetry.Trace.SpanAttributes initialAttributes = null, System.Collections.Generic.IEnumerable links = null, System.DateTimeOffset startTime = default(System.DateTimeOffset)) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.Tracer.StartSpan(string name, OpenTelemetry.Trace.SpanKind kind = OpenTelemetry.Trace.SpanKind.Internal, in OpenTelemetry.Trace.SpanContext parentContext = default(OpenTelemetry.Trace.SpanContext), OpenTelemetry.Trace.SpanAttributes initialAttributes = null, System.Collections.Generic.IEnumerable links = null, System.DateTimeOffset startTime = default(System.DateTimeOffset)) -> OpenTelemetry.Trace.TelemetrySpan ~OpenTelemetry.Trace.Tracer.StartSpan(string name, OpenTelemetry.Trace.SpanKind kind, in OpenTelemetry.Trace.TelemetrySpan parentSpan, OpenTelemetry.Trace.SpanAttributes initialAttributes = null, System.Collections.Generic.IEnumerable links = null, System.DateTimeOffset startTime = default(System.DateTimeOffset)) -> OpenTelemetry.Trace.TelemetrySpan +OpenTelemetry.Trace.TracerProvider ~OpenTelemetry.Trace.TracerProvider.GetTracer(string name, string version = null) -> OpenTelemetry.Trace.Tracer -~abstract OpenTelemetry.Context.Propagation.TextMapPropagator.Extract(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Func> getter) -> OpenTelemetry.Context.Propagation.PropagationContext -~abstract OpenTelemetry.Context.Propagation.TextMapPropagator.Fields.get -> System.Collections.Generic.ISet -~abstract OpenTelemetry.Context.Propagation.TextMapPropagator.Inject(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Action setter) -> void -~abstract OpenTelemetry.Metrics.MeterProviderBuilder.AddInstrumentation(System.Func instrumentationFactory) -> OpenTelemetry.Metrics.MeterProviderBuilder -~abstract OpenTelemetry.Metrics.MeterProviderBuilder.AddMeter(params string[] names) -> OpenTelemetry.Metrics.MeterProviderBuilder -~abstract OpenTelemetry.Trace.TracerProviderBuilder.AddInstrumentation(System.Func instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder -~abstract OpenTelemetry.Trace.TracerProviderBuilder.AddLegacySource(string operationName) -> OpenTelemetry.Trace.TracerProviderBuilder -~abstract OpenTelemetry.Trace.TracerProviderBuilder.AddSource(params string[] names) -> OpenTelemetry.Trace.TracerProviderBuilder +OpenTelemetry.Trace.TracerProvider.TracerProvider() -> void +OpenTelemetry.Trace.TracerProviderBuilder +OpenTelemetry.Trace.TracerProviderBuilder.TracerProviderBuilder() -> void ~override OpenTelemetry.Baggage.Equals(object obj) -> bool +override OpenTelemetry.Baggage.GetHashCode() -> int +override OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.Get() -> T +override OpenTelemetry.Context.AsyncLocalRuntimeContextSlot.Set(T value) -> void ~override OpenTelemetry.Context.Propagation.B3Propagator.Extract(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Func> getter) -> OpenTelemetry.Context.Propagation.PropagationContext ~override OpenTelemetry.Context.Propagation.B3Propagator.Fields.get -> System.Collections.Generic.ISet ~override OpenTelemetry.Context.Propagation.B3Propagator.Inject(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Action setter) -> void @@ -269,20 +162,35 @@ virtual OpenTelemetry.Logs.LoggerProvider.TryCreateLogger(string? name, out Open ~override OpenTelemetry.Context.Propagation.CompositeTextMapPropagator.Fields.get -> System.Collections.Generic.ISet ~override OpenTelemetry.Context.Propagation.CompositeTextMapPropagator.Inject(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Action setter) -> void ~override OpenTelemetry.Context.Propagation.PropagationContext.Equals(object obj) -> bool +override OpenTelemetry.Context.Propagation.PropagationContext.GetHashCode() -> int ~override OpenTelemetry.Context.Propagation.TraceContextPropagator.Extract(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Func> getter) -> OpenTelemetry.Context.Propagation.PropagationContext ~override OpenTelemetry.Context.Propagation.TraceContextPropagator.Fields.get -> System.Collections.Generic.ISet ~override OpenTelemetry.Context.Propagation.TraceContextPropagator.Inject(OpenTelemetry.Context.Propagation.PropagationContext context, T carrier, System.Action setter) -> void +override OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Dispose(bool disposing) -> void +override OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Get() -> T +override OpenTelemetry.Context.ThreadLocalRuntimeContextSlot.Set(T value) -> void ~override OpenTelemetry.Trace.Link.Equals(object obj) -> bool +override OpenTelemetry.Trace.Link.GetHashCode() -> int ~override OpenTelemetry.Trace.SpanContext.Equals(object obj) -> bool +override OpenTelemetry.Trace.SpanContext.GetHashCode() -> int ~override OpenTelemetry.Trace.Status.Equals(object obj) -> bool +override OpenTelemetry.Trace.Status.GetHashCode() -> int ~override OpenTelemetry.Trace.Status.ToString() -> string +static OpenTelemetry.ActivityContextExtensions.IsValid(this System.Diagnostics.ActivityContext ctx) -> bool +static OpenTelemetry.Baggage.ClearBaggage(OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> OpenTelemetry.Baggage ~static OpenTelemetry.Baggage.Create(System.Collections.Generic.Dictionary baggageItems = null) -> OpenTelemetry.Baggage +static OpenTelemetry.Baggage.Current.get -> OpenTelemetry.Baggage +static OpenTelemetry.Baggage.Current.set -> void ~static OpenTelemetry.Baggage.GetBaggage(OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> System.Collections.Generic.IReadOnlyDictionary ~static OpenTelemetry.Baggage.GetBaggage(string name, OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> string ~static OpenTelemetry.Baggage.GetEnumerator(OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> System.Collections.Generic.Dictionary.Enumerator +static OpenTelemetry.Baggage.operator !=(OpenTelemetry.Baggage left, OpenTelemetry.Baggage right) -> bool +static OpenTelemetry.Baggage.operator ==(OpenTelemetry.Baggage left, OpenTelemetry.Baggage right) -> bool ~static OpenTelemetry.Baggage.RemoveBaggage(string name, OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> OpenTelemetry.Baggage -~static OpenTelemetry.Baggage.SetBaggage(System.Collections.Generic.IEnumerable> baggageItems, OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> OpenTelemetry.Baggage ~static OpenTelemetry.Baggage.SetBaggage(string name, string value, OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> OpenTelemetry.Baggage +~static OpenTelemetry.Baggage.SetBaggage(System.Collections.Generic.IEnumerable> baggageItems, OpenTelemetry.Baggage baggage = default(OpenTelemetry.Baggage)) -> OpenTelemetry.Baggage +static OpenTelemetry.Context.Propagation.PropagationContext.operator !=(OpenTelemetry.Context.Propagation.PropagationContext left, OpenTelemetry.Context.Propagation.PropagationContext right) -> bool +static OpenTelemetry.Context.Propagation.PropagationContext.operator ==(OpenTelemetry.Context.Propagation.PropagationContext left, OpenTelemetry.Context.Propagation.PropagationContext right) -> bool ~static OpenTelemetry.Context.Propagation.Propagators.DefaultTextMapPropagator.get -> OpenTelemetry.Context.Propagation.TextMapPropagator ~static OpenTelemetry.Context.RuntimeContext.ContextSlotType.get -> System.Type ~static OpenTelemetry.Context.RuntimeContext.ContextSlotType.set -> void @@ -296,6 +204,18 @@ virtual OpenTelemetry.Logs.LoggerProvider.TryCreateLogger(string? name, out Open ~static OpenTelemetry.Trace.ActivityExtensions.RecordException(this System.Diagnostics.Activity activity, System.Exception ex) -> void ~static OpenTelemetry.Trace.ActivityExtensions.RecordException(this System.Diagnostics.Activity activity, System.Exception ex, in System.Diagnostics.TagList tags) -> void ~static OpenTelemetry.Trace.ActivityExtensions.SetStatus(this System.Diagnostics.Activity activity, OpenTelemetry.Trace.Status status) -> void +static OpenTelemetry.Trace.Link.operator !=(OpenTelemetry.Trace.Link link1, OpenTelemetry.Trace.Link link2) -> bool +static OpenTelemetry.Trace.Link.operator ==(OpenTelemetry.Trace.Link link1, OpenTelemetry.Trace.Link link2) -> bool +static OpenTelemetry.Trace.SpanContext.implicit operator System.Diagnostics.ActivityContext(OpenTelemetry.Trace.SpanContext spanContext) -> System.Diagnostics.ActivityContext +static OpenTelemetry.Trace.SpanContext.operator !=(OpenTelemetry.Trace.SpanContext spanContext1, OpenTelemetry.Trace.SpanContext spanContext2) -> bool +static OpenTelemetry.Trace.SpanContext.operator ==(OpenTelemetry.Trace.SpanContext spanContext1, OpenTelemetry.Trace.SpanContext spanContext2) -> bool +static OpenTelemetry.Trace.Status.operator !=(OpenTelemetry.Trace.Status status1, OpenTelemetry.Trace.Status status2) -> bool +static OpenTelemetry.Trace.Status.operator ==(OpenTelemetry.Trace.Status status1, OpenTelemetry.Trace.Status status2) -> bool ~static OpenTelemetry.Trace.Tracer.CurrentSpan.get -> OpenTelemetry.Trace.TelemetrySpan ~static OpenTelemetry.Trace.Tracer.WithSpan(OpenTelemetry.Trace.TelemetrySpan span) -> OpenTelemetry.Trace.TelemetrySpan -~static OpenTelemetry.Trace.TracerProvider.Default.get -> OpenTelemetry.Trace.TracerProvider \ No newline at end of file +~static OpenTelemetry.Trace.TracerProvider.Default.get -> OpenTelemetry.Trace.TracerProvider +static readonly OpenTelemetry.Trace.Status.Error -> OpenTelemetry.Trace.Status +static readonly OpenTelemetry.Trace.Status.Ok -> OpenTelemetry.Trace.Status +static readonly OpenTelemetry.Trace.Status.Unset -> OpenTelemetry.Trace.Status +virtual OpenTelemetry.BaseProvider.Dispose(bool disposing) -> void +virtual OpenTelemetry.Context.RuntimeContextSlot.Dispose(bool disposing) -> void diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Api/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.Console/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Api/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Api/AssemblyInfo.cs b/src/OpenTelemetry.Api/AssemblyInfo.cs index 2af154f989e..3709e7402a8 100644 --- a/src/OpenTelemetry.Api/AssemblyInfo.cs +++ b/src/OpenTelemetry.Api/AssemblyInfo.cs @@ -23,14 +23,24 @@ [assembly: InternalsVisibleTo("OpenTelemetry.Tests" + AssemblyInfo.PublicKey)] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2" + AssemblyInfo.MoqPublicKey)] +#if !EXPOSE_EXPERIMENTAL_FEATURES +[assembly: InternalsVisibleTo("OpenTelemetry.Api.ProviderBuilderExtensions.Tests" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Console" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.InMemory" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.Hosting" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.Hosting.Tests" + AssemblyInfo.PublicKey)] +#endif + #if SIGNED -internal static class AssemblyInfo +file static class AssemblyInfo { public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898"; public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7"; } #else -internal static class AssemblyInfo +file static class AssemblyInfo { public const string PublicKey = ""; public const string MoqPublicKey = ""; diff --git a/src/OpenTelemetry.Api/CHANGELOG.md b/src/OpenTelemetry.Api/CHANGELOG.md index 30bd4685d90..1cd2eddfa1a 100644 --- a/src/OpenTelemetry.Api/CHANGELOG.md +++ b/src/OpenTelemetry.Api/CHANGELOG.md @@ -9,19 +9,19 @@ Released 2023-Jul-12 * Updated `System.Diagnostics.DiagnosticSource` package version to `7.0.2`. ([#4576](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4576)) -* **Breaking change** In order to make `RuntimeContext` compatible with - ahead-of-time compilation (AOT), - `RuntimeContext.ContextSlotType` can only be assigned one - of the following types: `AsyncLocalRuntimeContextSlot<>`, +* **Breaking change:** In order to make `RuntimeContext` compatible with + ahead-of-time compilation (AOT), `RuntimeContext.ContextSlotType` can only be + assigned one of the following types: `AsyncLocalRuntimeContextSlot<>`, `ThreadLocalRuntimeContextSlot<>`, and `RemotingRuntimeContextSlot<>`. A `System.NotSupportedException` will be thrown if you try to assign any type other than the three types mentioned. ([#4542](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4542)) -* Added [Logs Bridge +* **Experimental (pre-release builds only):** Added [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/976432b74c565e8a84af3570e9b82cb95e1d844c/specification/logs/bridge-api.md) implementation (`LoggerProviderBuilder`, `LoggerProvider`, `Logger`, etc.). - ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433)) + ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433), + [#4735](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4735)) ## 1.5.1 diff --git a/src/OpenTelemetry.Api/Logs/IDeferredLoggerProviderBuilder.cs b/src/OpenTelemetry.Api/Logs/IDeferredLoggerProviderBuilder.cs index 5c8585b799e..cf6852327ac 100644 --- a/src/OpenTelemetry.Api/Logs/IDeferredLoggerProviderBuilder.cs +++ b/src/OpenTelemetry.Api/Logs/IDeferredLoggerProviderBuilder.cs @@ -18,12 +18,23 @@ namespace OpenTelemetry.Logs; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Describes a logger provider builder that supports deferred /// initialization using an to perform /// dependency injection. /// -public interface IDeferredLoggerProviderBuilder +/// +public +#else +/// +/// Describes a logger provider builder that supports deferred +/// initialization using an to perform +/// dependency injection. +/// +internal +#endif + interface IDeferredLoggerProviderBuilder { /// /// Register a callback action to configure the /// Stores attributes to be added to a log message. /// -public struct LogRecordAttributeList : IReadOnlyList> +/// +public +#else +/// +/// Stores attributes to be added to a log message. +/// +internal +#endif + struct LogRecordAttributeList : IReadOnlyList> { internal const int OverflowMaxCount = 8; internal const int OverflowAdditionalCapacity = 16; diff --git a/src/OpenTelemetry.Api/Logs/LogRecordData.cs b/src/OpenTelemetry.Api/Logs/LogRecordData.cs index 6daefdcee74..37225cb3e74 100644 --- a/src/OpenTelemetry.Api/Logs/LogRecordData.cs +++ b/src/OpenTelemetry.Api/Logs/LogRecordData.cs @@ -20,10 +20,19 @@ namespace OpenTelemetry.Logs; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Stores details about a log message. /// -public struct LogRecordData +/// +public +#else +/// +/// Stores details about a log message. +/// +internal +#endif + struct LogRecordData { internal DateTime TimestampBacking = DateTime.UtcNow; diff --git a/src/OpenTelemetry.Api/Logs/LogRecordSeverity.cs b/src/OpenTelemetry.Api/Logs/LogRecordSeverity.cs index 076cd2545c0..3fc9a7aa660 100644 --- a/src/OpenTelemetry.Api/Logs/LogRecordSeverity.cs +++ b/src/OpenTelemetry.Api/Logs/LogRecordSeverity.cs @@ -18,10 +18,19 @@ namespace OpenTelemetry.Logs; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Describes the severity level of a log record. /// -public enum LogRecordSeverity +/// +public +#else +/// +/// Describes the severity level of a log record. +/// +internal +#endif + enum LogRecordSeverity { /// Unspecified severity (0). Unspecified = 0, diff --git a/src/OpenTelemetry.Api/Logs/LogRecordSeverityExtensions.cs b/src/OpenTelemetry.Api/Logs/LogRecordSeverityExtensions.cs index f86892c3181..0a9556e4b6a 100644 --- a/src/OpenTelemetry.Api/Logs/LogRecordSeverityExtensions.cs +++ b/src/OpenTelemetry.Api/Logs/LogRecordSeverityExtensions.cs @@ -18,10 +18,19 @@ namespace OpenTelemetry.Logs; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Contains extension methods for the enum. /// -public static class LogRecordSeverityExtensions +/// +public +#else +/// +/// Contains extension methods for the enum. +/// +internal +#endif + static class LogRecordSeverityExtensions { internal const string UnspecifiedShortName = "UNSPECIFIED"; diff --git a/src/OpenTelemetry.Api/Logs/Logger.cs b/src/OpenTelemetry.Api/Logs/Logger.cs index 25bd741f113..17297a977f1 100644 --- a/src/OpenTelemetry.Api/Logs/Logger.cs +++ b/src/OpenTelemetry.Api/Logs/Logger.cs @@ -18,10 +18,19 @@ namespace OpenTelemetry.Logs; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Logger is the class responsible for creating log records. /// -public abstract class Logger +/// WARNING: This is an experimental API which might change or be removed in the future. Use at your own risk. +public +#else +/// +/// Logger is the class responsible for creating log records. +/// +internal +#endif + abstract class Logger { /// /// Initializes a new instance of the class. diff --git a/src/OpenTelemetry.Api/Logs/LoggerProvider.cs b/src/OpenTelemetry.Api/Logs/LoggerProvider.cs index e0d71637664..a0e65003fac 100644 --- a/src/OpenTelemetry.Api/Logs/LoggerProvider.cs +++ b/src/OpenTelemetry.Api/Logs/LoggerProvider.cs @@ -22,10 +22,19 @@ namespace OpenTelemetry.Logs; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// LoggerProvider is the entry point of the OpenTelemetry API. It provides access to . /// -public class LoggerProvider : BaseProvider +/// +public +#else +/// +/// LoggerProvider is the entry point of the OpenTelemetry API. It provides access to . +/// +internal +#endif + class LoggerProvider : BaseProvider { private static readonly NoopLogger NoopLogger = new(); diff --git a/src/OpenTelemetry.Api/Logs/LoggerProviderBuilder.cs b/src/OpenTelemetry.Api/Logs/LoggerProviderBuilder.cs index c8379f46fb1..76e7ad33ecc 100644 --- a/src/OpenTelemetry.Api/Logs/LoggerProviderBuilder.cs +++ b/src/OpenTelemetry.Api/Logs/LoggerProviderBuilder.cs @@ -18,10 +18,19 @@ namespace OpenTelemetry.Logs; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// LoggerProviderBuilder base class. /// -public abstract class LoggerProviderBuilder +/// +public +#else +/// +/// LoggerProviderBuilder base class. +/// +internal +#endif + abstract class LoggerProviderBuilder { /// /// Initializes a new instance of the class. diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.Console/.publicApi/net462/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.Console/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..be114835ccd --- /dev/null +++ b/src/OpenTelemetry.Exporter.Console/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt @@ -0,0 +1,3 @@ +static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder) -> OpenTelemetry.Logs.LoggerProviderBuilder +static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, string name, System.Action configure) -> OpenTelemetry.Logs.LoggerProviderBuilder +static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, System.Action configure) -> OpenTelemetry.Logs.LoggerProviderBuilder diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.Console/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.Console/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net462/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.Console/.publicApi/net462/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net462/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net462/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.InMemory/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net462/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.Console/.publicApi/netstandard2.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt similarity index 86% rename from src/OpenTelemetry.Exporter.Console/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.Console/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt index edb9ad0036b..6f900a1f6f6 100644 --- a/src/OpenTelemetry.Exporter.Console/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt @@ -21,16 +21,13 @@ override OpenTelemetry.Exporter.ConsoleActivityExporter.Export(in OpenTelemetry. override OpenTelemetry.Exporter.ConsoleLogRecordExporter.Dispose(bool disposing) -> void override OpenTelemetry.Exporter.ConsoleLogRecordExporter.Export(in OpenTelemetry.Batch batch) -> OpenTelemetry.ExportResult override OpenTelemetry.Exporter.ConsoleMetricExporter.Export(in OpenTelemetry.Batch batch) -> OpenTelemetry.ExportResult -static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder) -> OpenTelemetry.Logs.LoggerProviderBuilder -static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, System.Action configure) -> OpenTelemetry.Logs.LoggerProviderBuilder -static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, string name, System.Action configure) -> OpenTelemetry.Logs.LoggerProviderBuilder static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions static OpenTelemetry.Logs.ConsoleExporterLoggingExtensions.AddConsoleExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Action configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions static OpenTelemetry.Metrics.ConsoleExporterMetricsExtensions.AddConsoleExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Metrics.ConsoleExporterMetricsExtensions.AddConsoleExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Action configureExporterAndMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Metrics.ConsoleExporterMetricsExtensions.AddConsoleExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Action configureExporter) -> OpenTelemetry.Metrics.MeterProviderBuilder static OpenTelemetry.Metrics.ConsoleExporterMetricsExtensions.AddConsoleExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action configureExporterAndMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder static OpenTelemetry.Metrics.ConsoleExporterMetricsExtensions.AddConsoleExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action configureExporter) -> OpenTelemetry.Metrics.MeterProviderBuilder +static OpenTelemetry.Metrics.ConsoleExporterMetricsExtensions.AddConsoleExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Action configureExporterAndMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder +static OpenTelemetry.Metrics.ConsoleExporterMetricsExtensions.AddConsoleExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Action configureExporter) -> OpenTelemetry.Metrics.MeterProviderBuilder static OpenTelemetry.Trace.ConsoleExporterHelperExtensions.AddConsoleExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder) -> OpenTelemetry.Trace.TracerProviderBuilder +static OpenTelemetry.Trace.ConsoleExporterHelperExtensions.AddConsoleExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, string name, System.Action configure) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.ConsoleExporterHelperExtensions.AddConsoleExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configure) -> OpenTelemetry.Trace.TracerProviderBuilder -static OpenTelemetry.Trace.ConsoleExporterHelperExtensions.AddConsoleExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, string name, System.Action configure) -> OpenTelemetry.Trace.TracerProviderBuilder \ No newline at end of file diff --git a/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Console/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.Console/CHANGELOG.md b/src/OpenTelemetry.Exporter.Console/CHANGELOG.md index e7c5255d82b..a62e73c8ee9 100644 --- a/src/OpenTelemetry.Exporter.Console/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Console/CHANGELOG.md @@ -6,16 +6,23 @@ Released 2023-Jul-12 -* Add back support for Exemplars. See [exemplars](../../docs/metrics/customizing-the-sdk/README.md#exemplars) - for instructions to enable exemplars. - ([#4553](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4553)) +* **Experimental (pre-release builds only):** + + * Note: See + [#4735](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4735) + for the introduction of experimental api support. + + * Add back support for Exemplars. See + [exemplars](../../docs/metrics/customizing-the-sdk/README.md#exemplars) for + instructions to enable exemplars. + ([#4553](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4553)) -* Updated to display `Severity` and `SeverityText` text instead of - `ILogger.LogLevel` when exporting `LogRecord` instances. - ([#4568](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4568)) + * Updated to display `Severity` and `SeverityText` text instead of + `ILogger.LogLevel` when exporting `LogRecord` instances. + ([#4568](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4568)) -* Added `LoggerProviderBuilder.AddConsoleExporter` registration extension. - ([#4583](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4583)) + * Added `LoggerProviderBuilder.AddConsoleExporter` registration extension. + ([#4583](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4583)) ## 1.5.1 diff --git a/src/OpenTelemetry.Exporter.Console/ConsoleExporterLoggingExtensions.cs b/src/OpenTelemetry.Exporter.Console/ConsoleExporterLoggingExtensions.cs index 23c7a78bd38..c041b43b3b6 100644 --- a/src/OpenTelemetry.Exporter.Console/ConsoleExporterLoggingExtensions.cs +++ b/src/OpenTelemetry.Exporter.Console/ConsoleExporterLoggingExtensions.cs @@ -48,26 +48,60 @@ public static OpenTelemetryLoggerOptions AddConsoleExporter(this OpenTelemetryLo return loggerOptions.AddProcessor(new SimpleLogRecordExportProcessor(new ConsoleLogRecordExporter(options))); } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Adds Console exporter with LoggerProviderBuilder. /// + /// WARNING: This is an experimental API which might change or be removed in the future. Use at your own risk. /// . /// The supplied instance of to chain the calls. - public static LoggerProviderBuilder AddConsoleExporter( + public +#else + /// + /// Adds Console exporter with LoggerProviderBuilder. + /// + /// . + /// The supplied instance of to chain the calls. + internal +#endif + static LoggerProviderBuilder AddConsoleExporter( this LoggerProviderBuilder loggerProviderBuilder) => AddConsoleExporter(loggerProviderBuilder, name: null, configure: null); +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Adds Console exporter with LoggerProviderBuilder. + /// + /// + /// . + /// Callback action for configuring . + /// The supplied instance of to chain the calls. + public +#else /// /// Adds Console exporter with LoggerProviderBuilder. /// /// . /// Callback action for configuring . /// The supplied instance of to chain the calls. - public static LoggerProviderBuilder AddConsoleExporter( + internal +#endif + static LoggerProviderBuilder AddConsoleExporter( this LoggerProviderBuilder loggerProviderBuilder, Action configure) => AddConsoleExporter(loggerProviderBuilder, name: null, configure); +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Adds Console exporter with LoggerProviderBuilder. + /// + /// + /// . + /// Name which is used when retrieving options. + /// Callback action for configuring . + /// The supplied instance of to chain the calls. + public +#else /// /// Adds Console exporter with LoggerProviderBuilder. /// @@ -75,7 +109,9 @@ public static LoggerProviderBuilder AddConsoleExporter( /// Name which is used when retrieving options. /// Callback action for configuring . /// The supplied instance of to chain the calls. - public static LoggerProviderBuilder AddConsoleExporter( + internal +#endif + static LoggerProviderBuilder AddConsoleExporter( this LoggerProviderBuilder loggerProviderBuilder, string name, Action configure) diff --git a/src/OpenTelemetry.Exporter.Console/OpenTelemetry.Exporter.Console.csproj b/src/OpenTelemetry.Exporter.Console/OpenTelemetry.Exporter.Console.csproj index 8c6aaed69e3..6b065829b60 100644 --- a/src/OpenTelemetry.Exporter.Console/OpenTelemetry.Exporter.Console.csproj +++ b/src/OpenTelemetry.Exporter.Console/OpenTelemetry.Exporter.Console.csproj @@ -29,12 +29,15 @@ - + - - + + + + + diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.InMemory/.publicApi/net462/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.InMemory/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..f7378ee36cc --- /dev/null +++ b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ +static OpenTelemetry.Logs.InMemoryExporterLoggingExtensions.AddInMemoryExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Logs.LoggerProviderBuilder diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.InMemory/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.InMemory/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net462/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.InMemory/.publicApi/net462/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net462/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net462/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.InMemory/.publicApi/netstandard2.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt similarity index 92% rename from src/OpenTelemetry.Exporter.InMemory/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt index 2d87e5058f5..499065e2d09 100644 --- a/src/OpenTelemetry.Exporter.InMemory/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt @@ -1,25 +1,24 @@ -OpenTelemetry.Exporter.InMemoryExporter -OpenTelemetry.Exporter.InMemoryExporter.InMemoryExporter(System.Collections.Generic.ICollection exportedItems) -> void -OpenTelemetry.Logs.InMemoryExporterLoggingExtensions -OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions -OpenTelemetry.Metrics.MetricSnapshot -OpenTelemetry.Metrics.MetricSnapshot.Description.get -> string -OpenTelemetry.Metrics.MetricSnapshot.MeterName.get -> string -OpenTelemetry.Metrics.MetricSnapshot.MeterVersion.get -> string -OpenTelemetry.Metrics.MetricSnapshot.MetricPoints.get -> System.Collections.Generic.IReadOnlyList -OpenTelemetry.Metrics.MetricSnapshot.MetricSnapshot(OpenTelemetry.Metrics.Metric metric) -> void -OpenTelemetry.Metrics.MetricSnapshot.MetricType.get -> OpenTelemetry.Metrics.MetricType -OpenTelemetry.Metrics.MetricSnapshot.Name.get -> string -OpenTelemetry.Metrics.MetricSnapshot.Unit.get -> string -OpenTelemetry.Trace.InMemoryExporterHelperExtensions -override OpenTelemetry.Exporter.InMemoryExporter.Dispose(bool disposing) -> void -override OpenTelemetry.Exporter.InMemoryExporter.Export(in OpenTelemetry.Batch batch) -> OpenTelemetry.ExportResult -static OpenTelemetry.Logs.InMemoryExporterLoggingExtensions.AddInMemoryExporter(this OpenTelemetry.Logs.LoggerProviderBuilder loggerProviderBuilder, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Logs.LoggerProviderBuilder -static OpenTelemetry.Logs.InMemoryExporterLoggingExtensions.AddInMemoryExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions -static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Collections.Generic.ICollection exportedItems, System.Action configureMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Collections.Generic.ICollection exportedItems, System.Action configureMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Collections.Generic.ICollection exportedItems, System.Action configureMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Collections.Generic.ICollection exportedItems, System.Action configureMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder -static OpenTelemetry.Trace.InMemoryExporterHelperExtensions.AddInMemoryExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Trace.TracerProviderBuilder \ No newline at end of file +OpenTelemetry.Exporter.InMemoryExporter +OpenTelemetry.Exporter.InMemoryExporter.InMemoryExporter(System.Collections.Generic.ICollection exportedItems) -> void +OpenTelemetry.Logs.InMemoryExporterLoggingExtensions +OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions +OpenTelemetry.Metrics.MetricSnapshot +OpenTelemetry.Metrics.MetricSnapshot.Description.get -> string +OpenTelemetry.Metrics.MetricSnapshot.MeterName.get -> string +OpenTelemetry.Metrics.MetricSnapshot.MeterVersion.get -> string +OpenTelemetry.Metrics.MetricSnapshot.MetricPoints.get -> System.Collections.Generic.IReadOnlyList +OpenTelemetry.Metrics.MetricSnapshot.MetricSnapshot(OpenTelemetry.Metrics.Metric metric) -> void +OpenTelemetry.Metrics.MetricSnapshot.MetricType.get -> OpenTelemetry.Metrics.MetricType +OpenTelemetry.Metrics.MetricSnapshot.Name.get -> string +OpenTelemetry.Metrics.MetricSnapshot.Unit.get -> string +OpenTelemetry.Trace.InMemoryExporterHelperExtensions +override OpenTelemetry.Exporter.InMemoryExporter.Dispose(bool disposing) -> void +override OpenTelemetry.Exporter.InMemoryExporter.Export(in OpenTelemetry.Batch batch) -> OpenTelemetry.ExportResult +static OpenTelemetry.Logs.InMemoryExporterLoggingExtensions.AddInMemoryExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions +static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Collections.Generic.ICollection exportedItems, System.Action configureMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder +static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Collections.Generic.ICollection exportedItems, System.Action configureMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder +static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Metrics.MeterProviderBuilder +static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Collections.Generic.ICollection exportedItems, System.Action configureMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder +static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Metrics.MeterProviderBuilder +static OpenTelemetry.Metrics.InMemoryExporterMetricsExtensions.AddInMemoryExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Collections.Generic.ICollection exportedItems, System.Action configureMetricReader) -> OpenTelemetry.Metrics.MeterProviderBuilder +static OpenTelemetry.Trace.InMemoryExporterHelperExtensions.AddInMemoryExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Collections.Generic.ICollection exportedItems) -> OpenTelemetry.Trace.TracerProviderBuilder diff --git a/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.InMemory/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.InMemory/CHANGELOG.md b/src/OpenTelemetry.Exporter.InMemory/CHANGELOG.md index 2947bb52bc8..1edbdd46c20 100644 --- a/src/OpenTelemetry.Exporter.InMemory/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.InMemory/CHANGELOG.md @@ -6,8 +6,10 @@ Released 2023-Jul-12 -* Added `LoggerProviderBuilder.AddInMemoryExporter` registration extension. - ([#4584](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4584)) +* **Experimental (pre-release builds only):** Added + `LoggerProviderBuilder.AddInMemoryExporter` registration extension. + ([#4584](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4584), + [#4735](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4735)) ## 1.5.1 diff --git a/src/OpenTelemetry.Exporter.InMemory/InMemoryExporterLoggingExtensions.cs b/src/OpenTelemetry.Exporter.InMemory/InMemoryExporterLoggingExtensions.cs index 23a28319a9a..136ded44d1c 100644 --- a/src/OpenTelemetry.Exporter.InMemory/InMemoryExporterLoggingExtensions.cs +++ b/src/OpenTelemetry.Exporter.InMemory/InMemoryExporterLoggingExtensions.cs @@ -41,13 +41,25 @@ public static OpenTelemetryLoggerOptions AddInMemoryExporter( new SimpleLogRecordExportProcessor(logExporter)); } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Adds InMemory exporter to the LoggerProviderBuilder. /// + /// WARNING: This is an experimental API which might change or be removed in the future. Use at your own risk. /// . /// Collection which will be populated with the exported . /// The supplied instance of to chain the calls. - public static LoggerProviderBuilder AddInMemoryExporter( + public +#else + /// + /// Adds InMemory exporter to the LoggerProviderBuilder. + /// + /// . + /// Collection which will be populated with the exported . + /// The supplied instance of to chain the calls. + internal +#endif + static LoggerProviderBuilder AddInMemoryExporter( this LoggerProviderBuilder loggerProviderBuilder, ICollection exportedItems) { diff --git a/src/OpenTelemetry.Exporter.InMemory/OpenTelemetry.Exporter.InMemory.csproj b/src/OpenTelemetry.Exporter.InMemory/OpenTelemetry.Exporter.InMemory.csproj index 88e23dc3e42..d026e8d970d 100644 --- a/src/OpenTelemetry.Exporter.InMemory/OpenTelemetry.Exporter.InMemory.csproj +++ b/src/OpenTelemetry.Exporter.InMemory/OpenTelemetry.Exporter.InMemory.csproj @@ -25,7 +25,7 @@ - + diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/netstandard2.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Experimental/netstandard2.1/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/net462/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net462/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/net462/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/net462/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net462/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/net462/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.1/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/netstandard2.1/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.1/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/netstandard2.1/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/netstandard2.1/PublicAPI.Unshipped.txt similarity index 100% rename from src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt rename to src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/Stable/netstandard2.1/PublicAPI.Unshipped.txt diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md index 86a3c04ef39..fc9afc5e825 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md @@ -24,23 +24,31 @@ Released 2023-Jul-12 are now included in this package. ([#4556](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4556)) -* Add back support for Exemplars. See [exemplars](../../docs/metrics/customizing-the-sdk/README.md#exemplars) - for instructions to enable exemplars. - ([#4553](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4553)) - * Updated Grpc.Net.Client to `2.45.0` to fix unobserved exception from failed calls. ([#4573](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4573)) -* Updated to support `Severity` and `SeverityText` when exporting `LogRecord`s. - ([#4568](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4568)) - * Updated Grpc.Net.Client to `2.52.0` to address the vulnerability reported by CVE-2023-32731. Refer to [https://github.com/grpc/grpc/pull/32309](https://github.com/grpc/grpc/pull/32309) for more details. ([#4647](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4647)) +* **Experimental (pre-release builds only):** + + * Note: See + [#4735](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4735) + for the introduction of experimental api support. + + * Add back support for Exemplars. See + [exemplars](../../docs/metrics/customizing-the-sdk/README.md#exemplars) for + instructions to enable exemplars. + ([#4553](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4553)) + + * Updated to support `Severity` and `SeverityText` when exporting + `LogRecord`s. + ([#4568](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4568)) + ## 1.5.1 Released 2023-Jun-26 diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj index 3146e3ccfd1..6342a5c789c 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj @@ -21,17 +21,20 @@ - + - - + + + + + diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..8617a4e70a1 --- /dev/null +++ b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt @@ -0,0 +1,2 @@ +OpenTelemetry.OpenTelemetryBuilder.WithLogging() -> OpenTelemetry.OpenTelemetryBuilder! +OpenTelemetry.OpenTelemetryBuilder.WithLogging(System.Action! configure) -> OpenTelemetry.OpenTelemetryBuilder! diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..8617a4e70a1 --- /dev/null +++ b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt @@ -0,0 +1,2 @@ +OpenTelemetry.OpenTelemetryBuilder.WithLogging() -> OpenTelemetry.OpenTelemetryBuilder! +OpenTelemetry.OpenTelemetryBuilder.WithLogging(System.Action! configure) -> OpenTelemetry.OpenTelemetryBuilder! diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..8617a4e70a1 --- /dev/null +++ b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt @@ -0,0 +1,2 @@ +OpenTelemetry.OpenTelemetryBuilder.WithLogging() -> OpenTelemetry.OpenTelemetryBuilder! +OpenTelemetry.OpenTelemetryBuilder.WithLogging(System.Action! configure) -> OpenTelemetry.OpenTelemetryBuilder! diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net462/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Extensions.Hosting/.publicApi/net462/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net462/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net462/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Extensions.Hosting/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry.Extensions.Hosting/.publicApi/netstandard2.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Extensions.Hosting/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/OpenTelemetry.Extensions.Hosting/AssemblyInfo.cs b/src/OpenTelemetry.Extensions.Hosting/AssemblyInfo.cs index abf21ce8c15..9c25df52d83 100644 --- a/src/OpenTelemetry.Extensions.Hosting/AssemblyInfo.cs +++ b/src/OpenTelemetry.Extensions.Hosting/AssemblyInfo.cs @@ -20,13 +20,13 @@ [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2" + AssemblyInfo.MoqPublicKey)] #if SIGNED -internal static class AssemblyInfo +file static class AssemblyInfo { public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898"; public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7"; } #else -internal static class AssemblyInfo +file static class AssemblyInfo { public const string PublicKey = ""; public const string MoqPublicKey = ""; diff --git a/src/OpenTelemetry.Extensions.Hosting/CHANGELOG.md b/src/OpenTelemetry.Extensions.Hosting/CHANGELOG.md index 5019a0e3bed..f52024b2215 100644 --- a/src/OpenTelemetry.Extensions.Hosting/CHANGELOG.md +++ b/src/OpenTelemetry.Extensions.Hosting/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +* **Experimental (pre-release builds only):** Added [Logs Bridge + API](https://github.com/open-telemetry/opentelemetry-specification/blob/976432b74c565e8a84af3570e9b82cb95e1d844c/specification/logs/bridge-api.md) + implementation (`OpenTelemetryBuilder.WithLogging`). + ([#4735](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4735)) + ## 1.6.0-alpha.1 Released 2023-Jul-12 diff --git a/src/OpenTelemetry.Extensions.Hosting/OpenTelemetry.Extensions.Hosting.csproj b/src/OpenTelemetry.Extensions.Hosting/OpenTelemetry.Extensions.Hosting.csproj index 82f35987c84..cff040fe290 100644 --- a/src/OpenTelemetry.Extensions.Hosting/OpenTelemetry.Extensions.Hosting.csproj +++ b/src/OpenTelemetry.Extensions.Hosting/OpenTelemetry.Extensions.Hosting.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/OpenTelemetry.Extensions.Hosting/OpenTelemetryBuilder.cs b/src/OpenTelemetry.Extensions.Hosting/OpenTelemetryBuilder.cs index 1f50f76637a..805808488a1 100644 --- a/src/OpenTelemetry.Extensions.Hosting/OpenTelemetryBuilder.cs +++ b/src/OpenTelemetry.Extensions.Hosting/OpenTelemetryBuilder.cs @@ -136,19 +136,46 @@ public OpenTelemetryBuilder WithTracing(Action configure) return this; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Adds logging services into the builder. /// /// + /// WARNING: This is an experimental API which might change or be removed in the future. Use at your own risk. /// Note: This is safe to be called multiple times and by library authors. /// Only a single will be created for a given /// . /// /// The supplied for chaining /// calls. - internal OpenTelemetryBuilder WithLogging() + public +#else + /// + /// Adds logging services into the builder. + /// + /// + /// Note: This is safe to be called multiple times and by library authors. + /// Only a single will be created for a given + /// . + /// + /// The supplied for chaining + /// calls. + internal +#endif + OpenTelemetryBuilder WithLogging() => this.WithLogging(b => { }); +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Adds logging services into the builder. + /// + /// + /// + /// configuration callback. + /// The supplied for chaining + /// calls. + public +#else /// /// Adds logging services into the builder. /// @@ -157,7 +184,9 @@ internal OpenTelemetryBuilder WithLogging() /// configuration callback. /// The supplied for chaining /// calls. - internal OpenTelemetryBuilder WithLogging(Action configure) + internal +#endif + OpenTelemetryBuilder WithLogging(Action configure) { Guard.ThrowIfNull(configure); diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net6.0/PublicAPI.Unshipped.txt index b65b99a84c4..88cc5073da4 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net6.0/PublicAPI.Unshipped.txt @@ -27,3 +27,4 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.AddAspNetCoreInstrum static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, string name, System.Action configureAspNetCoreInstrumentationOptions) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configureAspNetCoreInstrumentationOptions) -> OpenTelemetry.Trace.TracerProviderBuilder +virtual OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreMetricsInstrumentationOptions.AspNetCoreMetricEnrichmentFunc.Invoke(string name, Microsoft.AspNetCore.Http.HttpContext context, ref System.Diagnostics.TagList tags) -> void diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net7.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net7.0/PublicAPI.Unshipped.txt index b65b99a84c4..88cc5073da4 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net7.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/net7.0/PublicAPI.Unshipped.txt @@ -27,3 +27,4 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.AddAspNetCoreInstrum static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, string name, System.Action configureAspNetCoreInstrumentationOptions) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configureAspNetCoreInstrumentationOptions) -> OpenTelemetry.Trace.TracerProviderBuilder +virtual OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreMetricsInstrumentationOptions.AspNetCoreMetricEnrichmentFunc.Invoke(string name, Microsoft.AspNetCore.Http.HttpContext context, ref System.Diagnostics.TagList tags) -> void diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt index 68b0a198212..0d816a0b829 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt @@ -25,3 +25,4 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.AddAspNetCoreInstrum static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, string name, System.Action configureAspNetCoreInstrumentationOptions) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configureAspNetCoreInstrumentationOptions) -> OpenTelemetry.Trace.TracerProviderBuilder +virtual OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreMetricsInstrumentationOptions.AspNetCoreMetricEnrichmentFunc.Invoke(string name, Microsoft.AspNetCore.Http.HttpContext context, ref System.Diagnostics.TagList tags) -> void diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt index b65b99a84c4..88cc5073da4 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt @@ -27,3 +27,4 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.AddAspNetCoreInstrum static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, string name, System.Action configureAspNetCoreInstrumentationOptions) -> OpenTelemetry.Trace.TracerProviderBuilder static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddAspNetCoreInstrumentation(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configureAspNetCoreInstrumentationOptions) -> OpenTelemetry.Trace.TracerProviderBuilder +virtual OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreMetricsInstrumentationOptions.AspNetCoreMetricEnrichmentFunc.Invoke(string name, Microsoft.AspNetCore.Http.HttpContext context, ref System.Diagnostics.TagList tags) -> void diff --git a/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt similarity index 87% rename from src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt rename to src/OpenTelemetry/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt index e75f84d65db..c274d8400be 100644 --- a/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/Experimental/net462/PublicAPI.Unshipped.txt @@ -1,5 +1,3 @@ -OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions -OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions.BatchExportLogRecordProcessorOptions() -> void OpenTelemetry.Logs.LoggerProviderBuilderExtensions OpenTelemetry.Logs.LoggerProviderExtensions OpenTelemetry.Logs.LogRecord.Logger.get -> OpenTelemetry.Logs.Logger? @@ -7,12 +5,6 @@ OpenTelemetry.Logs.LogRecord.Severity.get -> OpenTelemetry.Logs.LogRecordSeverit OpenTelemetry.Logs.LogRecord.Severity.set -> void OpenTelemetry.Logs.LogRecord.SeverityText.get -> string? OpenTelemetry.Logs.LogRecord.SeverityText.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions -OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions! -OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType -OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions.LogRecordExportProcessorOptions() -> void OpenTelemetry.Metrics.AlwaysOffExemplarFilter OpenTelemetry.Metrics.AlwaysOffExemplarFilter.AlwaysOffExemplarFilter() -> void OpenTelemetry.Metrics.AlwaysOnExemplarFilter diff --git a/src/OpenTelemetry/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt similarity index 87% rename from src/OpenTelemetry/.publicApi/net462/PublicAPI.Unshipped.txt rename to src/OpenTelemetry/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt index e75f84d65db..c274d8400be 100644 --- a/src/OpenTelemetry/.publicApi/net462/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/Experimental/net6.0/PublicAPI.Unshipped.txt @@ -1,5 +1,3 @@ -OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions -OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions.BatchExportLogRecordProcessorOptions() -> void OpenTelemetry.Logs.LoggerProviderBuilderExtensions OpenTelemetry.Logs.LoggerProviderExtensions OpenTelemetry.Logs.LogRecord.Logger.get -> OpenTelemetry.Logs.Logger? @@ -7,12 +5,6 @@ OpenTelemetry.Logs.LogRecord.Severity.get -> OpenTelemetry.Logs.LogRecordSeverit OpenTelemetry.Logs.LogRecord.Severity.set -> void OpenTelemetry.Logs.LogRecord.SeverityText.get -> string? OpenTelemetry.Logs.LogRecord.SeverityText.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions -OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions! -OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType -OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions.LogRecordExportProcessorOptions() -> void OpenTelemetry.Metrics.AlwaysOffExemplarFilter OpenTelemetry.Metrics.AlwaysOffExemplarFilter.AlwaysOffExemplarFilter() -> void OpenTelemetry.Metrics.AlwaysOnExemplarFilter diff --git a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt similarity index 87% rename from src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt index e75f84d65db..c274d8400be 100644 --- a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/Experimental/netstandard2.0/PublicAPI.Unshipped.txt @@ -1,5 +1,3 @@ -OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions -OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions.BatchExportLogRecordProcessorOptions() -> void OpenTelemetry.Logs.LoggerProviderBuilderExtensions OpenTelemetry.Logs.LoggerProviderExtensions OpenTelemetry.Logs.LogRecord.Logger.get -> OpenTelemetry.Logs.Logger? @@ -7,12 +5,6 @@ OpenTelemetry.Logs.LogRecord.Severity.get -> OpenTelemetry.Logs.LogRecordSeverit OpenTelemetry.Logs.LogRecord.Severity.set -> void OpenTelemetry.Logs.LogRecord.SeverityText.get -> string? OpenTelemetry.Logs.LogRecord.SeverityText.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions -OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions! -OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType -OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions.LogRecordExportProcessorOptions() -> void OpenTelemetry.Metrics.AlwaysOffExemplarFilter OpenTelemetry.Metrics.AlwaysOffExemplarFilter.AlwaysOffExemplarFilter() -> void OpenTelemetry.Metrics.AlwaysOnExemplarFilter diff --git a/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/Experimental/netstandard2.1/PublicAPI.Unshipped.txt similarity index 87% rename from src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Unshipped.txt rename to src/OpenTelemetry/.publicApi/Experimental/netstandard2.1/PublicAPI.Unshipped.txt index e75f84d65db..c274d8400be 100644 --- a/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/Experimental/netstandard2.1/PublicAPI.Unshipped.txt @@ -1,5 +1,3 @@ -OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions -OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions.BatchExportLogRecordProcessorOptions() -> void OpenTelemetry.Logs.LoggerProviderBuilderExtensions OpenTelemetry.Logs.LoggerProviderExtensions OpenTelemetry.Logs.LogRecord.Logger.get -> OpenTelemetry.Logs.Logger? @@ -7,12 +5,6 @@ OpenTelemetry.Logs.LogRecord.Severity.get -> OpenTelemetry.Logs.LogRecordSeverit OpenTelemetry.Logs.LogRecord.Severity.set -> void OpenTelemetry.Logs.LogRecord.SeverityText.get -> string? OpenTelemetry.Logs.LogRecord.SeverityText.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions -OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions! -OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType -OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.set -> void -OpenTelemetry.Logs.LogRecordExportProcessorOptions.LogRecordExportProcessorOptions() -> void OpenTelemetry.Metrics.AlwaysOffExemplarFilter OpenTelemetry.Metrics.AlwaysOffExemplarFilter.AlwaysOffExemplarFilter() -> void OpenTelemetry.Metrics.AlwaysOnExemplarFilter diff --git a/src/OpenTelemetry/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry/.publicApi/Stable/net462/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry/.publicApi/net462/PublicAPI.Shipped.txt rename to src/OpenTelemetry/.publicApi/Stable/net462/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry/.publicApi/Stable/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/Stable/net462/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..3110de1318e --- /dev/null +++ b/src/OpenTelemetry/.publicApi/Stable/net462/PublicAPI.Unshipped.txt @@ -0,0 +1,8 @@ +OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions +OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions.BatchExportLogRecordProcessorOptions() -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions +OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions! +OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.set -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType +OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.set -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions.LogRecordExportProcessorOptions() -> void diff --git a/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry/.publicApi/Stable/net6.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..3110de1318e --- /dev/null +++ b/src/OpenTelemetry/.publicApi/Stable/net6.0/PublicAPI.Unshipped.txt @@ -0,0 +1,8 @@ +OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions +OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions.BatchExportLogRecordProcessorOptions() -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions +OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions! +OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.set -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType +OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.set -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions.LogRecordExportProcessorOptions() -> void diff --git a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Shipped.txt rename to src/OpenTelemetry/.publicApi/Stable/netstandard2.0/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..3110de1318e --- /dev/null +++ b/src/OpenTelemetry/.publicApi/Stable/netstandard2.0/PublicAPI.Unshipped.txt @@ -0,0 +1,8 @@ +OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions +OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions.BatchExportLogRecordProcessorOptions() -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions +OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions! +OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.set -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType +OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.set -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions.LogRecordExportProcessorOptions() -> void diff --git a/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Shipped.txt b/src/OpenTelemetry/.publicApi/Stable/netstandard2.1/PublicAPI.Shipped.txt similarity index 100% rename from src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Shipped.txt rename to src/OpenTelemetry/.publicApi/Stable/netstandard2.1/PublicAPI.Shipped.txt diff --git a/src/OpenTelemetry/.publicApi/Stable/netstandard2.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/Stable/netstandard2.1/PublicAPI.Unshipped.txt new file mode 100644 index 00000000000..3110de1318e --- /dev/null +++ b/src/OpenTelemetry/.publicApi/Stable/netstandard2.1/PublicAPI.Unshipped.txt @@ -0,0 +1,8 @@ +OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions +OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions.BatchExportLogRecordProcessorOptions() -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions +OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Logs.BatchExportLogRecordProcessorOptions! +OpenTelemetry.Logs.LogRecordExportProcessorOptions.BatchExportProcessorOptions.set -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType +OpenTelemetry.Logs.LogRecordExportProcessorOptions.ExportProcessorType.set -> void +OpenTelemetry.Logs.LogRecordExportProcessorOptions.LogRecordExportProcessorOptions() -> void diff --git a/src/OpenTelemetry/AssemblyInfo.cs b/src/OpenTelemetry/AssemblyInfo.cs index 6b94f59eb69..ddcbfd91a8e 100644 --- a/src/OpenTelemetry/AssemblyInfo.cs +++ b/src/OpenTelemetry/AssemblyInfo.cs @@ -25,3 +25,23 @@ [assembly: InternalsVisibleTo("OpenTelemetry.Extensions.Hosting.Tests" + AssemblyInfo.PublicKey)] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2" + AssemblyInfo.MoqPublicKey)] [assembly: InternalsVisibleTo("Benchmarks" + AssemblyInfo.PublicKey)] + +#if !EXPOSE_EXPERIMENTAL_FEATURES +[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Console" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol" + AssemblyInfo.PublicKey)] +[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests" + AssemblyInfo.PublicKey)] +#endif + +#if SIGNED +file static class AssemblyInfo +{ + public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898"; + public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7"; +} +#else +file static class AssemblyInfo +{ + public const string PublicKey = ""; + public const string MoqPublicKey = ""; +} +#endif diff --git a/src/OpenTelemetry/CHANGELOG.md b/src/OpenTelemetry/CHANGELOG.md index b5f8fb24a5f..6c0f86ca9a0 100644 --- a/src/OpenTelemetry/CHANGELOG.md +++ b/src/OpenTelemetry/CHANGELOG.md @@ -17,25 +17,32 @@ Released 2023-Jul-12 -* Add back support for Exemplars. See [exemplars](../../docs/metrics/customizing-the-sdk/README.md#exemplars) - for instructions to enable exemplars. - ([#4553](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4553)) - -* Added [Logs Bridge - API](https://github.com/open-telemetry/opentelemetry-specification/blob/976432b74c565e8a84af3570e9b82cb95e1d844c/specification/logs/bridge-api.md) - implementation (`Sdk.CreateLoggerProviderBuilder`, etc.). - ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433)) - -* Obsoleted `LogRecord.LogLevel` in favor of the `LogRecord.Severity` property - which matches the [OpenTelemetry Specification > Logs DataModel > Severity - definition](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-severitynumber). - ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433)) - -* Added `LogRecord.Logger` property to access the [OpenTelemetry Specification > - Instrumentation - Scope](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#instrumentation-scope) - provided during Logger creation. - ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433)) +* **Experimental (pre-release builds only):** + + * Note: See + [#4735](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4735) + for the introduction of experimental api support. + + * Add back support for Exemplars. See + [exemplars](../../docs/metrics/customizing-the-sdk/README.md#exemplars) for + instructions to enable exemplars. + ([#4553](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4553)) + + * Added [Logs Bridge + API](https://github.com/open-telemetry/opentelemetry-specification/blob/976432b74c565e8a84af3570e9b82cb95e1d844c/specification/logs/bridge-api.md) + implementation (`Sdk.CreateLoggerProviderBuilder`, etc.). + ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433)) + + * Obsoleted `LogRecord.LogLevel` in favor of the `LogRecord.Severity` property + which matches the [OpenTelemetry Specification > Logs DataModel > Severity + definition](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-severitynumber). + ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433)) + + * Added `LogRecord.Logger` property to access the [OpenTelemetry Specification + Instrumentation + Scope](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#instrumentation-scope) + provided during Logger creation. + ([#4433](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4433)) * Fix the issue of potentially running into the `ArgumentException`: `An instance of EventSource with Guid af2d5796-946b-50cb-5f76-166a609afcbb already diff --git a/src/OpenTelemetry/Logs/Builder/LoggerProviderBuilderExtensions.cs b/src/OpenTelemetry/Logs/Builder/LoggerProviderBuilderExtensions.cs index 1f772c2411b..47813a3a1af 100644 --- a/src/OpenTelemetry/Logs/Builder/LoggerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry/Logs/Builder/LoggerProviderBuilderExtensions.cs @@ -29,17 +29,39 @@ namespace OpenTelemetry.Logs; /// /// Contains extension methods for the class. /// -public static class LoggerProviderBuilderExtensions +#if EXPOSE_EXPERIMENTAL_FEATURES +public +#else +internal +#endif + static class LoggerProviderBuilderExtensions { +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Sets the from which the associated with + /// this provider is built from. + /// + /// + /// + /// Note: Calling will override the currently set . + /// To modify the current call instead. + /// + /// . + /// from which Resource will be built. + /// Returns for chaining. +#else /// - /// Sets the from which the Resource associated with - /// this provider is built from. Overwrites currently set ResourceBuilder. - /// You should usually use instead - /// (call if desired). + /// Sets the from which the associated with + /// this provider is built from. /// + /// + /// Note: Calling will override the currently set . + /// To modify the current call instead. + /// /// . /// from which Resource will be built. /// Returns for chaining. +#endif public static LoggerProviderBuilder SetResourceBuilder(this LoggerProviderBuilder loggerProviderBuilder, ResourceBuilder resourceBuilder) { Guard.ThrowIfNull(resourceBuilder); @@ -55,13 +77,24 @@ public static LoggerProviderBuilder SetResourceBuilder(this LoggerProviderBuilde return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Modify in-place the from which the associated with + /// this provider is built from. + /// + /// + /// . + /// An action which modifies the provided in-place. + /// Returns for chaining. +#else /// - /// Modify the from which the Resource associated with - /// this provider is built from in-place. + /// Modify in-place the from which the associated with + /// this provider is built from. /// /// . /// An action which modifies the provided in-place. /// Returns for chaining. +#endif public static LoggerProviderBuilder ConfigureResource(this LoggerProviderBuilder loggerProviderBuilder, Action configure) { Guard.ThrowIfNull(configure); @@ -77,12 +110,22 @@ public static LoggerProviderBuilder ConfigureResource(this LoggerProviderBuilder return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Adds a processor to the provider. + /// + /// + /// . + /// LogRecord processor to add. + /// Returns for chaining. +#else /// /// Adds a processor to the provider. /// /// . /// LogRecord processor to add. /// Returns for chaining. +#endif public static LoggerProviderBuilder AddProcessor(this LoggerProviderBuilder loggerProviderBuilder, BaseProcessor processor) { Guard.ThrowIfNull(processor); @@ -98,16 +141,30 @@ public static LoggerProviderBuilder AddProcessor(this LoggerProviderBuilder logg return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Adds a processor to the provider which will be retrieved using dependency injection. /// /// + /// /// Note: The type specified by will be /// registered as a singleton service into application services. /// /// Processor type. /// . /// The supplied for chaining. +#else + /// + /// Adds a processor to the provider which will be retrieved using dependency injection. + /// + /// + /// Note: The type specified by will be + /// registered as a singleton service into application services. + /// + /// Processor type. + /// . + /// The supplied for chaining. +#endif public static LoggerProviderBuilder AddProcessor< #if NET6_0_OR_GREATER [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] @@ -128,12 +185,22 @@ public static LoggerProviderBuilder AddProcessor< return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Adds a processor to the provider which will be retrieved using dependency injection. + /// + /// + /// . + /// The factory that creates the service. + /// The supplied for chaining. +#else /// /// Adds a processor to the provider which will be retrieved using dependency injection. /// /// . /// The factory that creates the service. /// The supplied for chaining. +#endif public static LoggerProviderBuilder AddProcessor( this LoggerProviderBuilder loggerProviderBuilder, Func> implementationFactory) @@ -151,11 +218,20 @@ public static LoggerProviderBuilder AddProcessor( return loggerProviderBuilder; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Run the given actions to initialize the . /// + /// /// . /// . +#else + /// + /// Run the given actions to initialize the . + /// + /// . + /// . +#endif public static LoggerProvider Build(this LoggerProviderBuilder loggerProviderBuilder) { if (loggerProviderBuilder is LoggerProviderBuilderBase loggerProviderBuilderBase) diff --git a/src/OpenTelemetry/Logs/LogRecord.cs b/src/OpenTelemetry/Logs/LogRecord.cs index 41232d5797d..6dd0a2e5f65 100644 --- a/src/OpenTelemetry/Logs/LogRecord.cs +++ b/src/OpenTelemetry/Logs/LogRecord.cs @@ -160,7 +160,9 @@ public string? CategoryName /// /// Gets or sets the log . /// +#if EXPOSE_EXPERIMENTAL_FEATURES [Obsolete("Use Severity instead. LogLevel will be removed in a future version.")] +#endif public LogLevel LogLevel { get @@ -284,29 +286,56 @@ public Exception? Exception set => this.ILoggerData.Exception = value; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Gets or sets the original string representation of the severity as it is /// known at the source. /// - public string? SeverityText + /// + public +#else + /// + /// Gets or sets the original string representation of the severity as it is + /// known at the source. + /// + internal +#endif + string? SeverityText { get => this.Data.SeverityText; set => this.Data.SeverityText = value; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Gets or sets the log . /// - public LogRecordSeverity? Severity + /// + public +#else + /// + /// Gets or sets the log . + /// + internal +#endif + LogRecordSeverity? Severity { get => this.Data.Severity; set => this.Data.Severity = value; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Gets the which emitted the . /// + /// public Logger? Logger { get; internal set; } +#else + /// + /// Gets or sets the which emitted the . + /// + internal Logger? Logger { get; set; } +#endif /// /// Executes callback for each currently active scope objects in order diff --git a/src/OpenTelemetry/Logs/LoggerProviderExtensions.cs b/src/OpenTelemetry/Logs/LoggerProviderExtensions.cs index da788c1e735..5fbd0f84359 100644 --- a/src/OpenTelemetry/Logs/LoggerProviderExtensions.cs +++ b/src/OpenTelemetry/Logs/LoggerProviderExtensions.cs @@ -23,12 +23,19 @@ namespace OpenTelemetry.Logs; /// /// Contains extension methods for the class. /// -public static class LoggerProviderExtensions +#if EXPOSE_EXPERIMENTAL_FEATURES +public +#else +internal +#endif + static class LoggerProviderExtensions { +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Add a processor to the . /// /// + /// /// Note: The supplied will be /// automatically disposed when then the is disposed. @@ -36,6 +43,19 @@ public static class LoggerProviderExtensions /// instance on which ForceFlush will be called. /// Log processor to add. /// The supplied for chaining. +#else + /// + /// Add a processor to the . + /// + /// + /// Note: The supplied will be + /// automatically disposed when then the is disposed. + /// + /// instance on which ForceFlush will be called. + /// Log processor to add. + /// The supplied for chaining. +#endif public static LoggerProvider AddProcessor(this LoggerProvider provider, BaseProcessor processor) { Guard.ThrowIfNull(provider); @@ -49,6 +69,27 @@ public static LoggerProvider AddProcessor(this LoggerProvider provider, BaseProc return provider; } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Flushes all the processors registered under , blocks the current thread + /// until flush completed, shutdown signaled or timed out. + /// + /// instance on which ForceFlush will be called. + /// + /// The number (non-negative) of milliseconds to wait, or + /// Timeout.Infinite to wait indefinitely. + /// + /// + /// Returns true when force flush succeeded; otherwise, false. + /// + /// + /// Thrown when the timeoutMilliseconds is smaller than -1. + /// + /// + /// + /// This function guarantees thread-safety. + /// +#else /// /// Flushes all the processors registered under , blocks the current thread /// until flush completed, shutdown signaled or timed out. @@ -67,6 +108,7 @@ public static LoggerProvider AddProcessor(this LoggerProvider provider, BaseProc /// /// This function guarantees thread-safety. /// +#endif public static bool ForceFlush(this LoggerProvider provider, int timeoutMilliseconds = Timeout.Infinite) { Guard.ThrowIfNull(provider); @@ -80,6 +122,28 @@ public static bool ForceFlush(this LoggerProvider provider, int timeoutMilliseco return true; } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Attempts to shutdown the , blocks the current thread until + /// shutdown completed or timed out. + /// + /// instance on which Shutdown will be called. + /// + /// The number (non-negative) of milliseconds to wait, or + /// Timeout.Infinite to wait indefinitely. + /// + /// + /// Returns true when shutdown succeeded; otherwise, false. + /// + /// + /// Thrown when the timeoutMilliseconds is smaller than -1. + /// + /// + /// + /// This function guarantees thread-safety. Only the first call will + /// win, subsequent calls will be no-op. + /// +#else /// /// Attempts to shutdown the , blocks the current thread until /// shutdown completed or timed out. @@ -99,6 +163,7 @@ public static bool ForceFlush(this LoggerProvider provider, int timeoutMilliseco /// This function guarantees thread-safety. Only the first call will /// win, subsequent calls will be no-op. /// +#endif public static bool Shutdown(this LoggerProvider provider, int timeoutMilliseconds = Timeout.Infinite) { Guard.ThrowIfNull(provider); diff --git a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderExtensions.cs b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderExtensions.cs index 6f0708db335..6aa21e1503d 100644 --- a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderExtensions.cs +++ b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderExtensions.cs @@ -310,6 +310,32 @@ public static MeterProviderBuilder ConfigureResource(this MeterProviderBuilder m return meterProviderBuilder; } + /// + /// Run the given actions to initialize the . + /// + /// . + /// . + public static MeterProvider? Build(this MeterProviderBuilder meterProviderBuilder) + { + if (meterProviderBuilder is MeterProviderBuilderBase meterProviderBuilderBase) + { + return meterProviderBuilderBase.InvokeBuild(); + } + + return null; + } + +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Sets the to be used for this provider. + /// This is applied to all the metrics from this provider. + /// + /// + /// . + /// ExemplarFilter to use. + /// The supplied for chaining. + public +#else /// /// Sets the to be used for this provider. /// This is applied to all the metrics from this provider. @@ -317,7 +343,9 @@ public static MeterProviderBuilder ConfigureResource(this MeterProviderBuilder m /// . /// ExemplarFilter to use. /// The supplied for chaining. - public static MeterProviderBuilder SetExemplarFilter(this MeterProviderBuilder meterProviderBuilder, ExemplarFilter exemplarFilter) + internal +#endif + static MeterProviderBuilder SetExemplarFilter(this MeterProviderBuilder meterProviderBuilder, ExemplarFilter exemplarFilter) { Guard.ThrowIfNull(exemplarFilter); @@ -331,19 +359,4 @@ public static MeterProviderBuilder SetExemplarFilter(this MeterProviderBuilder m return meterProviderBuilder; } - - /// - /// Run the given actions to initialize the . - /// - /// . - /// . - public static MeterProvider? Build(this MeterProviderBuilder meterProviderBuilder) - { - if (meterProviderBuilder is MeterProviderBuilderBase meterProviderBuilderBase) - { - return meterProviderBuilderBase.InvokeBuild(); - } - - return null; - } } diff --git a/src/OpenTelemetry/Metrics/Exemplar/AlwaysOffExemplarFilter.cs b/src/OpenTelemetry/Metrics/Exemplar/AlwaysOffExemplarFilter.cs index 2d3f3cab898..88077a2b100 100644 --- a/src/OpenTelemetry/Metrics/Exemplar/AlwaysOffExemplarFilter.cs +++ b/src/OpenTelemetry/Metrics/Exemplar/AlwaysOffExemplarFilter.cs @@ -16,11 +16,21 @@ namespace OpenTelemetry.Metrics; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// An ExemplarFilter which makes no measurements eligible for being an Exemplar. /// Using this ExemplarFilter is as good as disabling Exemplar feature. /// -public sealed class AlwaysOffExemplarFilter : ExemplarFilter +/// +public +#else +/// +/// An ExemplarFilter which makes no measurements eligible for being an Exemplar. +/// Using this ExemplarFilter is as good as disabling Exemplar feature. +/// +internal +#endif + sealed class AlwaysOffExemplarFilter : ExemplarFilter { public override bool ShouldSample(long value, ReadOnlySpan> tags) { diff --git a/src/OpenTelemetry/Metrics/Exemplar/AlwaysOnExemplarFilter.cs b/src/OpenTelemetry/Metrics/Exemplar/AlwaysOnExemplarFilter.cs index 79adb9eeba3..45886c2f35c 100644 --- a/src/OpenTelemetry/Metrics/Exemplar/AlwaysOnExemplarFilter.cs +++ b/src/OpenTelemetry/Metrics/Exemplar/AlwaysOnExemplarFilter.cs @@ -16,10 +16,19 @@ namespace OpenTelemetry.Metrics; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// An ExemplarFilter which makes all measurements eligible for being an Exemplar. /// -public sealed class AlwaysOnExemplarFilter : ExemplarFilter +/// +public +#else +/// +/// An ExemplarFilter which makes all measurements eligible for being an Exemplar. +/// +internal +#endif + sealed class AlwaysOnExemplarFilter : ExemplarFilter { public override bool ShouldSample(long value, ReadOnlySpan> tags) { diff --git a/src/OpenTelemetry/Metrics/Exemplar/Exemplar.cs b/src/OpenTelemetry/Metrics/Exemplar/Exemplar.cs index 5837ca362d0..7e5352c0bc3 100644 --- a/src/OpenTelemetry/Metrics/Exemplar/Exemplar.cs +++ b/src/OpenTelemetry/Metrics/Exemplar/Exemplar.cs @@ -18,14 +18,23 @@ namespace OpenTelemetry.Metrics; -#pragma warning disable SA1623 // The property's documentation summary text should begin with: `Gets or sets` +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Represents an Exemplar data. /// -public struct Exemplar +/// WARNING: This is an experimental API which might change or be removed in the future. Use at your own risk. +public +#else +/// +/// Represents an Exemplar data. +/// +#pragma warning disable SA1623 // The property's documentation summary text should begin with: `Gets or sets` +internal +#endif + struct Exemplar { /// - /// Gets the timestamp (UTC). + /// Gets the timestamp. /// public DateTimeOffset Timestamp { get; internal set; } @@ -52,5 +61,4 @@ public struct Exemplar /// public List> FilteredTags { get; internal set; } } -#pragma warning restore SA1623 diff --git a/src/OpenTelemetry/Metrics/Exemplar/ExemplarFilter.cs b/src/OpenTelemetry/Metrics/Exemplar/ExemplarFilter.cs index 9e79570ce77..b6739989a93 100644 --- a/src/OpenTelemetry/Metrics/Exemplar/ExemplarFilter.cs +++ b/src/OpenTelemetry/Metrics/Exemplar/ExemplarFilter.cs @@ -15,10 +15,19 @@ // namespace OpenTelemetry.Metrics; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// The base class for defining Exemplar Filter. /// -public abstract class ExemplarFilter +/// +public +#else +/// +/// The base class for defining Exemplar Filter. +/// +internal +#endif + abstract class ExemplarFilter { /// /// Determines if a given measurement is eligible for being diff --git a/src/OpenTelemetry/Metrics/Exemplar/TraceBasedExemplarFilter.cs b/src/OpenTelemetry/Metrics/Exemplar/TraceBasedExemplarFilter.cs index 69c4c29e9f8..41db4a22e06 100644 --- a/src/OpenTelemetry/Metrics/Exemplar/TraceBasedExemplarFilter.cs +++ b/src/OpenTelemetry/Metrics/Exemplar/TraceBasedExemplarFilter.cs @@ -18,11 +18,21 @@ namespace OpenTelemetry.Metrics; +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// An ExemplarFilter which makes those measurements eligible for being an Exemplar, /// which are recorded in the context of a sampled parent activity (span). /// -public sealed class TraceBasedExemplarFilter : ExemplarFilter +/// +public +#else +/// +/// An ExemplarFilter which makes those measurements eligible for being an Exemplar, +/// which are recorded in the context of a sampled parent activity (span). +/// +internal +#endif + sealed class TraceBasedExemplarFilter : ExemplarFilter { public override bool ShouldSample(long value, ReadOnlySpan> tags) { diff --git a/src/OpenTelemetry/Metrics/MetricPoint.cs b/src/OpenTelemetry/Metrics/MetricPoint.cs index 35ed8dd0c44..f4fc5c5a265 100644 --- a/src/OpenTelemetry/Metrics/MetricPoint.cs +++ b/src/OpenTelemetry/Metrics/MetricPoint.cs @@ -331,12 +331,23 @@ public bool TryGetHistogramMinMaxValues(out double min, out double max) return false; } +#if EXPOSE_EXPERIMENTAL_FEATURES /// /// Gets the exemplars associated with the metric point. /// + /// /// . [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly Exemplar[] GetExemplars() + public +#else + /// + /// Gets the exemplars associated with the metric point. + /// + /// . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal +#endif + readonly Exemplar[] GetExemplars() { // TODO: Do not expose Exemplar data structure (array now) return this.mpComponents?.Exemplars ?? Array.Empty(); diff --git a/src/OpenTelemetry/Sdk.cs b/src/OpenTelemetry/Sdk.cs index dbce381b747..2d608dd76ed 100644 --- a/src/OpenTelemetry/Sdk.cs +++ b/src/OpenTelemetry/Sdk.cs @@ -70,20 +70,6 @@ public static void SetDefaultTextMapPropagator(TextMapPropagator textMapPropagat Propagators.DefaultTextMapPropagator = textMapPropagator; } - /// - /// Creates a which is used to build - /// a . In a typical application, a single - /// is created at application startup and - /// disposed at application shutdown. It is important to ensure that the - /// provider is not disposed too early. - /// - /// instance, which is used - /// to build a . - public static LoggerProviderBuilder CreateLoggerProviderBuilder() - { - return new LoggerProviderBuilderBase(); - } - /// /// Creates a which is used to build /// a . In a typical application, a single @@ -110,6 +96,35 @@ public static TracerProviderBuilder CreateTracerProviderBuilder() return new TracerProviderBuilderBase(); } +#if EXPOSE_EXPERIMENTAL_FEATURES + /// + /// Creates a which is used to build + /// a . In a typical application, a single + /// is created at application startup and + /// disposed at application shutdown. It is important to ensure that the + /// provider is not disposed too early. + /// + /// WARNING: This is an experimental API which might change or be removed in the future. Use at your own risk. + /// instance, which is used + /// to build a . + public +#else + /// + /// Creates a which is used to build + /// a . In a typical application, a single + /// is created at application startup and + /// disposed at application shutdown. It is important to ensure that the + /// provider is not disposed too early. + /// + /// instance, which is used + /// to build a . + internal +#endif + static LoggerProviderBuilder CreateLoggerProviderBuilder() + { + return new LoggerProviderBuilderBase(); + } + internal static string ParseAssemblyInformationalVersion(string? informationalVersion) { if (string.IsNullOrWhiteSpace(informationalVersion))