Skip to content

Commit 582fff5

Browse files
committed
cleaned up the sentences around carriers, knowledge of types, and injecting and extracting values
1 parent 466a163 commit 582fff5

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Sources/Instrumentation/Instrument.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ import ServiceContextModule
1919
/// The assocaited type, `Carrier`, is a service request such as an HTTP request,
2020
/// that has string values that can be extracted to provide information for a tracing span.
2121
///
22-
/// Typically the library adopting instrumentation, would provide an implementation of this type, since it is aware of its carrier type.
23-
/// Which then can be combined with instrumentation or tracing implementations, which are not aware of the concrete carrier, and only provide an ``Instrument`` (or `Tracer`) which makes use of injector/extractor to operate on carrier values.
22+
/// Typically the library adopting instrumentation provides an implementation of this type, since it is aware of its carrier type.
23+
/// That type can be combined with instrumentation or tracing implementations, which are not aware of the concrete carrier,
24+
/// and only provide an ``Instrument`` (or `Tracer`) which makes use of injector/extractor to operate on carrier values.
2425
public protocol Extractor: Sendable {
2526
/// The carrier to extract values from.
2627
associatedtype Carrier: Sendable
@@ -36,9 +37,10 @@ public protocol Extractor: Sendable {
3637
/// A type that allows you to inject values to an associated carrier.
3738
///
3839
/// The associated type, `Carrier`, is often a client or outgoing request into which values are inserted for tracing spans.
39-
40-
/// Typically the library adopting instrumentation, would provide an implementation of this type, since it is aware of its carrier type.
41-
/// Which then can be combined with instrumentation or tracing implementations, which are not aware of the concrete carrier, and only provide an ``Instrument`` (or `Tracer`) which makes use of injector/extractor to operate on carrier values.
40+
///
41+
/// Typically the library adopting instrumentation provides an implementation of this type, since it is aware of its carrier type.
42+
/// That type can be combined with instrumentation or tracing implementations, which are not aware of the concrete carrier,
43+
/// and only provide an ``Instrument`` (or `Tracer`) which makes use of injector/extractor to operate on carrier values.
4244
public protocol Injector: Sendable {
4345
/// The carrier to inject values into.
4446
associatedtype Carrier: Sendable

0 commit comments

Comments
 (0)