Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Lint
  • Loading branch information
rajkumar-rangaraj committed Apr 22, 2025
commit 021c18d15b9461cccf2a6d8d7c402eea7be08dee
2 changes: 1 addition & 1 deletion src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

* Fixed an issue where accessing an unset `AFDCorrelationId` in `RuntimeContext`
would throw unhandled exceptions.
([#](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/))
([#2708](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2708))

## 1.11.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ internal class AFDCorrelationIdLogProcessor : BaseProcessor<LogRecord>
private const string AFDCorrelationId = "AFDCorrelationId";
private const string AFDSlotAccessTrackerId = "GenevaAfdCorrelationIdStateTracker";
private static readonly RuntimeContextSlot<bool> GenevaAfdCorrelationIdStateTracker = RuntimeContext.RegisterSlot<bool>(AFDSlotAccessTrackerId);
private bool disposed;
private bool disposed;

public AFDCorrelationIdLogProcessor()
{
GenevaAfdCorrelationIdStateTracker.Set(false);
Expand Down Expand Up @@ -67,12 +67,12 @@ protected override void Dispose(bool disposing)

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static string? GetRuntimeContextValue()
{
{
if (GenevaAfdCorrelationIdStateTracker.Get() == true)
{
return null;
}
}

try
{
return RuntimeContext.GetValue<string>(AFDCorrelationId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
using Xunit;
namespace OpenTelemetry.Exporter.Geneva.Tests;
[CollectionDefinition(nameof(GenevaCorrelationFixture))]
public class GenevaCorrelationFixture : ICollectionFixture<GenevaCorrelationFixture>
{
}
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

using Xunit;

namespace OpenTelemetry.Exporter.Geneva.Tests;

[CollectionDefinition(nameof(GenevaCorrelationFixture))]
public class GenevaCorrelationFixture : ICollectionFixture<GenevaCorrelationFixture>
{
}
Loading