Skip to content

Commit 43f325d

Browse files
authored
Update writing-instrumentation.md (#13805)
1 parent 419eb50 commit 43f325d

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

docs/contributing/writing-instrumentation.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ instrumentation ->
6464
The top level `settings.gradle.kts` file would contain the following (please add in alphabetical order):
6565

6666
```kotlin
67-
include("instrumentation:yarpc-1.0:javaagent")
68-
include("instrumentation:yarpc-1.0:library")
69-
include("instrumentation:yarpc-1.0:testing")
67+
include(":instrumentation:yarpc-1.0:javaagent")
68+
include(":instrumentation:yarpc-1.0:library")
69+
include(":instrumentation:yarpc-1.0:testing")
7070
```
7171

7272
### Instrumentation metadata.yaml (Experimental)
@@ -133,34 +133,34 @@ plugins {
133133
The `otel.library-instrumentation` gradle plugin will apply all the default settings and configure
134134
build tooling for the library instrumentation module.
135135

136-
By convention, OpenTelemetry library instrumentations are centered around `*Tracing`
137-
and `*TracingBuilder` classes. These two are usually the only public classes in the whole module.
136+
By convention, OpenTelemetry library instrumentations are centered around `*Telemetry`
137+
and `*TelemetryBuilder` classes. These two are usually the only public classes in the whole module.
138138
Keep the amount of public classes and methods as small as possible.
139139

140-
Start by creating a `YarpcTracing` class:
140+
Start by creating a `YarpcTelemetry` class:
141141

142142
```java
143-
public final class YarpcTracing {
143+
public final class YarpcTelemetry {
144144

145-
public static YarpcTracing create(OpenTelemetry openTelemetry) {
145+
public static YarpcTelemetry create(OpenTelemetry openTelemetry) {
146146
return builder(openTelemetry).build();
147147
}
148148

149-
public static YarpcTracingBuilder builder(OpenTelemetry openTelemetry) {
150-
return new YarpcTracingBuilder(openTelemetry);
149+
public static YarpcTelemetryBuilder builder(OpenTelemetry openTelemetry) {
150+
return new YarpcTelemetryBuilder(openTelemetry);
151151
}
152152

153153
// ...
154154

155-
YarpcTracing() {}
155+
YarpcTelemetry() {}
156156

157157
public Interceptor newTracingInterceptor() {
158158
// ...
159159
}
160160
}
161161
```
162162

163-
By convention, the `YarpcTracing` class exposes the `create()` and `builder()` methods as the only
163+
By convention, the `YarpcTelemetry` class exposes the `create()` and `builder()` methods as the only
164164
way of constructing a new instance; the constructor must be kept package-private (at most). Most of
165165
the configuration/construction logic happens in the builder class. Don't expose any other way of
166166
creating a new instance other than using the builder.
@@ -174,21 +174,21 @@ emits telemetry when used.
174174
Consider the following builder class:
175175

176176
```java
177-
public final class YarpcTracingBuilder {
177+
public final class YarpcTelemetryBuilder {
178178

179-
YarpcTracingBuilder(OpenTelemetry openTelemetry) {}
179+
YarpcTelemetryBuilder(OpenTelemetry openTelemetry) {}
180180

181181
// ...
182182

183-
public YarpcTracing build() {
183+
public YarpcTelemetry build() {
184184
// ...
185185
}
186186
}
187187
```
188188

189189
The builder must have a package-private constructor, so that the only way of creating a new one is
190-
calling the `YarpcTracing#builder()` method and a public `build()` method that will return a new,
191-
properly configured `YarpcTracing` instance.
190+
calling the `YarpcTelemetry#builder()` method and a public `build()` method that will return a new,
191+
properly configured `YarpcTelemetry` instance.
192192

193193
The library instrumentation builders can contain configuration settings that let you customize the
194194
behavior of the instrumentation. Most of these options are used to configure the
@@ -198,7 +198,7 @@ process.
198198
The configuration and usage of the `Instrumenter` class is described in
199199
[a separate document](using-instrumenter-api.md). In most cases, the `build()`
200200
method is supposed to create a fully configured `Instrumenter` instance and pass it
201-
to `YarpcTracing`, which in turn can pass it to the interceptor returned
201+
to `YarpcTelemetry`, which in turn can pass it to the interceptor returned
202202
by `newTracingInterceptor()`. The actual process of configuring an `Instrumenter` and various
203203
interfaces involved are described in the [`Instrumenter` API doc](using-instrumenter-api.md).
204204

0 commit comments

Comments
 (0)