Repository navigation
Add Elastic Otel Java agent - #1360
Conversation
|
@kiril-keranov @stokpop you seem to be active maintainers, could you please tell me what I need to do to progress this PR |
kiril-keranov
left a comment
There was a problem hiding this comment.
Thanks for the contribution. Left some comments on findings
stokpop
left a comment
There was a problem hiding this comment.
Thanks for the fixes on this PR @jackshirazi!
After another review round: please check cf cups example that might trigger two otel agents.
Also, the uri in the manifest should point to cloud foundry repo that pulls in via cloudfoundry repo. For that we need to add the elastic otel agent also to buildpacks-ci repo, which will replace the uri with its own automated "version update PR" after this is merged. (So no need to update the uri in this PR, the maven central uri is fine.) See: cloudfoundry/buildpacks-ci#682
Add elastic-otel-javaagent to dependency-builds config, mirroring elastic-apm-agent setup, to track new releases of the Elastic Distribution of OpenTelemetry Java agent added in cloudfoundry/java-buildpack#1360.
|
FYI: the automatic PR for updates already works: see #1452 We will merge that one after this PR is merged: it will the also use the latest-greatest 1.13 version it found of the agent (so no need to update the 1.11 in this PR). |
|
Thanks @jackshirazi, ab78843 fixes the documented While testing, I found a few less common setups where two agents (or a different one) can still start:
These aren't specific to this PR. Similar overlaps already exist between the Splunk and upstream OpenTelemetry agents. Rather than adding more skip checks to each framework, we'd prefer a general solution: the framework registry picks one OTel-based agent. I've opened an issue for that: #1469. One behaviour change for existing apps, for the release notes: an app already bound to a service named or tagged I'll discuss with the other maintainers whether we can merge this with these cases documented as known limitations. To help with that, could you add a short troubleshooting section to
Also, Thanks again for all the work and patience on this one! |
|
docs updated per suggestion, thank you @stokpop |
|
Hi @jackshirazi, I ran the integration tests for this PR merged into current main. Both Elastic OTel tests fail: the app never starts. Root cause: the header The Elastic APM framework uses the same quoting, but its tokens (and test values) contain no spaces, so it does not hit this. Here the Suggested fix: pass the headers as the
Note: a I verified this locally against a small OTLP listener: both integration tests pass and the agent sends Alternative, if Suggestion: one test could use Thanks! |
|
Thanks @jackshirazi for the update! 👍 4045ce0 fixes the startup failures I saw. Test results
Runtime resolution To my surprise, updating API keys with only a restart instead of a restage is not widely supported yet: the other agent frameworks in this buildpack (for example OpenTelemetry, Elastic APM, Splunk OTel and Azure Application Insights, among others) write their credentials into the droplet during staging, so a key rotation needs a restage there. One issue: The unit test with Smaller points
|
|
@stokpop Thanks again for the comprehensive testing! I have applied the suggested changes. Any further feedback is definitely welcome, but I won't be able to act on it for a week |
|
Thanks @jackshirazi, d7114ba addresses all my points (encoded header values, jq test no longer skipped, sync comments). I ran the tests again with this PR merged into current main: unit tests are green, and the integration tests on cflinuxfs5 pass (116 passed, 0 failed, 11 skipped), including Elastic OTel, Elastic APM, OpenTelemetry and Splunk. All looks fine from my side. I will discuss with the other maintainers whether it can be merged. |
|
FYI: found out that the otel match was wider in the recent buildpack than before v5 migration, which also caused double agents. See PR to revert this so it also matches the current docs: #1471 |
We have customers requesting our agent to be added to cloudfoundry. I've used the existing Elastic APM agent as a template