APM telemetry collection Otel agent distro diferentiation - issue 489#210775
Conversation
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
cc @marcogavaz |
kpatticha
left a comment
There was a problem hiding this comment.
LGTM. Nice work.
it would be great if you could update the PR description to include a short summary (for future reference_
…elastic#210775) ## Summary This PRs follows the [closed PR ](elastic#208770) and Closes elastic/observability-bi#489 As requested in [this comment ](elastic#186281 (comment)) and tracked by the issue elastic#186281 this PR handles main changes introduced to address the request for capturing open-ended OTel distro agent names with patter `opentelemetry/<LANGUAGE>/<DISTRO_NAME>`. These changes ensure that new agent names won’t be dropped in telemetry. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
|
FYI: I discussed with @basepi about backporting this to 8.19. He agrees that having this in 8.19 (along with 9.1) would be "just fine with us [BI team]". My motivation for backporting this is so that I'm not sure if adding the "8.19" label to the PR after it has been merged will trigger automatic backporting PR generation. I will try that. Failing that, I'll use |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…sue 489 (#210775) (#224160) # Backport This will backport the following commits from `main` to `8.19`: - [APM telemetry collection Otel agent distro diferentiation - issue 489 (#210775)](#210775) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Gavazzoni","email":"138492709+marcogavaz@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-14T14:11:29Z","message":"APM telemetry collection Otel agent distro diferentiation - issue 489 (#210775)\n\n## Summary\r\n\r\nThis PRs follows the [closed PR\r\n](#208770) and Closes\r\nhttps://github.com/elastic/observability-bi/issues/489\r\n\r\nAs requested in [this comment\r\n](#186281 (comment)) and\r\ntracked by the issue https://github.com/elastic/kibana/issues/186281\r\nthis PR handles main changes introduced to address the request for\r\ncapturing open-ended OTel distro agent names with patter\r\n`opentelemetry/<LANGUAGE>/<DISTRO_NAME>`. These changes ensure that new\r\nagent names won’t be dropped in telemetry.\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1ee13cae705f2bf564a18c492bca4f9809245f7e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","backport:skip","Team:obs-ux-infra_services","v9.1.0","v8.19.0"],"title":"APM telemetry collection Otel agent distro diferentiation - issue 489","number":210775,"url":"https://github.com/elastic/kibana/pull/210775","mergeCommit":{"message":"APM telemetry collection Otel agent distro diferentiation - issue 489 (#210775)\n\n## Summary\r\n\r\nThis PRs follows the [closed PR\r\n](#208770) and Closes\r\nhttps://github.com/elastic/observability-bi/issues/489\r\n\r\nAs requested in [this comment\r\n](#186281 (comment)) and\r\ntracked by the issue https://github.com/elastic/kibana/issues/186281\r\nthis PR handles main changes introduced to address the request for\r\ncapturing open-ended OTel distro agent names with patter\r\n`opentelemetry/<LANGUAGE>/<DISTRO_NAME>`. These changes ensure that new\r\nagent names won’t be dropped in telemetry.\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1ee13cae705f2bf564a18c492bca4f9809245f7e"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210775","number":210775,"mergeCommit":{"message":"APM telemetry collection Otel agent distro diferentiation - issue 489 (#210775)\n\n## Summary\r\n\r\nThis PRs follows the [closed PR\r\n](#208770) and Closes\r\nhttps://github.com/elastic/observability-bi/issues/489\r\n\r\nAs requested in [this comment\r\n](#186281 (comment)) and\r\ntracked by the issue https://github.com/elastic/kibana/issues/186281\r\nthis PR handles main changes introduced to address the request for\r\ncapturing open-ended OTel distro agent names with patter\r\n`opentelemetry/<LANGUAGE>/<DISTRO_NAME>`. These changes ensure that new\r\nagent names won’t be dropped in telemetry.\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1ee13cae705f2bf564a18c492bca4f9809245f7e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marco Gavazzoni <138492709+marcogavaz@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
This PRs follows the closed PR and Closes https://github.com/elastic/observability-bi/issues/489
As requested in this comment and tracked by the issue #186281 this PR handles main changes introduced to address the request for capturing open-ended OTel distro agent names with patter
opentelemetry/<LANGUAGE>/<DISTRO_NAME>. These changes ensure that new agent names won’t be dropped in telemetry.Changes introduced in
servicestaskPreviously telemetry code enumerated OTel agents using a static array (OPEN_TELEMETRY_AGENT_NAMES) listing known agent names (like opentelemetry/java, opentelemetry/go, etc.), while now it starts with an empty object and dynamically add whatever agent names es query returns, so after retrieving the results, we let the data from the terms aggregator define which agent names exist, rather than forcing them to match any fixed array.
This is taken care mainly in:
so for example if a new
agent.namelikeopentelemetry/java/elasticappears in the data, we automatically add it to aggregatedServicesChanges introduced in
agentstaskSimilarly telemetry code started with a large dictionary built from
OPEN_TELEMETRY_AGENT_NAMESand then for each prefixopentelemetrorotlpit aggregated subfields (framework, language, runtime versions) and tried to map them to the dictionary.While now after the prefix-based aggregator runs it look at the returned buckets. For each agentBucket (with a key
opentelemetry/<LANGUAGE>/<DISTRO_NAME>) an entry is dynamically created.This PR should be enough in order to be able to differentiate our distro from any other OTel distro as requested.
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelines