Skip to content

Commit

Permalink
Merge from main.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch committed May 16, 2024
2 parents a088d08 + 808abc8 commit 85857de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/OpenTelemetry/.publicApi/Stable/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ OpenTelemetry.Trace.SamplingResult.Equals(OpenTelemetry.Trace.SamplingResult oth
OpenTelemetry.Trace.SamplingResult.SamplingResult() -> void
OpenTelemetry.Trace.SamplingResult.SamplingResult(bool isSampled) -> void
OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision) -> void
OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string! traceStateString) -> void
OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string!, object!>>! attributes) -> void
OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string? traceStateString) -> void
OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string!, object!>>? attributes) -> void
OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string!, object!>>? attributes, string? traceStateString) -> void
OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string?
OpenTelemetry.Trace.TraceIdRatioBasedSampler
Expand Down
5 changes: 5 additions & 0 deletions src/OpenTelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
supported in stable builds.
([#5607](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5607))

* Fixed the nullable annotations for the `SamplingResult` constructors
to allow `null` being supplied as `attributes` or `traceStateString`
which has always been supported.
([#5614](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5614))

* The `ExemplarFilter` used by SDK `MeterProvider`s for histogram metrics can
now be controlled via the experimental
`OTEL_DOTNET_EXPERIMENTAL_METRICS_EXEMPLAR_FILTER_HISTOGRAMS` environment
Expand Down
6 changes: 3 additions & 3 deletions src/OpenTelemetry/Trace/SamplingResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public SamplingResult(bool isSampled)
/// <param name="decision">indicates whether an activity object is recorded and sampled.</param>
/// <param name="attributes">Attributes associated with the sampling decision. Attributes list passed to
/// this method must be immutable. Mutations of the collection and/or attribute values may lead to unexpected behavior.</param>
public SamplingResult(SamplingDecision decision, IEnumerable<KeyValuePair<string, object>> attributes)
public SamplingResult(SamplingDecision decision, IEnumerable<KeyValuePair<string, object>>? attributes)
: this(decision, attributes, traceStateString: null)
{
}
Expand All @@ -42,7 +42,7 @@ public SamplingResult(SamplingDecision decision, IEnumerable<KeyValuePair<string
/// </summary>
/// <param name="decision">indicates whether an activity object is recorded and sampled.</param>
/// <param name="traceStateString">traceStateString associated with the created Activity.</param>
public SamplingResult(SamplingDecision decision, string traceStateString)
public SamplingResult(SamplingDecision decision, string? traceStateString)
: this(decision, attributes: null, traceStateString)
{
}
Expand All @@ -67,7 +67,7 @@ public SamplingResult(SamplingDecision decision, IEnumerable<KeyValuePair<string
}

/// <summary>
/// Gets a value indicating indicates whether an activity object is recorded and sampled.
/// Gets a value indicating whether an activity object is recorded and sampled.
/// </summary>
public SamplingDecision Decision { get; }

Expand Down

0 comments on commit 85857de

Please sign in to comment.