Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
maeddes committed Jul 24, 2024
1 parent f32f630 commit 6856938
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ We need to use the OpenTelemetry context scope. Embed the call to the child meth
}
```

Also add the following import:
Also make sure the following import exists:

```java { title="TodobackendApplication.java" }
import io.opentelemetry.context.Scope;
Expand Down Expand Up @@ -591,7 +591,7 @@ This time we want to export in OTLP format to a gRPC receiving endpoint. The `Ot

Modify the beginning of the class to the code shown below:

```java { title="TodobackendApplication.java" }
```java { title="OpenTelemetryConfiguration.java" }
public OpenTelemetry openTelemetry(){

Resource resource = Resource.getDefault().toBuilder().put(ResourceAttributes.SERVICE_NAME, "todobackend").put(ResourceAttributes.SERVICE_VERSION, "0.1.0").build();
Expand All @@ -609,6 +609,14 @@ Modify the beginning of the class to the code shown below:
.build();
```

Also make sure the following import exists:

```java { title="OpenTelemetryConfiguration.java" }
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
```



As you can see we created an instance of `OtlpGrpcSpanExporter` called `jaegerOtlpExporter` and configured it to send the data to `http://localhost:4317`.

In the Tracer Provider we just added another `addSpanProcessor` call to the already existing one. OpenTelemetry is able to handle mulitple different and parallel processors.
Expand Down Expand Up @@ -644,6 +652,9 @@ docker run -d --name jaeger \

After this container has started, execute a couple of traces and investigate the details in the Jaeger web console `http://localhost:16686`


# Metrics

<!--
#### Semantic conventions

Expand Down

0 comments on commit 6856938

Please sign in to comment.