-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OTLP Exporter Configuration Updated along with Use Cases #1031
Conversation
…-plugin into bugfix-userauth Merge 'main' into 'bugfix-userauth' to incorporate upstream updates This merge brings in the latest changes from the main branch, ensuring the bugfix-userauth branch is up-to-date with the most recent changes from the main repository. This may include updates, bug fixes, or new features that are necessary to maintain compatibility and resolve any potential conflicts.
#### Log Exporter Configuration | ||
|
||
* To export logs to an OTLP endpoint, configure the following environment variables: | ||
- `otel.logs.exporter=otlp` : Specifies that logs should be exported using the OTLP exporter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is configured along with the backend configuration, so it is not necessary to do it manually
|
||
* To export logs to an OTLP endpoint, configure the following environment variables: | ||
- `otel.logs.exporter=otlp` : Specifies that logs should be exported using the OTLP exporter. | ||
- `otel.logs.mirror_to_disk=true` : Ensure logs are written to disk, making them visible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Ensure your project includes OTLP exporter dependency. For Maven. add the following to your `pom.xml`: | ||
``` | ||
<dependency> | ||
<groupID>io.opentelemetry</groupID> | ||
<artifactID>opentelemetry-exporter-otlp</artifactID> | ||
<version>1.30.0</version> | ||
</dependency> | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this dependency is managed by the plugin, not sure why you add this comment here
5. Configure the following environment variables: | ||
```properties | ||
otel.logs.exporter=otlp | ||
otel.logs.mirror_to_disk=true | ||
``` | ||
|
||
6. Start your application and verify that logs are being exported | ||
to the OTLP endpoint and are also visible locally. | ||
|
||
|
||
#### Configuration Examples for Different Use Cases | ||
* Using Logback with OTLP Exporter | ||
Add the following to your `logback.xml` : | ||
```xml | ||
<appender name="OTLP" class="io.opentelemetry.instrumentation.logback.appender.v1_0.OpenTelemetryAppender"> | ||
<exporter>otlp</exporter> | ||
</appender> | ||
|
||
* Deploying in Kubernetes | ||
See the environment variables in your Kubernetes YAML: | ||
``` | ||
env: | ||
- name: otel.logs.exporter | ||
value: "otlp" | ||
- name: otel.logs.mirror_to_disk | ||
value: "true" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not find the sense of this
This PR seems generated with an IA or something for me, which does not make much sense, Could you explain your changes? |
I hereby made changes in the document referring to the issue #1026 . |
the documentation generated by the IA does not make any sense, if you are testing IA stuff, make PRs to your fork, please do not make me review no-sense stuff. |
apologies for the inconvenience,I'll make sure to test future stuff on my own fork repositories. |
Testing done
Submitter checklist