You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+[Creating an `Instrument`](#instrument-developers--creating-an-instrument)
43
+
+[Creating an `InstrumentProtocol`](#instrument-developers--creating-an-instrument)
44
44
+[Creating a `Tracer`](#creating-a--tracer-)
45
45
*[Contributing](#contributing)
46
46
@@ -119,7 +119,7 @@ To your main target, add a dependency on `Tracing` library and the instrument yo
119
119
),
120
120
```
121
121
122
-
Then (in an application, libraries should _never_ invoke `bootstrap`), you will want to bootstrap the specific tracer you want to use in your application. A `Tracer` is a type of `Instrument` and can be offered used to globally bootstrap the tracing system, like this:
122
+
Then (in an application, libraries should _never_ invoke `bootstrap`), you will want to bootstrap the specific tracer you want to use in your application. A `Tracer` is a type of `InstrumentProtocol` and can be offered used to globally bootstrap the tracing system, like this:
123
123
124
124
125
125
```swift
@@ -295,7 +295,7 @@ To your main target, add a dependency on the `Instrumentation library` and the i
295
295
296
296
Instead of providing each instrumented library with a specific instrument explicitly, you *bootstrap* the
297
297
`InstrumentationSystem` which acts as a singleton that libraries/frameworks access when calling out to the configured
Creating an instrument means adopting the `Instrument` protocol (or `Tracer` in case you develop a tracer).
542
-
`Instrument` is part of the `Instrumentation` library & `Tracing` contains the `Tracer` protocol.
541
+
Creating an instrument means adopting the `InstrumentProtocol` protocol (or `TracerProtocol` in case you develop a tracer).
542
+
`InstrumentProtocol` is part of the `Instrumentation` library & `Tracing` contains the `TracerProtocol` protocol.
543
543
544
-
`Instrument` has two requirements:
544
+
`InstrumentProtocol` has two requirements:
545
545
546
546
1. A method to inject values inside a `LoggingContext` into a generic carrier (e.g. HTTP headers)
547
547
2. A method to extract values from a generic carrier (e.g. HTTP headers) and store them in a `LoggingContext`
@@ -552,11 +552,11 @@ act on the provided information or to add additional information to be carried a
552
552
> Check out the [`Baggage` documentation](https://github.com/apple/swift-distributed-tracing-baggage) for more information on
553
553
how to retrieve values from the `LoggingContext` and how to set values on it.
554
554
555
-
### Creating a `Tracer`
555
+
### Creating a Tracer
556
556
557
557
When creating a tracer you need to create two types:
558
558
559
-
1. Your tracer conforming to `Tracer`
559
+
1. Your tracer conforming to `TracerProtocol`
560
560
2. A span class conforming to `Span`
561
561
562
562
> The `Span` conforms to the standard rules defined in [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-specification/blob/v0.7.0/specification/trace/api.md#span), so if unsure about usage patterns, you can refer to this specification and examples referring to it.
0 commit comments