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 `InstrumentProtocol`](#instrument-developers--creating-an-instrument)
43
+
+[Creating an `Instrument`](#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 `InstrumentProtocol` 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 `Instrument` 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 `InstrumentProtocol` protocol (or `TracerProtocol` in case you develop a tracer).
542
-
`InstrumentProtocol` is part of the `Instrumentation` library & `Tracing` contains the `TracerProtocol` protocol.
541
+
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.
543
543
544
-
`InstrumentProtocol` has two requirements:
544
+
`Instrument` 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`
@@ -556,7 +556,7 @@ how to retrieve values from the `LoggingContext` and how to set values on it.
556
556
557
557
When creating a tracer you need to create two types:
558
558
559
-
1. Your tracer conforming to `TracerProtocol`
559
+
1. Your tracer conforming to `Tracer`
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.
Copy file name to clipboardExpand all lines: Sources/Instrumentation/MultiplexInstrument.swift
+6-6
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,27 @@
14
14
15
15
import InstrumentationBaggage
16
16
17
-
/// A pseudo-``InstrumentProtocol`` that may be used to instrument using multiple other ``InstrumentProtocol``s across a
17
+
/// A pseudo-``Instrument`` that may be used to instrument using multiple other ``Instrument``s across a
18
18
/// common `Baggage`.
19
19
publicstructMultiplexInstrument{
20
-
privatevarinstruments:[InstrumentProtocol]
20
+
privatevarinstruments:[Instrument]
21
21
22
22
/// Create a ``MultiplexInstrument``.
23
23
///
24
-
/// - Parameter instruments: An array of ``InstrumentProtocol``s, each of which will be used to ``InstrumentProtocol/inject(_:into:using:)`` or ``InstrumentProtocol/extract(_:into:using:)``
24
+
/// - Parameter instruments: An array of ``Instrument``s, each of which will be used to ``Instrument/inject(_:into:using:)`` or ``Instrument/extract(_:into:using:)``
Copy file name to clipboardExpand all lines: Sources/Tracing/Docs.docc/index.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ To your main target, add a dependency on the `Tracing` library and the instrumen
62
62
),
63
63
```
64
64
65
-
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:
65
+
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:
0 commit comments