Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
faf02d9
[WCF] Add test for .NET Framework (#4318)
martincostello Apr 28, 2026
9c0bc51
Bump postgres:18.3 Docker digest to 7848165 (#4319)
renovate[bot] Apr 29, 2026
25c8b13
Bump redis:8.6.2 Docker digest to 832d778 (#4320)
renovate[bot] Apr 29, 2026
0e7a630
Bump dependency FsCheck.Xunit to 3.3.3 (#4323)
renovate[bot] Apr 29, 2026
90e81d3
Bump mysql Docker tag to v9.7.0 (#4329)
renovate[bot] Apr 29, 2026
668e268
Bump dependency JetBrains.Profiler.Api to 1.4.12 (#4324)
renovate[bot] Apr 29, 2026
fe86eb1
Bump dependency Microsoft.Data.SqlClient to 7.0.1 (#4326)
renovate[bot] Apr 29, 2026
b60724e
[Instrumentation.Process] Add schema URL (#4088)
martincostello Apr 29, 2026
09b516a
Bump NuGet/login action to v1.2.0 (#4330)
renovate[bot] Apr 29, 2026
e9ea02b
Bump dependency Meziantou.Framework.NuGetPackageValidation.Tool to 1.…
renovate[bot] Apr 29, 2026
6099206
Bump crate-ci/typos action to v1.45.2 (#4322)
renovate[bot] Apr 29, 2026
55ec10d
Bump aws-sdk-net monorepo (#4321)
renovate[bot] Apr 29, 2026
0e995e6
Bump DavidAnson/markdownlint-cli2-action action to v23.1.0 (#4328)
renovate[bot] Apr 29, 2026
bf729bf
Bump dependency Microsoft.NET.Test.Sdk to 18.5.1 (#4327)
renovate[bot] Apr 29, 2026
052ddf2
[Shared.SqlProcessor] Add support for handling unterminated escaped i…
ysolomchenko Apr 29, 2026
8ec3b95
[SqlClient] Polyfill Stopwatch.GetElapsedTime (#4300)
martincostello Apr 29, 2026
c78ac9e
Bump confluentinc/cp-kafka Docker tag to v8 (#4331)
renovate[bot] Apr 29, 2026
a606b1b
[Repo] Update CHANGELOGs (#4333)
martincostello Apr 29, 2026
e0e10cc
[Infra] Disallow instance string.Equals methods (#4332)
martincostello Apr 29, 2026
d719914
[SqlClient] Use SearchValues more in SqlProcessor (#4303)
martincostello Apr 29, 2026
41a289c
[Sampler.AWS] Fix flaky tests (#4297)
martincostello Apr 30, 2026
3a1bf24
[Redis] Add schema URL to traces (#4095)
martincostello Apr 30, 2026
dc7e36a
[Infra] Skip netfx reference assemblies on Windows (#4287)
martincostello Apr 30, 2026
fd2c666
[AspNetCore] Avoid adding tags for traces (#3993)
martincostello Apr 30, 2026
b60a490
Merge branch 'main' into dotnet-vnext
martincostello Apr 30, 2026
f1246c5
[AspNetCore] Do not add built-in tags for v11+
martincostello Mar 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: run markdownlint
uses: DavidAnson/markdownlint-cli2-action@ce4853d43830c74c1753b39f3cf40f71c2031eb9 # v23.0.0
uses: DavidAnson/markdownlint-cli2-action@6b51ade7a9e4a75a7ad929842dd298a3804ebe8b # v23.1.0
with:
globs: |
**/*.md
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
# renovate: datasource=nuget depName=dotnet-validate
DOTNET_VALIDATE_VERSION: '0.0.1-preview.582'
# renovate: datasource=nuget depName=Meziantou.Framework.NuGetPackageValidation.Tool
MEZIANTOU_VALIDATE_NUGET_PACKAGE_VERSION: '1.0.47'
MEZIANTOU_VALIDATE_NUGET_PACKAGE_VERSION: '1.0.49'
run: |
dotnet tool install --global dotnet-validate --version ${env:DOTNET_VALIDATE_VERSION} --allow-roll-forward
dotnet tool install --global Meziantou.Framework.NuGetPackageValidation.Tool --version ${env:MEZIANTOU_VALIDATE_NUGET_PACKAGE_VERSION} --allow-roll-forward
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
run: dotnet nuget push *.nupkg --api-key ${env:API_KEY} --skip-duplicate --source ${env:SOURCE}

- name: NuGet log in
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1.1.0
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
env:
NUGET_USER_EXISTS: ${{ secrets.NUGET_USER != '' }}
id: nuget-login
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanitycheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: check for typos
uses: crate-ci/typos@cf5f1c29a8ac336af8568821ec41919923b05a83 # v1.45.1
uses: crate-ci/typos@7c572958218557a3272c2d6719629443b5cc26fd # v1.45.2

run-sanitycheck:
runs-on: ubuntu-24.04
Expand Down
28 changes: 14 additions & 14 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

<ItemGroup Label="Packages referenced in all projects">
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.12.0-beta1.25218.8" PrivateAssets="All" />
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" Condition="'$(SkipAnalysis)'!='true'" PrivateAssets="All" />
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" Condition="$(OS) != 'Windows_NT'" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="All" Condition="'$(SkipAnalysis)'!='true'" />
</ItemGroup>

<!-- Production packages are pinned so that any package updates are performed manually, not by any dependency automation -->
Expand Down Expand Up @@ -87,17 +87,17 @@

<!-- Non-production packages are kept up-to-date by dependency automation -->
<ItemGroup Label="Non-production packages, such as for examples and tests">
<PackageVersion Include="AWSSDK.Bedrock" Version="4.0.25.2" />
<PackageVersion Include="AWSSDK.BedrockAgent" Version="4.0.8.2" />
<PackageVersion Include="AWSSDK.BedrockAgentRuntime" Version="4.0.8.19" />
<PackageVersion Include="AWSSDK.BedrockRuntime" Version="4.0.17.3" />
<PackageVersion Include="AWSSDK.DynamoDBv2" Version="4.0.17.9" />
<PackageVersion Include="AWSSDK.S3" Version="4.0.21.2" />
<PackageVersion Include="AWSSDK.SimpleNotificationService" Version="4.0.2.27" />
<PackageVersion Include="AWSSDK.SQS" Version="4.0.2.25" />
<PackageVersion Include="AWSSDK.Bedrock" Version="4.0.25.4" />
<PackageVersion Include="AWSSDK.BedrockAgent" Version="4.0.8.4" />
<PackageVersion Include="AWSSDK.BedrockAgentRuntime" Version="4.0.8.21" />
<PackageVersion Include="AWSSDK.BedrockRuntime" Version="4.0.17.5" />
<PackageVersion Include="AWSSDK.DynamoDBv2" Version="4.0.17.11" />
<PackageVersion Include="AWSSDK.S3" Version="4.0.22.1" />
<PackageVersion Include="AWSSDK.SimpleNotificationService" Version="4.0.2.29" />
<PackageVersion Include="AWSSDK.SQS" Version="4.0.2.27" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="FsCheck.Xunit" Version="3.3.2" />
<PackageVersion Include="FsCheck.Xunit" Version="3.3.3" />
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.3" />
<PackageVersion Include="Google.Api.Gax" Version="4.13.1" />
<PackageVersion Include="Google.Protobuf" Version="3.34.1" />
Expand All @@ -107,7 +107,7 @@
<PackageVersion Include="Grpc.Tools" Version="2.80.0" />
<PackageVersion Include="Hangfire.Core" Version="1.8.23" />
<PackageVersion Include="Hangfire.MemoryStorage" Version="1.8.1.2" />
<PackageVersion Include="JetBrains.Profiler.Api" Version="1.4.11" />
<PackageVersion Include="JetBrains.Profiler.Api" Version="1.4.12" />
<PackageVersion Include="JunitXml.TestLogger" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNet.Mvc" Version="5.3.0" />
<PackageVersion Include="Microsoft.AspNet.WebApi.OwinSelfHost" Version="5.3.0" />
Expand All @@ -117,12 +117,12 @@
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.26" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.26" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.26" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="7.0.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="7.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.26" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.26" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.5.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
<PackageVersion Include="Microsoft.Web.Xdt" Version="3.2.7" />
<PackageVersion Include="MinVer" Version="7.0.0" />
<PackageVersion Include="MessagePack" Version="3.1.4" />
Expand Down
2 changes: 2 additions & 0 deletions build/BannedSymbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ M:System.SByte.TryParse(System.ReadOnlySpan{System.Char},System.SByte@); Use ove
M:System.SByte.TryParse(System.String,System.SByte@); Use overloads that specify CultureInfo.InvariantCulture.
M:System.Single.TryParse(System.ReadOnlySpan{System.Char},System.Single@); Use overloads that specify CultureInfo.InvariantCulture.
M:System.Single.TryParse(System.String,System.Single@); Use overloads that specify CultureInfo.InvariantCulture.
M:System.String.Equals(System.String); Use the static string.Equals(string, string) method instead to avoid potential NullReferenceException.
M:System.String.Equals(System.String,System.StringComparison); Use the static string.Equals(string, string, StringComparison) method instead to avoid potential NullReferenceException.
M:System.TimeOnly.TryParse(System.ReadOnlySpan{System.Char},System.TimeOnly@); Use overloads that specify CultureInfo.InvariantCulture.
M:System.TimeOnly.TryParse(System.String,System.TimeOnly@); Use overloads that specify CultureInfo.InvariantCulture.
M:System.TimeSpan.TryParse(System.ReadOnlySpan{System.Char},System.TimeSpan@); Use overloads that specify CultureInfo.InvariantCulture.
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-dotnet-contrib.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
<File Path="src/Shared/SqlParameterProcessor.cs" />
<File Path="src/Shared/SqlProcessor.cs" />
<File Path="src/Shared/SqlStatementInfo.cs" />
<File Path="src/Shared/StopwatchExtensions.cs" />
<File Path="src/Shared/UriHelper.cs" />
</Folder>
<Folder Name="/src/Shared/AWS/">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ public string EtwSession
}

public bool PrivatePreviewEnableTraceLoggingDynamic => this.parts.TryGetValue(nameof(this.PrivatePreviewEnableTraceLoggingDynamic), out var value)
&& bool.TrueString.Equals(value, StringComparison.OrdinalIgnoreCase);
&& string.Equals(bool.TrueString, value, StringComparison.OrdinalIgnoreCase);

public bool PrivatePreviewEnableOtlpProtobufEncoding => this.parts.TryGetValue(nameof(this.PrivatePreviewEnableOtlpProtobufEncoding), out var value)
&& bool.TrueString.Equals(value, StringComparison.OrdinalIgnoreCase);
&& string.Equals(bool.TrueString, value, StringComparison.OrdinalIgnoreCase);

public bool PrivatePreviewEnableUserEvents => this.parts.TryGetValue(nameof(this.PrivatePreviewEnableUserEvents), out var value)
&& bool.TrueString.Equals(value, StringComparison.OrdinalIgnoreCase);
&& string.Equals(bool.TrueString, value, StringComparison.OrdinalIgnoreCase);

public bool PrivatePreviewEnableAFDCorrelationIdEnrichment => this.parts.TryGetValue(nameof(this.PrivatePreviewEnableAFDCorrelationIdEnrichment), out var value)
&& bool.TrueString.Equals(value, StringComparison.OrdinalIgnoreCase);
&& string.Equals(bool.TrueString, value, StringComparison.OrdinalIgnoreCase);

public int PrivatePreviewLogMessagePackStringSizeLimit =>
!this.parts.TryGetValue(nameof(this.PrivatePreviewLogMessagePackStringSizeLimit), out var value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public IReadOnlyDictionary<string, object>? PrepopulatedMetricDimensions

foreach (var entry in value)
{
if (entry.Key.Equals(GenevaMetricExporter.DimensionKeyForCustomMonitoringAccount, StringComparison.OrdinalIgnoreCase) ||
entry.Key.Equals(GenevaMetricExporter.DimensionKeyForCustomMetricsNamespace, StringComparison.OrdinalIgnoreCase))
if (string.Equals(entry.Key, GenevaMetricExporter.DimensionKeyForCustomMonitoringAccount, StringComparison.OrdinalIgnoreCase) ||
string.Equals(entry.Key, GenevaMetricExporter.DimensionKeyForCustomMetricsNamespace, StringComparison.OrdinalIgnoreCase))
{
throw new ArgumentException($"The dimension: {entry.Key} is reserved and cannot be used as a prepopulated dimension.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ private void SerializeDimensionsAndGetCustomAccountNamespace(in ReadOnlyTagColle
// TODO: Data Validation
}

if (tag.Key.Equals(GenevaMetricExporter.DimensionKeyForCustomMonitoringAccount, StringComparison.OrdinalIgnoreCase) ||
tag.Key.Equals(GenevaMetricExporter.DimensionKeyForCustomMetricsNamespace, StringComparison.OrdinalIgnoreCase))
if (string.Equals(tag.Key, GenevaMetricExporter.DimensionKeyForCustomMonitoringAccount, StringComparison.OrdinalIgnoreCase) ||
string.Equals(tag.Key, GenevaMetricExporter.DimensionKeyForCustomMetricsNamespace, StringComparison.OrdinalIgnoreCase))
{
reservedTags++;
continue;
Expand All @@ -667,7 +667,7 @@ private void SerializeDimensionsAndGetCustomAccountNamespace(in ReadOnlyTagColle
// Serialize MetricPoint Dimension values
foreach (var tag in tags)
{
if (tag.Key.Equals(GenevaMetricExporter.DimensionKeyForCustomMonitoringAccount, StringComparison.OrdinalIgnoreCase) && tag.Value is string metricsAccount)
if (string.Equals(tag.Key, GenevaMetricExporter.DimensionKeyForCustomMonitoringAccount, StringComparison.OrdinalIgnoreCase) && tag.Value is string metricsAccount)
{
if (!string.IsNullOrWhiteSpace(metricsAccount))
{
Expand All @@ -677,7 +677,7 @@ private void SerializeDimensionsAndGetCustomAccountNamespace(in ReadOnlyTagColle
continue;
}

if (tag.Key.Equals(GenevaMetricExporter.DimensionKeyForCustomMetricsNamespace, StringComparison.OrdinalIgnoreCase) && tag.Value is string metricsNamespace)
if (string.Equals(tag.Key, GenevaMetricExporter.DimensionKeyForCustomMetricsNamespace, StringComparison.OrdinalIgnoreCase) && tag.Value is string metricsNamespace)
{
if (!string.IsNullOrWhiteSpace(metricsNamespace))
{
Expand Down
3 changes: 2 additions & 1 deletion src/OpenTelemetry.Exporter.OneCollector/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
Released 2026-Apr-21

* Limit how much of the response body is read when export fails using the HTTP
JSON transport and informational logging is enabled.
JSON transport and informational logging is enabled to resolve
[GHSA-55m9-299j-53c7](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/security/advisories/GHSA-55m9-299j-53c7).
([#4117](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/4117))

* Updated OpenTelemetry core component version(s) to `1.15.3`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ internal class AWSServiceType
internal const string BedrockRuntimeService = "Bedrock Runtime";

internal static bool IsDynamoDbService(string service)
=> DynamoDbService.Equals(service, StringComparison.OrdinalIgnoreCase);
=> string.Equals(DynamoDbService, service, StringComparison.OrdinalIgnoreCase);

internal static bool IsSqsService(string service)
=> SQSService.Equals(service, StringComparison.OrdinalIgnoreCase);
=> string.Equals(SQSService, service, StringComparison.OrdinalIgnoreCase);

internal static bool IsSnsService(string service)
=> SNSService.Equals(service, StringComparison.OrdinalIgnoreCase);
=> string.Equals(SNSService, service, StringComparison.OrdinalIgnoreCase);

internal static bool IsBedrockService(string service)
=> BedrockService.Equals(service, StringComparison.OrdinalIgnoreCase);
=> string.Equals(BedrockService, service, StringComparison.OrdinalIgnoreCase);

internal static bool IsBedrockAgentService(string service)
=> BedrockAgentService.Equals(service, StringComparison.OrdinalIgnoreCase);
=> string.Equals(BedrockAgentService, service, StringComparison.OrdinalIgnoreCase);

internal static bool IsBedrockAgentRuntimeService(string service)
=> BedrockAgentRuntimeService.Equals(service, StringComparison.OrdinalIgnoreCase);
=> string.Equals(BedrockAgentRuntimeService, service, StringComparison.OrdinalIgnoreCase);

internal static bool IsBedrockRuntimeService(string service)
=> BedrockRuntimeService.Equals(service, StringComparison.OrdinalIgnoreCase);
=> string.Equals(BedrockRuntimeService, service, StringComparison.OrdinalIgnoreCase);
}
18 changes: 6 additions & 12 deletions src/OpenTelemetry.Instrumentation.AWS/Implementation/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal class Utils
{
foreach (var tag in activity.TagObjects)
{
if (tag.Key.Equals(tagName, StringComparison.Ordinal))
if (string.Equals(tag.Key, tagName, StringComparison.Ordinal))
{
return tag.Value;
}
Expand All @@ -20,15 +20,13 @@ internal class Utils
return null;
}

internal static string RemoveSuffix(string originalString, string suffix)
{
return string.IsNullOrEmpty(originalString)
internal static string RemoveSuffix(string originalString, string suffix) =>
string.IsNullOrEmpty(originalString)
? string.Empty
: originalString.EndsWith(suffix, StringComparison.Ordinal)
?
originalString.Substring(0, originalString.Length - suffix.Length)
: originalString;
}

/// <summary>
/// Removes amazon prefix from service name. There are two type of service name.
Expand All @@ -39,14 +37,10 @@ internal static string RemoveSuffix(string originalString, string suffix)
/// <param name="serviceName">Name of the service.</param>
/// <returns>String after removing Amazon prefix.</returns>
internal static string RemoveAmazonPrefixFromServiceName(string serviceName)
{
return RemovePrefix(RemovePrefix(serviceName, "Amazon"), ".");
}
=> RemovePrefix(RemovePrefix(serviceName, "Amazon"), ".");

private static string RemovePrefix(string originalString, string prefix)
{
return string.IsNullOrEmpty(originalString) ? string.Empty :
private static string RemovePrefix(string originalString, string prefix) =>
string.IsNullOrEmpty(originalString) ? string.Empty :
originalString.StartsWith(prefix, StringComparison.Ordinal) ? originalString.Substring(prefix.Length) :
originalString;
}
}
1 change: 1 addition & 0 deletions src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ Released 2024-Apr-17
`?key1=value1&key2=value2` becomes `?key1=Redacted&key2=Redacted`. You can
disable this redaction by setting the environment variable
`OTEL_DOTNET_EXPERIMENTAL_ASPNET_DISABLE_URL_QUERY_REDACTION` to `true`.
Resolves [GHSA-vh2m-22xx-q94f](https://github.com/advisories/GHSA-vh2m-22xx-q94f).
([#1656](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1656))

## 1.8.0-beta.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal sealed class AspNetCoreInstrumentation : IDisposable
"Microsoft.AspNetCore.Hosting.UnhandledException"
];

private readonly Func<string, object?, object?, bool> isEnabled = (eventName, _, _)
private readonly Func<string, object?, object?, bool> isEnabled = static (eventName, _, _)
=> DiagnosticSourceEvents.Contains(eventName);

private readonly DiagnosticSourceSubscriber diagnosticSourceSubscriber;
Expand All @@ -32,7 +32,5 @@ public AspNetCoreInstrumentation(HttpInListener httpInListener)

/// <inheritdoc/>
public void Dispose()
{
this.diagnosticSourceSubscriber?.Dispose();
}
=> this.diagnosticSourceSubscriber?.Dispose();
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ public static TracerProviderBuilder AddAspNetCoreInstrumentation(
return builder.AddInstrumentation(sp =>
{
var options = sp.GetRequiredService<IOptionsMonitor<AspNetCoreTraceInstrumentationOptions>>().Get(name);

return new AspNetCoreInstrumentation(
new HttpInListener(options));
return new AspNetCoreInstrumentation(new HttpInListener(options));
});
}

Expand All @@ -102,9 +100,9 @@ private static void AddAspNetCoreInstrumentationSources(
string optionsName,
IServiceProvider? serviceProvider = null)
{
// For .NET7.0 onwards activity will be created using activitySource.
// For .NET 7.0+ the activity will be created using activitySource.
// https://github.com/dotnet/aspnetcore/blob/bf3352f2422bf16fa3ca49021f0e31961ce525eb/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs#L327
// For .NET6.0 and below, we will continue to use legacy way.
// For .NET 6.0 and below, we will continue to use legacy way.
if (HttpInListener.Net7OrGreater)
{
// TODO: Check with .NET team to see if this can be prevented
Expand Down
6 changes: 6 additions & 0 deletions src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

* Avoid duplicative work to add tags to traces when they are already natively supported
by ASP.NET Core itself. When using ASP.NET Core 10, performance can be
improved by setting the `Microsoft.AspNetCore.Hosting.SuppressActivityOpenTelemetryData`
AppContext switch to `false` (its default value is `true`).
([#3993](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/3993))

## 1.15.2

Released 2026-Apr-21
Expand Down
Loading