Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [APM][OTel] Use `telemetry.sdk` as a fallback for mis…
…sing `agent.name` on non-tracing data (elastic#196529) (elastic#196854) # Backport This will backport the following commits from `main` to `8.x`: - [[APM][OTel] Use `telemetry.sdk` as a fallback for missing `agent.name` on non-tracing data (elastic#196529)](elastic#196529) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sergi Romeu","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T11:30:19Z","message":"[APM][OTel] Use `telemetry.sdk` as a fallback for missing `agent.name` on non-tracing data (elastic#196529)\n\n## Summary\r\n\r\nRelated to elastic#195854\r\n\r\nThis PR adds a fallback when we are missing `agent.name` on APM Service\r\nInventory list.\r\nUsing [OTel semantic convention\r\nfields](https://opentelemetry.io/docs/specs/semconv/resource/#telemetry-sdk)\r\n`telemetry.sdk.language` and `telemetry.sdk.name` to maintain\r\n`agent.name` format for OTel fields like `otlp/${agent}`\r\n`opentelemetry/${agent}`.\r\n\r\n## Screenshots\r\n| Before | After |\r\n\r\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\r\n|\r\n![image](https://github.com/user-attachments/assets/792ca256-f01d-4eae-8a2d-af16fa34ea61)\r\n|\r\n![image](https://github.com/user-attachments/assets/2816d1c7-1207-4da8-adb5-ec417b3fd26e)\r\n|\r\n\r\n![image](https://github.com/user-attachments/assets/27df0ffc-8d5f-475c-ad6b-04086521871b)|![image](https://github.com/user-attachments/assets/d088a746-1375-4918-8e55-d3968a80772d)\r\n\r\n\r\n## How to test it\r\n1. Open otel-apm-e2e-poc repo\r\n2. Add the following code under `processors -> transform ->\r\nmetric_statements` in `otelcol.yaml`\r\n```yaml\r\n - context: datapoint\r\n statements:\r\n - set(attributes[\"processor.event\"], \"metric\")\r\n```\r\n3. Run `make start-stack` & `make build` & `make run` on otel poc repo \r\n4. Don't forget to run also `make start` on opentelemetry-demo and\r\n[follow this\r\nguide](https://github.com/elastic/otel-apm-e2e-poc?tab=readme-ov-file#working-with-opentelemetry-demo)\r\nto make it work.\r\n5. In Kibana add `elasticsearch.ignoreVersionMismatch: true` to\r\n`kibana.dev.yml`.\r\n6. If you go to APM Service Inventory list you will see missing icons.\r\n7. Checkout to my branch\r\n8. Try again, they should be fixed","sha":"16098c454751939d9e3587ff458bb652b28e3d79","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","apm:opentelemetry","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[APM][OTel] Use `telemetry.sdk` as a fallback for missing `agent.name` on non-tracing data","number":196529,"url":"https://github.com/elastic/kibana/pull/196529","mergeCommit":{"message":"[APM][OTel] Use `telemetry.sdk` as a fallback for missing `agent.name` on non-tracing data (elastic#196529)\n\n## Summary\r\n\r\nRelated to elastic#195854\r\n\r\nThis PR adds a fallback when we are missing `agent.name` on APM Service\r\nInventory list.\r\nUsing [OTel semantic convention\r\nfields](https://opentelemetry.io/docs/specs/semconv/resource/#telemetry-sdk)\r\n`telemetry.sdk.language` and `telemetry.sdk.name` to maintain\r\n`agent.name` format for OTel fields like `otlp/${agent}`\r\n`opentelemetry/${agent}`.\r\n\r\n## Screenshots\r\n| Before | After |\r\n\r\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\r\n|\r\n![image](https://github.com/user-attachments/assets/792ca256-f01d-4eae-8a2d-af16fa34ea61)\r\n|\r\n![image](https://github.com/user-attachments/assets/2816d1c7-1207-4da8-adb5-ec417b3fd26e)\r\n|\r\n\r\n![image](https://github.com/user-attachments/assets/27df0ffc-8d5f-475c-ad6b-04086521871b)|![image](https://github.com/user-attachments/assets/d088a746-1375-4918-8e55-d3968a80772d)\r\n\r\n\r\n## How to test it\r\n1. Open otel-apm-e2e-poc repo\r\n2. Add the following code under `processors -> transform ->\r\nmetric_statements` in `otelcol.yaml`\r\n```yaml\r\n - context: datapoint\r\n statements:\r\n - set(attributes[\"processor.event\"], \"metric\")\r\n```\r\n3. Run `make start-stack` & `make build` & `make run` on otel poc repo \r\n4. Don't forget to run also `make start` on opentelemetry-demo and\r\n[follow this\r\nguide](https://github.com/elastic/otel-apm-e2e-poc?tab=readme-ov-file#working-with-opentelemetry-demo)\r\nto make it work.\r\n5. In Kibana add `elasticsearch.ignoreVersionMismatch: true` to\r\n`kibana.dev.yml`.\r\n6. If you go to APM Service Inventory list you will see missing icons.\r\n7. Checkout to my branch\r\n8. Try again, they should be fixed","sha":"16098c454751939d9e3587ff458bb652b28e3d79"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196529","number":196529,"mergeCommit":{"message":"[APM][OTel] Use `telemetry.sdk` as a fallback for missing `agent.name` on non-tracing data (elastic#196529)\n\n## Summary\r\n\r\nRelated to elastic#195854\r\n\r\nThis PR adds a fallback when we are missing `agent.name` on APM Service\r\nInventory list.\r\nUsing [OTel semantic convention\r\nfields](https://opentelemetry.io/docs/specs/semconv/resource/#telemetry-sdk)\r\n`telemetry.sdk.language` and `telemetry.sdk.name` to maintain\r\n`agent.name` format for OTel fields like `otlp/${agent}`\r\n`opentelemetry/${agent}`.\r\n\r\n## Screenshots\r\n| Before | After |\r\n\r\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\r\n|\r\n![image](https://github.com/user-attachments/assets/792ca256-f01d-4eae-8a2d-af16fa34ea61)\r\n|\r\n![image](https://github.com/user-attachments/assets/2816d1c7-1207-4da8-adb5-ec417b3fd26e)\r\n|\r\n\r\n![image](https://github.com/user-attachments/assets/27df0ffc-8d5f-475c-ad6b-04086521871b)|![image](https://github.com/user-attachments/assets/d088a746-1375-4918-8e55-d3968a80772d)\r\n\r\n\r\n## How to test it\r\n1. Open otel-apm-e2e-poc repo\r\n2. Add the following code under `processors -> transform ->\r\nmetric_statements` in `otelcol.yaml`\r\n```yaml\r\n - context: datapoint\r\n statements:\r\n - set(attributes[\"processor.event\"], \"metric\")\r\n```\r\n3. Run `make start-stack` & `make build` & `make run` on otel poc repo \r\n4. Don't forget to run also `make start` on opentelemetry-demo and\r\n[follow this\r\nguide](https://github.com/elastic/otel-apm-e2e-poc?tab=readme-ov-file#working-with-opentelemetry-demo)\r\nto make it work.\r\n5. In Kibana add `elasticsearch.ignoreVersionMismatch: true` to\r\n`kibana.dev.yml`.\r\n6. If you go to APM Service Inventory list you will see missing icons.\r\n7. Checkout to my branch\r\n8. Try again, they should be fixed","sha":"16098c454751939d9e3587ff458bb652b28e3d79"}}]}] BACKPORT--> Co-authored-by: Sergi Romeu <[email protected]>
- Loading branch information