Skip to content
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

[8.x] [APM UI] Fix OpenTelemetry agent names (#193134) #193509

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Fixes elastic#180444

This PR fixes the agent names not being able to properly be retrieved by
the APM UI, changing the way we map OpenTelemetry agent names.
As the format changed from `(opentelemetry|otlp)/{agentName}` to
`(opentelemetry|otlp)/{agentName}/{details}`, we now get the second part
splitting by `/`.

Added mappings for RUM, Android, and iOS OpenTelemetry client, also
fixed `get_service_metadata_details` to get the correct OpenTelemetry
details.

|Before|After|
|-|-|

|![image](https://github.com/user-attachments/assets/28732018-511b-44e0-ac86-cdbe7ed0d1e0)|![image](https://github.com/user-attachments/assets/45a29cc6-f939-4c52-bcc7-54dc15b1a403)|

## How to test
1. Checkout to this branch
2. Run `node scripts/synthtrace many_otel_services.ts --live --clean`
which will fill some APM Otel services.
3. Check that the icon is now rendering

(cherry picked from commit 735e216)
@kibanamachine kibanamachine enabled auto-merge (squash) September 20, 2024 07:12
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Sep 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 20, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: ecbfeba
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-193509-ecbfeba5479d

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #28 / dashboard app - group 4 dashboard empty state adds a new data view when no data views

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/elastic-agent-utils 34 37 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.5MB 3.5MB +783.0B
discover 809.9KB 810.3KB +423.0B
infra 1.6MB 1.6MB +425.0B
total +1.6KB
Unknown metric groups

API count

id before after diff
@kbn/elastic-agent-utils 35 38 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @rmyz

@kibanamachine kibanamachine merged commit b75df09 into elastic:8.x Sep 20, 2024
26 checks passed
rmyz referenced this pull request Sep 20, 2024
# Backport

This will backport the following commits from `main` to `8.15`:
- [[APM UI] Fix OpenTelemetry agent names
(#193134)](#193134)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-20T07:07:14Z","message":"[APM
UI] Fix OpenTelemetry agent names (#193134)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/180444\r\n\r\nThis PR fixes the
agent names not being able to properly be retrieved by\r\nthe APM UI,
changing the way we map OpenTelemetry agent names.\r\nAs the format
changed from `(opentelemetry|otlp)/{agentName}`
to\r\n`(opentelemetry|otlp)/{agentName}/{details}`, we now get the
second part\r\nsplitting by `/`.\r\n\r\nAdded mappings for RUM, Android,
and iOS OpenTelemetry client, also\r\nfixed
`get_service_metadata_details` to get the correct
OpenTelemetry\r\ndetails.\r\n\r\n|Before|After|\r\n|-|-|\r\n\r\n|![image](https://github.com/user-attachments/assets/28732018-511b-44e0-ac86-cdbe7ed0d1e0)|![image](https://github.com/user-attachments/assets/45a29cc6-f939-4c52-bcc7-54dc15b1a403)|\r\n\r\n##
How to test\r\n1. Checkout to this branch\r\n2. Run `node
scripts/synthtrace many_otel_services.ts --live --clean`\r\nwhich will
fill some APM Otel services.\r\n3. Check that the icon is now
rendering","sha":"735e216a952670eb57eaea1229be16e89f9bf1cd","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","apm:opentelemetry","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version"],"number":193134,"url":"https://github.com/elastic/kibana/pull/193134","mergeCommit":{"message":"[APM
UI] Fix OpenTelemetry agent names (#193134)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/180444\r\n\r\nThis PR fixes the
agent names not being able to properly be retrieved by\r\nthe APM UI,
changing the way we map OpenTelemetry agent names.\r\nAs the format
changed from `(opentelemetry|otlp)/{agentName}`
to\r\n`(opentelemetry|otlp)/{agentName}/{details}`, we now get the
second part\r\nsplitting by `/`.\r\n\r\nAdded mappings for RUM, Android,
and iOS OpenTelemetry client, also\r\nfixed
`get_service_metadata_details` to get the correct
OpenTelemetry\r\ndetails.\r\n\r\n|Before|After|\r\n|-|-|\r\n\r\n|![image](https://github.com/user-attachments/assets/28732018-511b-44e0-ac86-cdbe7ed0d1e0)|![image](https://github.com/user-attachments/assets/45a29cc6-f939-4c52-bcc7-54dc15b1a403)|\r\n\r\n##
How to test\r\n1. Checkout to this branch\r\n2. Run `node
scripts/synthtrace many_otel_services.ts --live --clean`\r\nwhich will
fill some APM Otel services.\r\n3. Check that the icon is now
rendering","sha":"735e216a952670eb57eaea1229be16e89f9bf1cd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193134","number":193134,"mergeCommit":{"message":"[APM
UI] Fix OpenTelemetry agent names (#193134)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/180444\r\n\r\nThis PR fixes the
agent names not being able to properly be retrieved by\r\nthe APM UI,
changing the way we map OpenTelemetry agent names.\r\nAs the format
changed from `(opentelemetry|otlp)/{agentName}`
to\r\n`(opentelemetry|otlp)/{agentName}/{details}`, we now get the
second part\r\nsplitting by `/`.\r\n\r\nAdded mappings for RUM, Android,
and iOS OpenTelemetry client, also\r\nfixed
`get_service_metadata_details` to get the correct
OpenTelemetry\r\ndetails.\r\n\r\n|Before|After|\r\n|-|-|\r\n\r\n|![image](https://github.com/user-attachments/assets/28732018-511b-44e0-ac86-cdbe7ed0d1e0)|![image](https://github.com/user-attachments/assets/45a29cc6-f939-4c52-bcc7-54dc15b1a403)|\r\n\r\n##
How to test\r\n1. Checkout to this branch\r\n2. Run `node
scripts/synthtrace many_otel_services.ts --live --clean`\r\nwhich will
fill some APM Otel services.\r\n3. Check that the icon is now
rendering","sha":"735e216a952670eb57eaea1229be16e89f9bf1cd"}},{"url":"https://github.com/elastic/kibana/pull/193509","number":193509,"branch":"8.x","state":"OPEN"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:project-deploy-observability Create an Observability project Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants