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][OTel] Use `telemetry.sdk` as a fallback for missing `agent.name` on non-tracing data (#196529) #196854

Merged
merged 4 commits into from
Oct 21, 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

…` on non-tracing data (elastic#196529)

## Summary

Related to elastic#195854

This PR adds a fallback when we are missing `agent.name` on APM Service
Inventory list.
Using [OTel semantic convention
fields](https://opentelemetry.io/docs/specs/semconv/resource/#telemetry-sdk)
`telemetry.sdk.language` and `telemetry.sdk.name` to maintain
`agent.name` format for OTel fields like `otlp/${agent}`
`opentelemetry/${agent}`.

## Screenshots
| Before | After |

|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
|
![image](https://github.com/user-attachments/assets/792ca256-f01d-4eae-8a2d-af16fa34ea61)
|
![image](https://github.com/user-attachments/assets/2816d1c7-1207-4da8-adb5-ec417b3fd26e)
|

![image](https://github.com/user-attachments/assets/27df0ffc-8d5f-475c-ad6b-04086521871b)|![image](https://github.com/user-attachments/assets/d088a746-1375-4918-8e55-d3968a80772d)

## How to test it
1. Open otel-apm-e2e-poc repo
2. Add the following code under `processors -> transform ->
metric_statements` in `otelcol.yaml`
```yaml
    - context: datapoint
      statements:
        - set(attributes["processor.event"], "metric")
```
3. Run `make start-stack` & `make build` & `make run` on otel poc repo
4. Don't forget to run also `make start` on opentelemetry-demo and
[follow this
guide](https://github.com/elastic/otel-apm-e2e-poc?tab=readme-ov-file#working-with-opentelemetry-demo)
to make it work.
5. In Kibana add `elasticsearch.ignoreVersionMismatch: true` to
`kibana.dev.yml`.
6. If you go to APM Service Inventory list you will see missing icons.
7. Checkout to my branch
8. Try again, they should be fixed

(cherry picked from commit 16098c4)
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@rmyz
Copy link
Contributor

rmyz commented Oct 18, 2024

/ci

@rmyz rmyz requested review from a team as code owners October 21, 2024 08:04
@rmyz
Copy link
Contributor

rmyz commented Oct 21, 2024

/ci

@rmyz
Copy link
Contributor

rmyz commented Oct 21, 2024

/ci

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 21, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 6836c90
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-196854-6836c90022fb

Failed CI Steps

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/apm-types 333 336 +3
@kbn/elastic-agent-utils 37 41 +4
total +7
Unknown metric groups

API count

id before after diff
@kbn/apm-types 334 337 +3
@kbn/elastic-agent-utils 38 42 +4
total +7

History

cc @rmyz

@kibanamachine kibanamachine merged commit 4c5a369 into elastic:8.x Oct 21, 2024
26 checks passed
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.

3 participants