-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base OTel connection config and overrides.
- Loading branch information
Showing
19 changed files
with
1,709 additions
and
641 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
docs/src/main/asciidoc/_includes/opentelemetry-config.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
There are no mandatory configurations for the extension to work. | ||
|
||
By default, the exporters will send out data in batches, using the gRPC protocol and endpoint `http://localhost:4317`. | ||
|
||
If you need to change any of the default property values, here is an example on how to configure the default OTLP gRPC Exporter within the application, using the `src/main/resources/application.properties` file: | ||
|
||
[source,properties] | ||
---- | ||
quarkus.application.name=myservice // <1> | ||
quarkus.otel.exporter.otlp.endpoint=http://localhost:4317 // <2> | ||
quarkus.otel.exporter.otlp.headers=authorization=Bearer my_secret // <3> | ||
quarkus.log.console.format=%d{HH:mm:ss} %-5p traceId=%X{traceId}, parentId=%X{parentId}, spanId=%X{spanId}, sampled=%X{sampled} [%c{2.}] (%t) %s%e%n // <4> | ||
# Alternative to the console log | ||
quarkus.http.access-log.pattern="...traceId=%{X,traceId} spanId=%{X,spanId}" // <5> | ||
---- | ||
|
||
<1> All telemetry created from the application will include an OpenTelemetry `Resource` attribute indicating the telemetry was created by the `myservice` application. If not set, it will default to the artifact id. | ||
<2> gRPC endpoint to send the telemetry. If not set, it will default to `http://localhost:4317`. | ||
<3> Optional gRPC headers commonly used for authentication | ||
<4> Add tracing information into log messages. | ||
<5> You can also only put the trace info into the access log. In this case you must omit the info in the console log format. | ||
|
||
We provide signal agnostic configurations for the connection related properties, meaning that you can use the same properties for both tracing and metrics when you set: | ||
[source,properties] | ||
---- | ||
quarkus.otel.exporter.otlp.endpoint=http://localhost:4317 | ||
---- | ||
If you need different configurations for each signal, you can use the specific properties: | ||
[source,properties] | ||
---- | ||
quarkus.otel.exporter.otlp.traces.endpoint=http://trace-uri:4317 // <1> | ||
quarkus.otel.exporter.otlp.metrics.endpoint=http://metrics-uri:4317 // <2> | ||
---- | ||
<1> The endpoint for the traces exporter. | ||
<2> The endpoint for the metrics exporter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.