Skip to content

Commit 8727655

Browse files
committed
Improve InstrumentationSystem docs 📖
1 parent 43752b0 commit 8727655

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/Instrumentation/InstrumentationSystem.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ import Baggage
2828
/// ## What getter to use
2929
/// - Default to using `InstrumentationSystem.instrument`
3030
/// - Use `InstrumentationSystem.instrument(of: MyInstrument.self)` only if you need to use specific `MyInstrument` APIs
31-
/// - Protocols that "inherit" from `Instrument` may also wrap `.instrument(of: TheirInstrument.self)` in a convenience method
31+
///
32+
/// Specific instrumentation libraries may also provide their own accessors as extensions, e.g. GreatInstrumentation could provide an
33+
/// `InstrumentationSystem.great` convenience accessor, so prefer using them if available. These accessors should call
34+
/// `.instrument(of: GreatInstrument.self)` under the hood to ensure they work when being used through a `MultiplexInstrument`.
3235
public enum InstrumentationSystem {
3336
private static let lock = ReadWriteLock()
3437
private static var _instrument: Instrument = NoOpInstrument()

0 commit comments

Comments
 (0)