Skip to content
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

Closed

Conversation

kartiksharma-git
Copy link

Testing done

Submitter checklist

  • [✓] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • [✓ ] Ensure that the pull request title represents the desired changelog entry
  • [ ✓] Please describe what you did
  • [✓] Link to relevant issues in GitHub or Jira
  • [✓] Link to relevant pull requests, esp. upstream and downstream changes
  • [ ✓] Ensure you have provided tests - that demonstrates feature works or fixes the issue

…-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.
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +103 to +110
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>
```
Copy link
Contributor

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

Comment on lines +113 to +139
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"

Copy link
Contributor

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

@kuisathaverat
Copy link
Contributor

This PR seems generated with an IA or something for me, which does not make much sense, Could you explain your changes?

@kartiksharma-git
Copy link
Author

kartiksharma-git commented Jan 29, 2025

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 .
These changes have been made by the help of forums along with help from AI models.
In case, if these changes are unnecessary I'll just close the pull request and want you to look onto the mentioned issue.

@kuisathaverat
Copy link
Contributor

kuisathaverat commented Jan 29, 2025

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.

@kartiksharma-git
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants