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
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