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] Ensure Errors views works with OTel Data #9

Conversation

rmyz
Copy link

@rmyz rmyz commented Oct 4, 2024

Summary

Closes elastic#192336

Kapture.2024-10-04.at.15.52.06.mp4

How to test

  1. Make sure to use https://github.com/elastic/otel-apm-e2e-poc and running with opentelemetry-demo data https://github.com/elastic/otel-apm-e2e-poc
  2. Change the indices in Settings to only use *otel* indices.
  3. Inside APM, search for error.exception.handled:true to see failing services
  4. Deep dive into Errors and explore everything is working fine

@rmyz rmyz changed the base branch from main to 192606-poc-otel-data-with-apm-ui-replacing-_source-with-fields October 4, 2024 11:23
@rmyz rmyz marked this pull request as ready for review October 4, 2024 14:03
@rmyz
Copy link
Author

rmyz commented Oct 4, 2024

/ci

@rmyz rmyz changed the title [APM][OTel] Make Errors tab work with OTel Data [APM][OTel] Ensure Errors tab work with OTel Data Oct 4, 2024
@rmyz rmyz changed the title [APM][OTel] Ensure Errors tab work with OTel Data [APM][OTel] Ensure Errors views work with OTel Data Oct 4, 2024
@rmyz rmyz changed the title [APM][OTel] Ensure Errors views work with OTel Data [APM][OTel] Ensure Errors views works with OTel Data Oct 4, 2024
@@ -66,16 +67,18 @@ export async function getErrorGroupSampleIds({
should: [{ term: { [TRANSACTION_SAMPLED]: true } }], // prefer error samples with related transactions
},
},
_source: [ERROR_ID, 'transaction'],
fields: [ERROR_ID],

Choose a reason for hiding this comment

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

If I'm not mistaken, the 'transaction' was added for the scoring, so I think the field TRANSACTION_SAMPLED, should we also added not sure why just 'transaction' was in this case
@dgieselaar can you confirm?

Copy link

@miloszmarcinkowski miloszmarcinkowski left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Comment on lines 169 to 172
culprit: normalizedFields?.error?.culprit,
handled: normalizedFields?.error?.exception[0]?.handled,
type: normalizedFields?.error?.exception[0]?.type,
traceId: normalizedFields?.trace?.id,

Choose a reason for hiding this comment

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

nit: Optional chaining is only needed for normalizedFields. If the object is not undefined, then the rest is defined

Suggested change
culprit: normalizedFields?.error?.culprit,
handled: normalizedFields?.error?.exception[0]?.handled,
type: normalizedFields?.error?.exception[0]?.type,
traceId: normalizedFields?.trace?.id,
culprit: normalizedFields?.error.culprit,
handled: normalizedFields?.error.exception[0].handled,
type: normalizedFields?.error.exception[0].type,
traceId: normalizedFields?.trace.id,

@rmyz
Copy link
Author

rmyz commented Oct 7, 2024

This work will be merged on elastic#195242

@rmyz rmyz closed this Oct 7, 2024
jennypavlova pushed a commit that referenced this pull request Jan 16, 2025
## Summary

Extracted from elastic#206411
[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be)
[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924)
Jest Tests #9 / Overview renders correctly when there is no user data
view
This simplifies overview.tsx by refactoring to rtl and removing the
whole snapshot. The snapshot was not useful and the test is still making
sure that the intended component is still rendered. By removing enzyme,
the test now works properly for both react 17 and 18.
jennypavlova pushed a commit that referenced this pull request Jan 21, 2025
…lastic#206916)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[React@18] Refactor overview.tsx test to rtl
(elastic#206805)](elastic#206805)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-16T09:57:55Z","message":"[React@18]
Refactor overview.tsx test to rtl (elastic#206805)\n\n##
Summary\r\n\r\nExtracted from
https://github.com/elastic/kibana/pull/206411\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924)\r\nJest
Tests #9 / Overview renders correctly when there is no user
data\r\nview\r\nThis simplifies overview.tsx by refactoring to rtl and
removing the\r\nwhole snapshot. The snapshot was not useful and the test
is still making\r\nsure that the intended component is still rendered.
By removing enzyme,\r\nthe test now works properly for both react 17 and
18.","sha":"bdcad52cd8d1569590107a43e3bea7cf25164af9","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor","React@18"],"title":"[React@18]
Refactor overview.tsx test to
rtl","number":206805,"url":"https://github.com/elastic/kibana/pull/206805","mergeCommit":{"message":"[React@18]
Refactor overview.tsx test to rtl (elastic#206805)\n\n##
Summary\r\n\r\nExtracted from
https://github.com/elastic/kibana/pull/206411\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924)\r\nJest
Tests #9 / Overview renders correctly when there is no user
data\r\nview\r\nThis simplifies overview.tsx by refactoring to rtl and
removing the\r\nwhole snapshot. The snapshot was not useful and the test
is still making\r\nsure that the intended component is still rendered.
By removing enzyme,\r\nthe test now works properly for both react 17 and
18.","sha":"bdcad52cd8d1569590107a43e3bea7cf25164af9"}},"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/206805","number":206805,"mergeCommit":{"message":"[React@18]
Refactor overview.tsx test to rtl (elastic#206805)\n\n##
Summary\r\n\r\nExtracted from
https://github.com/elastic/kibana/pull/206411\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/267344#019469ff-7fb9-4c5d-8569-2e445aab27be)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/267344/jobs/019469ff-7fb9-4c5d-8569-2e445aab27be/artifacts/01946a1c-62fa-4d30-8863-1b40f8c0b924)\r\nJest
Tests #9 / Overview renders correctly when there is no user
data\r\nview\r\nThis simplifies overview.tsx by refactoring to rtl and
removing the\r\nwhole snapshot. The snapshot was not useful and the test
is still making\r\nsure that the intended component is still rendered.
By removing enzyme,\r\nthe test now works properly for both react 17 and
18.","sha":"bdcad52cd8d1569590107a43e3bea7cf25164af9"}}]}] BACKPORT-->

Co-authored-by: Anton Dosov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM][Otel] Ensure Errors views works with OTel data
3 participants