Skip to content

Commit 9201e12

Browse files
committed
support register propagators
1 parent c7eb143 commit 9201e12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/OpenTelemetryApi/OpenTelemetry.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public struct OpenTelemetry {
4545
instance.baggageManager = baggageManager
4646
}
4747

48+
public static func registerPropagators(textPropagators: [TextMapPropagator], baggagePropagator: TextMapBaggagePropagator) {
49+
instance.propagators = DefaultContextPropagators(textPropagators: textPropagators, baggagePropagator: baggagePropagator)
50+
}
51+
4852
public static func registerContextManager(contextManager: ContextManager) {
4953
instance.contextProvider.contextManager = contextManager
5054
}

0 commit comments

Comments
 (0)