feat(otel-ext): add Generic OTel Collector service binding support with mTLS from credentials - #421
Closed
dimitarKiryakov wants to merge 2 commits into
Closed
Conversation
|
|
dimitarKiryakov
marked this pull request as ready for review
August 25, 2026 07:37
- Introduce BindingPropertiesSupplier builder with urlTransform, serverCaCertRequiresMtls, scheme, protocol, compression options - Introduce BindingCredentialKeys with configurable field and file-prefix names - Add ConfigurableOtelBindingPropertiesSupplier: selects a CF service binding by name, label, or tag (sap.otel.generic.cf.binding.*) and maps its credentials to OTLP exporter properties - Add GenericBindingServiceProvider: finds a CF service instance by name, label, or tag selector - CaasBindingPropertiesSupplier: replace broken port-append with urlTransform (<http-receiver-port> placeholder replacement); invoke server CA download only when mTLS client credentials are present (serverCaCertRequiresMtls) - Add Javadoc to CloudLoggingBindingPropertiesSupplier, CaasBindingPropertiesSupplier, GenericBindingServiceProvider, ConfigurableOtelBindingPropertiesSupplier - Fix README: correct property names (sap.otel.generic.*), document label/tag selectors, fix CA-required description - Add tests: BindingPropertiesSupplierTest (urlTransform, serverCaCertRequiresMtls, mTLS+token), CaasBindingPropertiesSupplierTest (placeholder URL, no-CA-without-mTLS), GenericBindingServiceProviderTest (multi-instance, null-tags), ConfigurableOtelBindingPropertiesSupplierTest (label/tag selectors), BindingCredentialKeysTest (default file prefixes)
dimitarKiryakov
force-pushed
the
feat/generic-otel-collector-binding
branch
from
August 27, 2026 11:00
0c11ab8 to
a7a2841
Compare
…erties Add the seven missing sap.otel.generic.cf.binding.* properties (endpoint-name, client-cert-name, client-key-name, server-ca-name, token-name, protocol, compression) to both configuration tables with their default values. Clarify that the three selector properties (name, label, tag) are distinct but only one needs to be set; the first non-blank wins (name → label → tag). Update all prose references that previously only mentioned the name selector.
Author
|
Closing as we discussed with @KarstenSchnitter that he will provide a proper PR with a generic implementation to cover our needs. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sap.otel.collector.cf.binding.nameto the name of any CF service instance (managed or user-provided) and the extension auto-configures theotlpexporter to send data there.tls.crt,tls.key,tls.ca.crt) are read directly from the service binding credentials — no external certificate service required.tokenfield is sent asAuthorization: Bearer <token>.Test plan
mvn test -pl cf-java-logging-support-opentelemetry-agent-extensionmvn package -pl cf-java-logging-support-opentelemetry-agent-extension -DskipTestsurl,tls.crt,tls.key; confirm mTLS exporter properties are set at startupurlandtokenonly; confirm bearer header is setsap.otel.collector.cf.binding.nameproperty behaves identically to before