-
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
Introduce Cloud Logging Exporter #169
Introduce Cloud Logging Exporter #169
Conversation
Register signal exporters for logs, metrics and traces, that forward signals to SAP Cloud Logging, if an appropriate service binding is found or do a non operation otherwise. This allows developers to explicitly configure the export, e.g. by `otel.logs.exporter=cloud-logging`. Additional exporters can be added with comma-separated labels. Signed-off-by: Karsten Schnitter <[email protected]>
Adds unit tests for all main parts of the new instrumentation. Checking cases of missing bindings and other configuration issues. Signed-off-by: Karsten Schnitter <[email protected]>
Fixes source id and adds process attributes. Signed-off-by: Karsten Schnitter <[email protected]>
Use the same service binding scanning in old and new exporter configuration. Signed-off-by: Karsten Schnitter <[email protected]>
Add references to the `cloud-logging`exporter to the documentation. Describe the new config properties to control the extension. Signed-off-by: Karsten Schnitter <[email protected]>
6dfc56b
to
e99fb8a
Compare
return invocation.getArguments()[1]; | ||
} | ||
}); | ||
|
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.
return invocation.getArguments()[1]; | ||
} | ||
}); | ||
|
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.
return invocation.getArguments()[1]; | ||
} | ||
}); | ||
|
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 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.
LGTM
You might want to consider to remove the test resources not needed for the tests |
Delete unnecessary files from key and certificate creation. Signed-off-by: Karsten Schnitter <[email protected]>
@@ -37,27 +38,76 @@ java -javaagent:BOOT-INF/lib/opentelemetry-javaagent-<version>.jar \ | |||
|
|||
See the [example manifest](../sample-spring-boot/manifest-otel-javaagent.yml), how this translates into a deployment description. | |||
|
|||
For the instrumentation to send observability data to SAP Cloud Logging, the application needs to be bound to a corresponding service instance. | |||
The service instance can be either managed or [user-provided](#using-user-provided-service-instances). | |||
Once the agent is attached to the JVM with the ectension in place, there are two ways, which can be used to send data to [SAP Cloud Logging](https://discovery-center.cloud.sap/serviceCatalog/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.
Once the agent is attached to the JVM with the ectension in place, there are two ways, which can be used to send data to [SAP Cloud Logging](https://discovery-center.cloud.sap/serviceCatalog/cloud-logging): | |
Once the agent is attached to the JVM with the extension in place, there are two ways, which can be used to send data to [SAP Cloud Logging](https://discovery-center.cloud.sap/serviceCatalog/cloud-logging): |
|
||
Note, that the OpenTelemetry Java Agent currently sends traces and metrics by default using the `otlp` exporter. | ||
That means, without any configuration the agent with the extension will forward metrics and traces to [SAP Cloud Logging](https://discovery-center.cloud.sap/serviceCatalog/cloud-logging). | ||
See TODO for the difference between `cloud-logging` and `otlp` exporters. |
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.
leftover TODO
return defaultAggregationSelector.getDefaultAggregation(instrumentType); | ||
} | ||
|
||
} |
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.
missing new line, also check files below
Take over suggestions from #169. Signed-off-by: Karsten Schnitter <[email protected]>
Add custom exporter
cloud-logging
that is fully auto-configured with all available bindings to SAP Cloud Logging.Avoid generation of any local files containing secrets.
This allows to utilize the default
otlp
exporter for different data sinks.