Skip to content

Commit

Permalink
Make OTelSamplingResult.init Public (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: Moritz Lang <[email protected]>
  • Loading branch information
sidepelican and slashmo authored Sep 14, 2024
1 parent a25d4fd commit 786f913
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/OTel/Tracing/Sampling/OTelSamplingResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ public struct OTelSamplingResult: Equatable, Sendable {
/// Additional attributes describing the sampling decision to be included in the span's attributes.
public let attributes: SpanAttributes

init(decision: OTelSamplingResult.Decision, attributes: SpanAttributes = [:]) {
/// Create a sampling result with the given decision and attributes.
///
/// Parameters:
/// - decision: Whether the span should be recorded/sampled.
/// - attributes: Additional attributes describing the sampling decision.
public init(decision: OTelSamplingResult.Decision, attributes: SpanAttributes = [:]) {
self.decision = decision
self.attributes = attributes
}
Expand Down

0 comments on commit 786f913

Please sign in to comment.