-
-
Notifications
You must be signed in to change notification settings - Fork 220
Remove TracePropagationTarget #2763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -1,60 +0,0 @@ | |||
namespace Sentry; | |||
|
|||
// TODO: Replace TracePropagationTarget with SubstringOrRegexPattern in next major version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't really explain why.
This type at least from what its named is part of Sentry's protocol and easy to find in docs, etc.
It's getting removed just because it's 'the same as SubstringOrRegexPattern'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put some context in the PR description. I think the TracePropagationTargets
property will still be easy enough to find and is well documented and having it's own type wouldn't make it any more usable:
sentry-dotnet/src/Sentry/SentryOptions.cs
Lines 824 to 842 in f2524bd
/// <summary> | |
/// A customizable list of <see cref="SubstringOrRegexPattern"/> objects, each containing either a | |
/// substring or regular expression pattern that can be used to control which outgoing HTTP requests | |
/// will have the <c>sentry-trace</c> and <c>baggage</c> headers propagated, for purposes of distributed tracing. | |
/// The default value contains a single value of <c>.*</c>, which matches everything. | |
/// To disable propagation completely, clear this collection or set it to an empty collection. | |
/// </summary> | |
/// <seealso href="https://develop.sentry.dev/sdk/performance/#tracepropagationtargets"/> | |
/// <remarks> | |
/// Adding an item to the default list will clear the <c>.*</c> value automatically. | |
/// </remarks> | |
public IList<SubstringOrRegexPattern> TracePropagationTargets | |
{ | |
// NOTE: During configuration binding, .NET 6 and lower used to just call Add on the existing item. | |
// .NET 7 changed this to call the setter with an array that already starts with the old value. | |
// We have to handle both cases. | |
get => _tracePropagationTargets; | |
set => _tracePropagationTargets = value.SetWithConfigBinding(); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Resolves #2666
Motivation
TracePropagationTarget
currently doesn't add any functionality over/aboveSubstringOrRegexPattern
, so there's no need to retain both of these:SubstringOrRegexPattern
is the less specific type that is also used forFailedRequestTargets
:sentry-dotnet/src/Sentry/SentryOptions.cs
Lines 678 to 680 in f2524bd