-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add OpenTelemetry Java Agent Extension #165
Conversation
This extension for the OpenTelemetry Java Agent detects bindings to SAP logging services with active OpenTelemetry support. If such a binding is detected the OpenTelemetry Java Agent is configured with the provided credentials and appropriate resource attributes are configured. Signed-off-by: Karsten Schnitter <[email protected]>
Signed-off-by: Karsten Schnitter <[email protected]>
Provides documentation for the OpenTelemetry Java Agent Extension and a sample with the Spring Boot sample app. Signed-off-by: Karsten Schnitter <[email protected]>
Signed-off-by: Karsten Schnitter <[email protected]>
Adds the missing file content. Signed-off-by: Karsten Schnitter <[email protected]>
Signed-off-by: Karsten Schnitter <[email protected]>
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.
Would be best to get a second pair of eyes from someone who is more familiar with Java.
Mostly minor things in the markdown files.
cf-java-logging-support-opentelemetry-agent-extension/README.md
Outdated
Show resolved
Hide resolved
cf-java-logging-support-opentelemetry-agent-extension/README.md
Outdated
Show resolved
Hide resolved
cf-java-logging-support-opentelemetry-agent-extension/README.md
Outdated
Show resolved
Hide resolved
cf-java-logging-support-opentelemetry-agent-extension/README.md
Outdated
Show resolved
Hide resolved
cf-java-logging-support-opentelemetry-agent-extension/README.md
Outdated
Show resolved
Hide resolved
# OpenTelemetry Java Agent Extension for SAP Cloud Logging | ||
|
||
This module provides an extension for the [OpenTelemetry Java Agent](https://opentelemetry.io/docs/instrumentation/java/automatic/). | ||
The extension scans the service bindings of an application for SAP Cloud Logging. |
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.
Link to SAP Cloud Logging?
(I know the doc as well as sap cloud logging is not GA yet. So is this a precondition for this PR?)
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.
There is on public link for that yet, except the TechEd News.
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.
A link would not be a prerequisite.
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.
synced w/ @KarstenSchnitter: link will be provided soon once available
...om/sap/hcf/cf/logging/opentelemetry/agent/ext/attributes/CloudFoundryResourceCustomizer.java
Outdated
Show resolved
Hide resolved
...ap/hcf/cf/logging/opentelemetry/agent/ext/binding/CloudLoggingBindingPropertiesSupplier.java
Outdated
Show resolved
Hide resolved
Co-authored-by: JannikBrand <[email protected]>
<dependency> | ||
<groupId>io.pivotal.cfenv</groupId> | ||
<artifactId>java-cfenv</artifactId> | ||
<version>2.5.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.
Instead of using a CF-specific library to retrieve service bindings you might want to take a look at the BTP Service Binding Access lib, that was developed and is used by SAP Cloud SDK, CAP Java and the SAP Security Lib. It allows to retrieve service binding information independent if you are running on CF or Kyma (or any other environment supporting the Open Service Broker API).
If that sounds interesting to you, maybe I can also try a contribution to refactor the existing code based on the library.
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.
Thanks for the pointer. I will look at the library. I went for this specific library, since the extension itself is very specific. It is also very sensitive to the size of the final jar. This is because it is embedded into another extension, that goes into the SAP Java buildpack. I am also unsure, whether there are benefits when running in Kyma.
This extension provides auto-configuration for OpenTelemetry for apps bound to SAP Cloud Logging.
The configuration is picked-up from managed or user-provided service bindings.