-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lost Baggage: Fix TelemetryHttpModule losing Baggage when switching f…
…rom native to managed threads (#2314) * WIP working on reproducing and fixing lost baggage. * TelemetryHttpModule now restores Baggage. * Updated public api. * Unit tests. * Use SuppressFlow for more accurate test. * CHANGELOG update. * Attempting to fix unstable test. * Attempting to fix unstable test #2.
- Loading branch information
1 parent
3cc0f7e
commit 2df1a62
Showing
16 changed files
with
355 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/OpenTelemetry.Api/.publicApi/net461/PublicAPI.Unshipped.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
OpenTelemetry.Context.AsyncLocalRuntimeContextSlot<T>.Value.get -> object | ||
OpenTelemetry.Context.AsyncLocalRuntimeContextSlot<T>.Value.set -> void | ||
OpenTelemetry.Context.IRuntimeContextSlotValueAccessor | ||
OpenTelemetry.Context.IRuntimeContextSlotValueAccessor.Value.get -> object | ||
OpenTelemetry.Context.IRuntimeContextSlotValueAccessor.Value.set -> void | ||
OpenTelemetry.Context.RemotingRuntimeContextSlot<T>.Value.get -> object | ||
OpenTelemetry.Context.RemotingRuntimeContextSlot<T>.Value.set -> void | ||
OpenTelemetry.Context.ThreadLocalRuntimeContextSlot<T>.Value.get -> object | ||
OpenTelemetry.Context.ThreadLocalRuntimeContextSlot<T>.Value.set -> void | ||
override OpenTelemetry.Context.AsyncLocalRuntimeContextSlot<T>.Get() -> T | ||
override OpenTelemetry.Context.AsyncLocalRuntimeContextSlot<T>.Set(T value) -> void | ||
OpenTelemetry.Context.AsyncLocalRuntimeContextSlot<T> | ||
OpenTelemetry.Context.AsyncLocalRuntimeContextSlot<T>.AsyncLocalRuntimeContextSlot(string name) -> void | ||
static OpenTelemetry.Context.RuntimeContext.GetValue(string slotName) -> object | ||
static OpenTelemetry.Context.RuntimeContext.GetValue<T>(string slotName) -> T | ||
static OpenTelemetry.Context.RuntimeContext.SetValue(string slotName, object value) -> void | ||
static OpenTelemetry.Context.RuntimeContext.SetValue<T>(string slotName, T value) -> void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
OpenTelemetry.Context.AsyncLocalRuntimeContextSlot<T>.Value.get -> object | ||
OpenTelemetry.Context.AsyncLocalRuntimeContextSlot<T>.Value.set -> void | ||
OpenTelemetry.Context.IRuntimeContextSlotValueAccessor | ||
OpenTelemetry.Context.IRuntimeContextSlotValueAccessor.Value.get -> object | ||
OpenTelemetry.Context.IRuntimeContextSlotValueAccessor.Value.set -> void | ||
OpenTelemetry.Context.ThreadLocalRuntimeContextSlot<T>.Value.get -> object | ||
OpenTelemetry.Context.ThreadLocalRuntimeContextSlot<T>.Value.set -> void | ||
static OpenTelemetry.Context.RuntimeContext.GetValue(string slotName) -> object | ||
static OpenTelemetry.Context.RuntimeContext.GetValue<T>(string slotName) -> T | ||
static OpenTelemetry.Context.RuntimeContext.SetValue(string slotName, object value) -> void | ||
static OpenTelemetry.Context.RuntimeContext.SetValue<T>(string slotName, T value) -> void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/OpenTelemetry.Api/Context/IRuntimeContextSlotValueAccessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// <copyright file="IRuntimeContextSlotValueAccessor.cs" company="OpenTelemetry Authors"> | ||
// Copyright The OpenTelemetry Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// </copyright> | ||
|
||
namespace OpenTelemetry.Context | ||
{ | ||
/// <summary> | ||
/// Describes a type of <see cref="RuntimeContextSlot{T}"/> which can expose its value as an <see cref="object"/>. | ||
/// </summary> | ||
public interface IRuntimeContextSlotValueAccessor | ||
{ | ||
/// <summary> | ||
/// Gets or sets the value of the slot as an <see cref="object"/>. | ||
/// </summary> | ||
object Value { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.