Skip to content

[Discover][Traces] Explore trace.id from logs in Discover#249632

Merged
tfcmarques merged 15 commits intoelastic:mainfrom
tfcmarques:5115-explore-trace-id-from-logs-in-Discover
Jan 30, 2026
Merged

[Discover][Traces] Explore trace.id from logs in Discover#249632
tfcmarques merged 15 commits intoelastic:mainfrom
tfcmarques:5115-explore-trace-id-from-logs-in-Discover

Conversation

@tfcmarques
Copy link
Copy Markdown
Contributor

@tfcmarques tfcmarques commented Jan 19, 2026

Summary

  • Removes trace.id hyperlinks from log and span summaries, while keeping the trace.id field and value visible
  • Adds an Open in Discover action button in Traces to enable trace debugging

Note:
Reverted changes that made Open in Discover button open to a new tab, so demo is not accurate
We're keeping the current button behaviour for now, making it open in the current tab
Changes here: 6846f01

Demo

Screen.Recording.2026-01-20.at.14.03.57.mov

@tfcmarques tfcmarques self-assigned this Jan 19, 2026
@tfcmarques tfcmarques added the Team:obs-exploration Observability Exploration team label Jan 19, 2026
@tfcmarques tfcmarques added backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels Jan 20, 2026
@tfcmarques tfcmarques marked this pull request as ready for review January 20, 2026 14:12
@tfcmarques tfcmarques requested a review from a team as a code owner January 20, 2026 14:12
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-exploration-team (Team:obs-exploration)

@iblancof iblancof self-requested a review January 20, 2026 14:14
export type Action =
| (BaseAction & { onClick: () => void; href?: never })
| (BaseAction & { href: string; onClick?: never });
| (BaseAction & { onClick: () => void; href?: never; target?: never })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like we're not using the target for onclick, can we remove it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you're right, it's kinda redundant if href is not used, removing it 👍🏻

[fieldConstants.TRACE_ID_FIELD]: {
title: fieldLabels.TRACE_ID_LABEL,
formatter: (value: unknown, formattedValue: string) => (
<HighlightField value={value as string} formattedValue={formattedValue}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we want to keep the highlighting and only remove the link?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah that's true, I'll quickly revert that, thanks 👍🏻

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done! Friendly reminder that it doesn't change the demo, because we're using ESQL there 🙇🏻

Screenshot 2026-01-20 at 15 05 42

[TRACE_ID]: {
title: fieldLabels.TRACE_ID_LABEL,
formatter: (value: unknown, formattedValue: string) => (
<HighlightField value={value as string} formattedValue={formattedValue}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here.

dataView: DocViewRenderProps['dataView'];
}

const openInDiscoverButtonLabel = i18n.translate(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We already have an "open in discover" label here public/components/observability/traces/common/constants.ts


export const OPEN_IN_DISCOVER_LABEL_ARIAL_LABEL = i18n.translate(
'unifiedDocViewer.observability.traces.openInDiscoverArialLabel',
export const OPEN_IN_DISCOVER_ARIA_LABEL = i18n.translate(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixing typo ARIAL -> ARIA

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

@cauemarcondes
Copy link
Copy Markdown
Contributor

@tfcmarques instead of prefixing the PR title with [Deliverable] which doesn't mean much we usually add the areas involved in the PR, for example [Discover][Traces]...

@tfcmarques tfcmarques changed the title [Deliverable] Explore trace.id from logs in Discover [Discover][Traces] Explore trace.id from logs in Discover Jan 21, 2026
Copy link
Copy Markdown
Contributor

@iblancof iblancof left a comment

Choose a reason for hiding this comment

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

Code changes LGTM, thanks for driving the discussion around the indexes!
I know the button position is still pending, but leaving the approval anyway 👍🏻

@tfcmarques tfcmarques enabled auto-merge (squash) January 30, 2026 16:11
@tfcmarques tfcmarques merged commit 037abad into elastic:main Jan 30, 2026
16 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
unifiedDocViewer 793 792 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
unifiedDocViewer 381.5KB 380.7KB -852.0B

History

cc @tfcmarques

hannahbrooks pushed a commit to hannahbrooks/kibana that referenced this pull request Jan 30, 2026
…9632)

## Summary
- Removes `trace.id` hyperlinks from log and span summaries, while
keeping the `trace.id` field and value visible
- Adds an `Open in Discover` action button in Traces to enable trace
debugging

> Note:
> Reverted changes that made Open in Discover button open to a new tab,
so demo is not accurate
> We're keeping the current button behaviour for now, making it open in
the current tab
> Changes here:
elastic@6846f01

### Demo

https://github.com/user-attachments/assets/e8b144de-d478-483e-a187-e62325afda6c
mbondyra added a commit to mbondyra/kibana that referenced this pull request Feb 2, 2026
…iew_cps

* commit '32efd9b2fb078ade51073fd2d0068bc74c029d6b': (49 commits)
  [Security Solution] Rules exceptions subfeatures (elastic#245722)
  [BK] Upgrade axios (elastic#251150)
  Fix AI Connector form fields resetting to default value when cleared by user (elastic#251095)
  deduplicate otel dependencies (elastic#250841)
  Adds initial agents.md file (elastic#250833)
  [index management] Faster index list loading (elastic#246276)
  skip failing test suite (elastic#251086)
  skip failing test suite (elastic#251048)
  [Security Solutions] Trial Companion - adjust UX design (elastic#250910)
  [Traces][Discover] Prevent flyout remount when switching document types in Trace Waterfall (elastic#250406)
  [DOCS][Cases][9.4 & Serverless]: Doc new `Maximum amount of cases to open` setting for case action (elastic#250993)
  [Discover][Traces] Explore trace.id from logs in Discover (elastic#249632)
  Remove ! from SOs docs link (elastic#251097)
  [ML] Maps: Add telemetry events for file uploads (elastic#247543)
  [Fleet] Fix dupplicate ids when copying an integration policy or an agent policy (elastic#250971)
  [Dashboards as Code] Add snake case object keys util (elastic#250962)
  [Core] Remove URL Overflow & Deprecate `storeInSessionStorage` setting (elastic#242972)
  [One Workflow] fix: Fix Variable Retrieval in Workflow Execution Engine (elastic#250852)
  Rework Elastic Managed LLMs page (elastic#251069)
  [Lens powered by ES|QL] Update Switch to Query mode modal warning message (elastic#251051)
  ...
iblancof added a commit that referenced this pull request Feb 4, 2026
…cover Tab on left-click (#251103)

## Summary

Closes #241280

Now that we have Discover Tabs, all links from Discover within Discover
should open in a new tab.
This PR updates all the "Open in Discover" buttons to follow that
pattern, as decided by the product team.

- On left-click: it will open a new Discover tab.
- On right-click: users can select to 'open new tab' in their browser.



**Span/Transaction flyout**
|Section|Interaction|
|-|-|
|Similar
spans|![similar_spans_f_waterfall](https://github.com/user-attachments/assets/fa5db09d-d81a-4461-b0ff-fdb19cb4038a)|
|Trace|~TODO, pending on #249632
to be merged~![Screen Recording 2026-02-03 at 10 50
15](https://github.com/user-attachments/assets/a5c35ab1-c80b-4966-aa06-f00bd47a94c4)|

|Errors|![errors](https://github.com/user-attachments/assets/aefed9f3-5a1b-4323-aef3-0936d75322f6)|

|Logs|![logs](https://github.com/user-attachments/assets/50c36810-d409-4987-861b-aa98af8c99da)|
|Span
Links|![span_links](https://github.com/user-attachments/assets/9ec46de9-b5ad-4d35-9b68-0ce567e923ac)|

ℹ️ Updated `data-test-subj` for Span Links and Errors sections, which
were duplicated and wrong.

**Log flyout**
|Section|Interaction|
|-|-|
|Similar
errors|![similar_errors](https://github.com/user-attachments/assets/d5e8dd8a-7498-436a-b502-0910ed7a5fe1)|Section
only visible for logs with `trace.id`|

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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 release_note:skip Skip the PR/issue when compiling release notes Team:obs-exploration Observability Exploration team v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants