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

[APM][Otel] Add Otel client based on PoC data #192293

Conversation

jennypavlova
Copy link
Member

@jennypavlova jennypavlova commented Sep 6, 2024

Closes #192115
Closes #192465

Summary

This PR adds synthrace client for Otel native data and a simple scenario. This is the first step of adding it and in the future it will include more metrics and use cases.

Note

To run ES the command needs "xpack.otel_data.registry.enabled=true" flag
yarn es snapshot --license trial --E "xpack.otel_data.registry.enabled=true"

Next steps

  • We currently have only service_destination in the metrics indices we can include the other types in the future
  • After we have all the UI changes we can add more scenarios (also using the opentelemetry demo data and not only the e2e PoC example)

Testing

  • Run ES:
yarn es snapshot --license trial --E "xpack.otel_data.registry.enabled=true"
  • Run Kibana:
yarn start

Warning

If the e2e PoC is used the first 2 steps should be skipped

  • Run syntrace:
node scripts/synthtrace otel_simple_trace.ts --clean
  • Check indices in DevTools for the generated data:
GET *metrics-generic.otel*/_search

GET *traces-generic.otel*/_search

GET *logs-generic.otel*/_search
  • Check in the APM UI (all the tabs)

Warning

Currently the UI changes done in APM are not merged so some errors are expected)

Screen.Recording.2024-10-07.at.20.52.34.mov

@jennypavlova jennypavlova added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Sep 6, 2024
@jennypavlova jennypavlova self-assigned this Sep 6, 2024
@obltmachine
Copy link

🤖 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!)

@MiriamAparicio MiriamAparicio force-pushed the 192115-apmotel-add-synthtrace-scenarios-to-test-with-otel-data branch from 6013cb3 to 5c95114 Compare September 25, 2024 10:01
@jennypavlova jennypavlova marked this pull request as ready for review October 7, 2024 18:57
@jennypavlova jennypavlova requested review from a team as code owners October 7, 2024 18:57
@elasticmachine
Copy link
Contributor

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

@jennypavlova jennypavlova changed the title [🚧 DRAFT🚧][WIP] Add Otel client based on PoC data [APM][Otel] Add Otel client based on PoC data Oct 7, 2024
@jennypavlova jennypavlova added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting OpenTelemetry labels Oct 7, 2024
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Oct 8, 2024
@MiriamAparicio
Copy link
Contributor

@gregkalapos can you review this PR and check that the fields and everything looks good, @jennypavlova and I used the Otel documents on the POC as a source of truth but just to double-check 🙏

@jennypavlova jennypavlova force-pushed the 192115-apmotel-add-synthtrace-scenarios-to-test-with-otel-data branch from eeaa2c1 to 832abf1 Compare October 8, 2024 13:19
Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

packages/kbn-apm-synthtrace-client/src/lib/otel/index.ts Outdated Show resolved Hide resolved
packages/kbn-apm-synthtrace-client/src/lib/otel/metric.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@MiriamAparicio MiriamAparicio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌟
Thanks for the team work 💪

Copy link
Contributor

@gregkalapos gregkalapos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some findings below regarding fields.

@gregkalapos gregkalapos self-requested a review October 14, 2024 07:57
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 14, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: 7382cc8
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-192293-7382cc8529a5

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-synthtrace 64 67 +3
@kbn/apm-synthtrace-client 223 240 +17
total +20

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/apm-synthtrace 10 11 +1
Unknown metric groups

API count

id before after diff
@kbn/apm-synthtrace 64 67 +3
@kbn/apm-synthtrace-client 223 240 +17
total +20

History

cc @jennypavlova

@jennypavlova jennypavlova merged commit 5067f15 into elastic:main Oct 14, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project OpenTelemetry release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Spacetime] OpenTelemetry data with Synthtrace [APM][Otel] Add synthtrace scenarios to test with otel data
8 participants