[Discover][Traces] Fix processed OTel waterfall flyout#224548
[Discover][Traces] Fix processed OTel waterfall flyout#224548iblancof merged 3 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
| export const isSpanHit = (hit: DataTableRecord | null): boolean => { | ||
| return !!hit?.flattened[PARENT_ID_FIELD] && !hit?.flattened[TRANSACTION_NAME_FIELD]; | ||
| }; |
There was a problem hiding this comment.
Maybe this is a dumb question, but since unprocessed OTel data doesn't have a transaction field (afaik), will this work?
There was a problem hiding this comment.
I don't think this will work anyway with unprocessed OTEL data yet, at least looking at the code, since it is querying for transactions. I think that would be best tackled as a separate PR/step.
There was a problem hiding this comment.
Yes, the specifics for non-processed OTel data compatibility are being handled in a separate issue, but I think we’ll likely end up with something similar to what you, @Bluefinger, did in this PR, using a combination of processor.event and kind.
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15758553653 |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
cc @iblancof |
## Summary Relates to elastic#208707 While reviewing the Traces in Discover feature, we noticed a couple of issues affecting processed OTel data in the waterfall flyout: - The data wasn’t properly formatted because we were pulling it directly from `_source`, which meant the UI wasn’t receiving the processed version. Now we're using `fields` the same way it's used in Discover. - The logic used to set the flyout title (to determine whether the document was a span or a transaction) relied entirely on the presence of `parent.id`. However, since transactions can also be children of other transactions, we’ve added an extra check using `transaction.name` (spans reference the parent transaction via `transaction.id`) to ensure we're correctly identifying spans. ||Discover|Transaction|Span| |-|-|-|-| |Before|||| |After|Same than before.||| (cherry picked from commit e0a4b63)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… (#224574) # Backport This will backport the following commits from `main` to `8.19`: - [[Discover][Traces] Fix processed OTel waterfall flyout (#224548)](#224548) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Irene Blanco","email":"irene.blanco@elastic.co"},"sourceCommit":{"committedDate":"2025-06-19T13:03:56Z","message":"[Discover][Traces] Fix processed OTel waterfall flyout (#224548)\n\n## Summary\n\nRelates to https://github.com/elastic/kibana/issues/208707\n\n\nWhile reviewing the Traces in Discover feature, we noticed a couple of\nissues affecting processed OTel data in the waterfall flyout:\n\n- The data wasn’t properly formatted because we were pulling it directly\nfrom `_source`, which meant the UI wasn’t receiving the processed\nversion. Now we're using `fields` the same way it's used in Discover.\n- The logic used to set the flyout title (to determine whether the\ndocument was a span or a transaction) relied entirely on the presence of\n`parent.id`. However, since transactions can also be children of other\ntransactions, we’ve added an extra check using `transaction.name` (spans\nreference the parent transaction via `transaction.id`) to ensure we're\ncorrectly identifying spans.\n\n||Discover|Transaction|Span|\n|-|-|-|-|\n|Before||||\n|After|Same than before.|||","sha":"e0a4b63a98401971dc512e2ea370388502f12f4a","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-infra_services","backport:version","v9.1.0","v8.19.0"],"title":"[Discover][Traces] Fix processed OTel waterfall flyout","number":224548,"url":"https://github.com/elastic/kibana/pull/224548","mergeCommit":{"message":"[Discover][Traces] Fix processed OTel waterfall flyout (#224548)\n\n## Summary\n\nRelates to https://github.com/elastic/kibana/issues/208707\n\n\nWhile reviewing the Traces in Discover feature, we noticed a couple of\nissues affecting processed OTel data in the waterfall flyout:\n\n- The data wasn’t properly formatted because we were pulling it directly\nfrom `_source`, which meant the UI wasn’t receiving the processed\nversion. Now we're using `fields` the same way it's used in Discover.\n- The logic used to set the flyout title (to determine whether the\ndocument was a span or a transaction) relied entirely on the presence of\n`parent.id`. However, since transactions can also be children of other\ntransactions, we’ve added an extra check using `transaction.name` (spans\nreference the parent transaction via `transaction.id`) to ensure we're\ncorrectly identifying spans.\n\n||Discover|Transaction|Span|\n|-|-|-|-|\n|Before||||\n|After|Same than before.|||","sha":"e0a4b63a98401971dc512e2ea370388502f12f4a"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224548","number":224548,"mergeCommit":{"message":"[Discover][Traces] Fix processed OTel waterfall flyout (#224548)\n\n## Summary\n\nRelates to https://github.com/elastic/kibana/issues/208707\n\n\nWhile reviewing the Traces in Discover feature, we noticed a couple of\nissues affecting processed OTel data in the waterfall flyout:\n\n- The data wasn’t properly formatted because we were pulling it directly\nfrom `_source`, which meant the UI wasn’t receiving the processed\nversion. Now we're using `fields` the same way it's used in Discover.\n- The logic used to set the flyout title (to determine whether the\ndocument was a span or a transaction) relied entirely on the presence of\n`parent.id`. However, since transactions can also be children of other\ntransactions, we’ve added an extra check using `transaction.name` (spans\nreference the parent transaction via `transaction.id`) to ensure we're\ncorrectly identifying spans.\n\n||Discover|Transaction|Span|\n|-|-|-|-|\n|Before||||\n|After|Same than before.|||","sha":"e0a4b63a98401971dc512e2ea370388502f12f4a"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Irene Blanco <irene.blanco@elastic.co>
Summary
Relates to #208707
While reviewing the Traces in Discover feature, we noticed a couple of issues affecting processed OTel data in the waterfall flyout:
_source, which meant the UI wasn’t receiving the processed version. Now we're usingfieldsthe same way it's used in Discover.parent.id. However, since transactions can also be children of other transactions, we’ve added an extra check usingtransaction.name(spans reference the parent transaction viatransaction.id) to ensure we're correctly identifying spans.