Skip to content

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

Merged
jennypavlova merged 24 commits intoelastic:mainfrom
jennypavlova:192115-apmotel-add-synthtrace-scenarios-to-test-with-otel-data
Oct 14, 2024
Merged

[APM][Otel] Add Otel client based on PoC data#192293
jennypavlova merged 24 commits intoelastic:mainfrom
jennypavlova:192115-apmotel-add-synthtrace-scenarios-to-test-with-otel-data

Conversation

@jennypavlova
Copy link
Copy Markdown
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 - DEPRECATED DEPRECATED - Use Team:obs-presentation. label Sep 6, 2024
@jennypavlova jennypavlova self-assigned this Sep 6, 2024
@obltmachine
Copy link
Copy Markdown

🤖 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 a review from a team October 7, 2024 18:57
@jennypavlova jennypavlova requested a review from a team as a code owner October 7, 2024 18:57
@elasticmachine
Copy link
Copy Markdown
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 PR 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
Copy Markdown
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
Copy Markdown
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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@rmyz
Copy link
Copy Markdown
Contributor

rmyz commented Feb 18, 2025

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

rmyz pushed a commit to rmyz/kibana that referenced this pull request Feb 18, 2025
Closes [elastic#192115](elastic#192115)
Closes [elastic#192465](elastic#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:
```bash
yarn es snapshot --license trial --E "xpack.otel_data.registry.enabled=true"
```
- Run Kibana:
```bash
yarn start
```

>[!WARNING]
If the e2e PoC is used the first 2 steps should be skipped

- Run syntrace:
```bash
node scripts/synthtrace otel_simple_trace.ts --clean
```
- Check indices in DevTools for the generated data:
```bash
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)

https://github.com/user-attachments/assets/92f63610-82da-40f3-89bb-00be83c55377

---------

Co-authored-by: miriam.aparicio <miriam.aparicio@gmail.com>
(cherry picked from commit 5067f15)

# Conflicts:
#	packages/kbn-apm-synthtrace-client/index.ts
#	packages/kbn-apm-synthtrace/src/cli/scenario.ts
#	packages/kbn-apm-synthtrace/src/cli/utils/bootstrap.ts
#	packages/kbn-apm-synthtrace/src/cli/utils/start_live_data_upload.ts
#	packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts
rmyz added a commit that referenced this pull request Feb 18, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM][Otel] Add Otel client based on PoC data
(#192293)](#192293)

<!--- Backport version: 9.6.4 -->

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

<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"dzheni.pavlova@elastic.co"},"sourceCommit":{"committedDate":"2024-10-14T12:33:22Z","message":"[APM][Otel]
Add Otel client based on PoC data (#192293)\n\nCloses
[#192115](https://github.com/elastic/kibana/issues/192115)\r\nCloses
[#192465](https://github.com/elastic/kibana/issues/192465)\r\n\r\n\r\n##
Summary\r\n\r\nThis PR adds synthrace client for Otel native data and a
simple\r\nscenario. This is the first step of adding it and in the
future it will\r\ninclude more metrics and use
cases.\r\n\r\n>[!NOTE]\r\n> To run ES the command needs
\"xpack.otel_data.registry.enabled=true\"\r\nflag\r\n> `yarn es snapshot
--license trial
--E\r\n\"xpack.otel_data.registry.enabled=true\"`\r\n\r\n## Next
steps\r\n- We currently have only `service_destination` in the metrics
indices we\r\ncan include the other types in the future\r\n- After we
have all the UI changes we can add more scenarios (also using\r\nthe
opentelemetry demo data and not only the e2e PoC example)\r\n\r\n##
Testing\r\n- Run ES: \r\n```bash \r\nyarn es snapshot --license trial
--E \"xpack.otel_data.registry.enabled=true\"\r\n```\r\n- Run
Kibana:\r\n```bash \r\nyarn start\r\n```\r\n\r\n>[!WARNING]\r\nIf the
e2e PoC is used the first 2 steps should be skipped\r\n\r\n- Run
syntrace: \r\n```bash\r\nnode scripts/synthtrace otel_simple_trace.ts
--clean\r\n```\r\n- Check indices in DevTools for the generated data:
\r\n```bash \r\nGET *metrics-generic.otel*/_search\r\n\r\nGET
*traces-generic.otel*/_search\r\n\r\nGET
*logs-generic.otel*/_search\r\n```\r\n- Check in the APM UI (all the
tabs) \r\n>[!WARNING]\r\nCurrently the UI changes done in APM are not
merged so some errors
are\r\nexpected)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/92f63610-82da-40f3-89bb-00be83c55377\r\n\r\n---------\r\n\r\nCo-authored-by:
miriam.aparicio
<miriam.aparicio@gmail.com>","sha":"5067f1554cb5fc7f23442d5f9ab5d255e26a3b37","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","OpenTelemetry","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[APM][Otel]
Add Otel client based on PoC
data","number":192293,"url":"https://github.com/elastic/kibana/pull/192293","mergeCommit":{"message":"[APM][Otel]
Add Otel client based on PoC data (#192293)\n\nCloses
[#192115](https://github.com/elastic/kibana/issues/192115)\r\nCloses
[#192465](https://github.com/elastic/kibana/issues/192465)\r\n\r\n\r\n##
Summary\r\n\r\nThis PR adds synthrace client for Otel native data and a
simple\r\nscenario. This is the first step of adding it and in the
future it will\r\ninclude more metrics and use
cases.\r\n\r\n>[!NOTE]\r\n> To run ES the command needs
\"xpack.otel_data.registry.enabled=true\"\r\nflag\r\n> `yarn es snapshot
--license trial
--E\r\n\"xpack.otel_data.registry.enabled=true\"`\r\n\r\n## Next
steps\r\n- We currently have only `service_destination` in the metrics
indices we\r\ncan include the other types in the future\r\n- After we
have all the UI changes we can add more scenarios (also using\r\nthe
opentelemetry demo data and not only the e2e PoC example)\r\n\r\n##
Testing\r\n- Run ES: \r\n```bash \r\nyarn es snapshot --license trial
--E \"xpack.otel_data.registry.enabled=true\"\r\n```\r\n- Run
Kibana:\r\n```bash \r\nyarn start\r\n```\r\n\r\n>[!WARNING]\r\nIf the
e2e PoC is used the first 2 steps should be skipped\r\n\r\n- Run
syntrace: \r\n```bash\r\nnode scripts/synthtrace otel_simple_trace.ts
--clean\r\n```\r\n- Check indices in DevTools for the generated data:
\r\n```bash \r\nGET *metrics-generic.otel*/_search\r\n\r\nGET
*traces-generic.otel*/_search\r\n\r\nGET
*logs-generic.otel*/_search\r\n```\r\n- Check in the APM UI (all the
tabs) \r\n>[!WARNING]\r\nCurrently the UI changes done in APM are not
merged so some errors
are\r\nexpected)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/92f63610-82da-40f3-89bb-00be83c55377\r\n\r\n---------\r\n\r\nCo-authored-by:
miriam.aparicio
<miriam.aparicio@gmail.com>","sha":"5067f1554cb5fc7f23442d5f9ab5d255e26a3b37"}},"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/192293","number":192293,"mergeCommit":{"message":"[APM][Otel]
Add Otel client based on PoC data (#192293)\n\nCloses
[#192115](https://github.com/elastic/kibana/issues/192115)\r\nCloses
[#192465](https://github.com/elastic/kibana/issues/192465)\r\n\r\n\r\n##
Summary\r\n\r\nThis PR adds synthrace client for Otel native data and a
simple\r\nscenario. This is the first step of adding it and in the
future it will\r\ninclude more metrics and use
cases.\r\n\r\n>[!NOTE]\r\n> To run ES the command needs
\"xpack.otel_data.registry.enabled=true\"\r\nflag\r\n> `yarn es snapshot
--license trial
--E\r\n\"xpack.otel_data.registry.enabled=true\"`\r\n\r\n## Next
steps\r\n- We currently have only `service_destination` in the metrics
indices we\r\ncan include the other types in the future\r\n- After we
have all the UI changes we can add more scenarios (also using\r\nthe
opentelemetry demo data and not only the e2e PoC example)\r\n\r\n##
Testing\r\n- Run ES: \r\n```bash \r\nyarn es snapshot --license trial
--E \"xpack.otel_data.registry.enabled=true\"\r\n```\r\n- Run
Kibana:\r\n```bash \r\nyarn start\r\n```\r\n\r\n>[!WARNING]\r\nIf the
e2e PoC is used the first 2 steps should be skipped\r\n\r\n- Run
syntrace: \r\n```bash\r\nnode scripts/synthtrace otel_simple_trace.ts
--clean\r\n```\r\n- Check indices in DevTools for the generated data:
\r\n```bash \r\nGET *metrics-generic.otel*/_search\r\n\r\nGET
*traces-generic.otel*/_search\r\n\r\nGET
*logs-generic.otel*/_search\r\n```\r\n- Check in the APM UI (all the
tabs) \r\n>[!WARNING]\r\nCurrently the UI changes done in APM are not
merged so some errors
are\r\nexpected)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/92f63610-82da-40f3-89bb-00be83c55377\r\n\r\n---------\r\n\r\nCo-authored-by:
miriam.aparicio
<miriam.aparicio@gmail.com>","sha":"5067f1554cb5fc7f23442d5f9ab5d255e26a3b37"}}]}]
BACKPORT-->

Co-authored-by: jennypavlova <dzheni.pavlova@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR 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 - DEPRECATED DEPRECATED - Use Team:obs-presentation. v8.19.0 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

9 participants