-
-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Labels
Description
Description
So far, the Dynamic Sampling Context (DSC) was immutable after the first propagation.
But in the meantime, immutability only partially applies, after
- feat: Associate replays with errors and traces on Android #4133
- fix: overwrite DSC
sample_rate
when sampling #4374
For both cases, we allocate a shallow copy of the DynamicSamplingContext
instance, and the underlying IReadOnlyDictionary
.
Since DynamicSamplingContext
is an internal
class, we can optimize the implementation details to avoid copy allocations, and instead mutate the internal Dictionary
that we create in the .ctor.
Alternatively, we could rewrite or derive a DynamicSamplingContext
, and/or introduce something similar like a DynamicSamplingContextBuilder
. But since the DynamicSamplingContext
is internal
this may not be required.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status