Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(tracing): show span events in the trace view (#111965)

posthog[bot]49e6d6ac43bc
diff --git a/posthog/hogql/database/schema/spans.py b/posthog/hogql/database/schema/spans.py
index c53002df8634..f7b2f3552103 100644
--- a/posthog/hogql/database/schema/spans.py
+++ b/posthog/hogql/database/schema/spans.py
@@ -4,6 +4,7 @@ from posthog.hogql.database.models import (
FieldOrTable,
IntegerDatabaseField,
MapStringDatabaseField,
+ StringArrayDatabaseField,
StringDatabaseField,
Table,
)
@@ -66,6 +67,26 @@ class TraceSpansTable(Table):
nullable=False,
description="Instrumentation scope (library/module) that emitted the span.",
),
+ "events": StringArrayDatabaseField(
+ name="events",
+ nullable=False,
+ description="OpenTelemetry span events. Each element is a JSON object with time_unix_nano, name and attributes.",
+ ),
+ "dropped_events_count": IntegerDatabaseField(
+ name="dropped_events_count",
+ nullable=False,
+ description="Number of span events the SDK dropped before export.",
+ ),
+ "links": StringArrayDatabaseField(
+ name="links",
+ nullable=False,
+ description="OpenTelemetry span links to other spans. Each element is a JSON object with trace_id, span_id and attributes.",
+ ),
+ "dropped_links_count": IntegerDatabaseField(
+ name="dropped_links_count",
+ nullable=False,
+ description="Number of span links the SDK dropped before export.",
+ ),
"time_bucket": DateTimeDatabaseField(
name="time_bucket", nullable=False, description="Coarse time bucket used for partitioning and filtering."
),
diff --git a/products/tracing/backend/logic.py b/products/tracing/backend/logic.py
index e487b63e22a6..f139fcba043f 100644
--- a/products/tracing/backend/logic.py
+++ b/products/tracing/backend/logic.py
@@ -250,6 +250,56 @@ def with_span_attribute_type_suffix(prop: SpanPropertyFilter) -> SpanPropertyFil
return prop
+def _decode_span_event_attribute(value: object) -> str:
+ """capture-logs JSON-encodes each event attribute value, so a string arrives with its quotes. Unwrap JSON strings only."""
+ text = str(value)
+ if len(text) >= 2 and text.startswith('"') and text.endswith('"'):
+ try:
+ decoded = json.loads(text)
+ except ValueError:
+ return text
+ if isinstance(decoded, str):
+ return decoded
+ return text
+
+
+def parse_span_events(raw_events: list[str]) -> list[dict]:
+ """Decode the JSON span events that capture-logs writes, earliest first. Skip elements that are not JSON objects."""
+ parsed: list[tuple[int, dict]] = []
+ for raw in raw_events:
+ try:
+ event = json.loads(raw)
+ except (TypeError, ValueError):
+ continue
+ if not isinstance(event, dict):
+ continue
+ time_unix_nano = event.get("time_unix_nano")
+ if not isinstance(time_unix_nano, int) or time_unix_nano < 0:
+ time_unix_nano = 0
+ attributes = event.get("attributes")
+ timestamp = None
+ # OpenTelemetry uses 0 for an unknown event time.
+ if time_unix_nano > 0:
+ seconds, nanos = divmod(time_unix_nano, 1_000_000_000)
+ timestamp = dt.datetime.fromtimestamp(seconds, tz=ZoneInfo("UTC")) + dt.timedelta(
+ microseconds=nanos // 1000
+ )
+ parsed.append(
+ (
+ time_unix_nano,
+ {
+ "name": str(event.get("name") or ""),
+ "timestamp": timestamp,
+ "attributes": {str(k): _decode_span_event_attribute(v) for k, v in attributes.items()}
+ if isinstance(attributes, dict)
+ else {},
+ },
+ )
+ )
+ parsed.sort(key=lambda item: item[0])
+ return [event for _, event in parsed]
+
+
class TraceSpansQueryRunnerMixin(QueryRunner):
"""Shared WHERE clause and settings for all trace span query runners."""
@@ -530,6 +580,8 @@ class TraceSpansQueryRunner(TraceSpansQueryRunnerMixin, AnalyticsQueryRunner[Tra
# the slowest/fastest sorts. Falls back to this row's own duration.
"trace_duration": result[16] if result[16] is not None else result[10],
}
+ if self._include_events:
+ row["events"] = parse_span_events(result[17])
results.append(row)
return TraceSpansQueryResponse(results=results, **self.paginator.response_params())
@@ -539,6 +591,15 @@ class TraceSpansQueryRunner(TraceSpansQueryRunnerMixin, AnalyticsQueryRunner[Tra
assert isinstance(response, TraceSpansQueryResponse | CachedTraceSpansQueryResponse)
return response
+ @property
+ def _include_events(self) -> bool:
+ """Only the single-trace view reads span events. The column is large, so list queries skip it."""
+ return bool(self.query.traceId) and not self.query.excludeAttributes
+
+ def _events_column(self) -> ast.Expr:
+ # Select an empty array when skipped, so the positional result mapping stays stable.
+ return parse_expr("events" if self._include_events else "[] AS events")
+
@property
def _by_duration(self) -> bool:
"""Ordering by duration paginates via offset; ordering by timestamp via the time keyset."""
@@ -734,7 +795,8 @@ class TraceSpansQueryRunner(TraceSpansQueryRunnerMixin, AnalyticsQueryRunner[Tra
min(if({where_for_start}, timestamp, NULL)) OVER (PARTITION BY trace_id) as trace_start,
{attributes},
{resource_attributes},
- max(if({where_for_start}, duration_nano, NULL)) OVER (PARTITION BY trace_id) as trace_duration
+ max(if({where_for_start}, duration_nano, NULL)) OVER (PARTITION BY trace_id) as trace_duration,
+ {events}
FROM posthog.trace_spans
WHERE {filters} AND {trace_filter} LIMIT {limit}
""",
@@ -752,6 +814,7 @@ class TraceSpansQueryRunner(TraceSpansQueryRunnerMixin, AnalyticsQueryRunner[Tra
"resource_attributes": parse_expr(
"map() AS resource_attributes" if self.query.excludeAttributes else "resource_attributes"
),
+ "events": self._events_column(),
},
)
assert isinstance(query, ast.SelectQuery)
@@ -970,7 +1033,8 @@ class TraceSpansQueryRunner(TraceSpansQueryRunnerMixin, AnalyticsQueryRunner[Tra
timestamp as trace_start,
{attributes},
{resource_attributes},
- duration_nano as trace_duration
+ duration_nano as trace_duration,
+ {events}
FROM posthog.trace_spans
WHERE {where}
""",
@@ -980,6 +1044,7 @@ class TraceSpansQueryRunner(TraceSpansQueryRunnerMixin, AnalyticsQueryRunner[Tra
"resource_attributes": parse_expr(
"map() AS resource_attributes" if self.query.excludeAttributes else "resource_attributes"
),
+ "events": self._events_column(),
},
)
assert isinstance(query, ast.SelectQuery)
diff --git a/products/tracing/backend/presentation/views.py b/products/tracing/backend/presentation/views.py
index 8f8deee53da6..38cc7afdeef7 100644
--- a/products/tracing/backend/presentation/views.py
+++ b/products/tracing/backend/presentation/views.py
@@ -382,7 +382,7 @@ class _TracingTraceRequestSerializer(serializers.Serializer):
excludeAttributes = serializers.BooleanField(
required=False,
default=False,
- help_text="Omit the per-span attributes and resource attributes maps from results to keep payloads compact. Defaults to false.",
+ help_text="Omit the per-span attributes, resource attributes and events from results to keep payloads compact. Defaults to false.",
)
offset = serializers.IntegerField(
required=False,
@@ -837,12 +837,28 @@ class _SpanSerializer(serializers.Serializer):
)
+class _SpanEventSerializer(serializers.Serializer):
+ name = serializers.CharField(help_text="Event name, for example `exception`.")
+ timestamp = serializers.DateTimeField(
+ allow_null=True, help_text="When the event occurred. Null when the SDK did not set a time."
+ )
+ attributes = serializers.DictField(
+ child=serializers.CharField(),
+ help_text="Event attributes. Keys are whatever the instrumentation set.",
+ )
+
+
class _TraceSpanSerializer(_SpanSerializer):
- """A span in a single trace. The trace action adds self time, which the list does not compute."""
+ """A span in a single trace. The trace action adds self time and span events, which the list does not return."""
self_time_nano = serializers.FloatField(
help_text="Span duration minus the time spent in its children, in nanoseconds."
)
+ events = _SpanEventSerializer(
+ many=True,
+ required=False,
+ help_text="OpenTelemetry span events, earliest first. Omitted when `excludeAttributes` is true.",
+ )
class _TracingQueryResponseSerializer(serializers.Serializer):
diff --git a/products/tracing/backend/tests/test_exclude_attributes.py b/products/tracing/backend/tests/test_exclude_attributes.py
index 80cb94e71107..0bb02ac552f1 100644
--- a/products/tracing/backend/tests/test_exclude_attributes.py
+++ b/products/tracing/backend/tests/test_exclude_attributes.py
@@ -1,3 +1,4 @@
+import json
import base64
import datetime as dt
@@ -43,14 +44,31 @@ class TestExcludeAttributes(ClickhouseTestMixin, APIBaseTest):
# `attributes` is an ALIAS over attributes_map_str whose keys carry a `__str` type suffix
# that left(k, -5) strips — so 'http.method__str' surfaces as 'http.method'.
# `resource_attributes` is a physical column, inserted as-is.
+ # capture-logs JSON-encodes each event attribute value, then encodes the whole event.
+ events = [
+ json.dumps(
+ {
+ "time_unix_nano": 1780387200002000000,
+ "name": "exception",
+ "attributes": {
+ "exception.type": json.dumps("ValueError"),
+ "exception.stacktrace": json.dumps('line 1\n raise ValueError("bad")'),
+ "exception.escaped": json.dumps(False),
+ },
+ }
+ ),
+ json.dumps({"time_unix_nano": 1780387200001000000, "name": "cache.miss", "attributes": {}}),
+ "not json",
+ ]
sync_execute(
"INSERT INTO trace_spans (uuid, team_id, trace_id, span_id, parent_span_id, name, kind, "
"timestamp, end_time, observed_timestamp, status_code, service_name, attributes_map_str, "
- "resource_attributes) VALUES "
+ "resource_attributes, events) VALUES "
"("
f"'019e8754-0000-0000-0000-000000000001', {cls.team.id}, '{_b64((1).to_bytes(16, 'big'))}', "
f"'{_b64((1).to_bytes(8, 'big'))}', '', 'GET /api', 2, '{ts_str}', '{end_str}', '{ts_str}', 0, 'web', "
- "map('http.method__str', 'POST'), map('service.version', '1.2.3', 'host.name', 'web-1'))"
+ "map('http.method__str', 'POST'), map('service.version', '1.2.3', 'host.name', 'web-1'), %(events)s)",
+ {"events": events},
)
@classmethod
@@ -61,12 +79,13 @@ class TestExcludeAttributes(ClickhouseTestMixin, APIBaseTest):
sync_execute(TRACE_SPANS_DISTRIBUTED_TABLE_SQL())
super().tearDownClass()
- def _run(self, *, exclude: bool) -> list[dict]:
+ def _run(self, *, exclude: bool, single_trace: bool = False) -> list[dict]:
query = TraceSpansQuery(
dateRange=DateRange(date_from=DATE_FROM, date_to=DATE_TO),
orderBy="timestamp",
limit=100,
excludeAttributes=exclude,
+ traceId=(1).to_bytes(16, "big").hex() if single_trace else None,
)
return TraceSpansQueryRunner(query, self.team).run().results
@@ -83,5 +102,36 @@ class TestExcludeAttributes(ClickhouseTestMixin, APIBaseTest):
self.assertEqual(results[0]["attributes"], expected_attributes)
self.assertEqual(results[0]["resource_attributes"], expected_resource_attributes)
# Guards the positional-index shift from adding the resource column: the per-trace duration
- # key (the last SELECT column) must still land on the right value.
+ # key must still land on the right value.
self.assertEqual(results[0]["trace_duration"], 5_000_000)
+
+ @parameterized.expand(
+ [
+ ("list_query_skips_events", False, False, None),
+ ("excluded_from_single_trace", True, True, None),
+ (
+ "single_trace_returns_events_earliest_first",
+ True,
+ False,
+ [
+ {
+ "name": "cache.miss",
+ "timestamp": dt.datetime(2026, 6, 2, 8, 0, 0, 1000, tzinfo=dt.UTC),
+ "attributes": {},
+ },
+ {
+ "name": "exception",
+ "timestamp": dt.datetime(2026, 6, 2, 8, 0, 0, 2000, tzinfo=dt.UTC),
+ "attributes": {
+ "exception.type": "ValueError",
+ "exception.stacktrace": 'line 1\n raise ValueError("bad")',
+ "exception.escaped": "false",
+ },
+ },
+ ],
+ ),
+ ]
+ )
+ def test_events(self, _name, single_trace, exclude, expected_events):
+ results = self._run(exclude=exclude, single_trace=single_trace)
+ self.assertEqual(results[0].get("events"), expected_events)
diff --git a/products/tracing/frontend/components/VirtualizedSpanList/ExpandedSpanContent.tsx b/products/tracing/frontend/components/VirtualizedSpanList/ExpandedSpanContent.tsx
index eab0d0f7dc43..1a705f5583f1 100644
--- a/products/tracing/frontend/components/VirtualizedSpanList/ExpandedSpanContent.tsx
+++ b/products/tracing/frontend/components/VirtualizedSpanList/ExpandedSpanContent.tsx
@@ -5,6 +5,7 @@ import { formatDuration } from '../../TraceWaterfallView'
import { SPAN_KIND_LABELS, STATUS_CODE_LABELS } from '../../types'
import type { Span } from '../../types'
import { SpanAttributes } from './SpanAttributes'
+import { SpanEvents } from './SpanEvents'
export interface ExpandedSpanContentProps {
span: Span
@@ -62,6 +63,9 @@ export function ExpandedSpanContent({
propertyType={PropertyFilterType.SpanResourceAttribute}
/>
)}
+ {span.events && span.events.length > 0 && (
+ <SpanEvents events={span.events} spanTimestamp={span.timestamp} />
+ )}
{showDetails && <SpanAttributes title="Span details" attributes={details} showFilterActions={false} />}
</div>
)
diff --git a/products/tracing/frontend/components/VirtualizedSpanList/SpanAttributes.tsx b/products/tracing/frontend/components/VirtualizedSpanList/SpanAttributes.tsx
index 3aa8423de9ba..55d41693aa0c 100644
--- a/products/tracing/frontend/components/VirtualizedSpanList/SpanAttributes.tsx
+++ b/products/tracing/frontend/components/VirtualizedSpanList/SpanAttributes.tsx
@@ -2,7 +2,7 @@ import { useActions, useValues } from 'kea'
import { useEffect, useMemo, useRef, useState } from 'react'
import { IconCheck, IconColumns, IconMinusSquare, IconPlusSquare } from '@posthog/icons'
-import { LemonButton, LemonTable } from '@posthog/lemon-ui'
+import { LemonButton, LemonTable, Tooltip } from '@posthog/lemon-ui'
import { CopyToClipboardInline } from 'lib/components/CopyToClipboard'
import ViewRecordingButton, {
@@ -38,6 +38,9 @@ type FilterDirection = 'include' | 'exclude'
export interface SpanAttributesProps {
attributes: Record<string, string>
title: string
+ /** Shown after the title in normal case, for example an event's offset from the span start. */
+ subtitle?: string
+ subtitleTooltip?: string
emptyLabel?: string
/** @default true */
showFilterActions?: boolean
@@ -64,6 +67,8 @@ function ToggleColumnButton({ isColumn, onToggle }: { isColumn: boolean; onToggl
export function SpanAttributes({
attributes,
title,
+ subtitle,
+ subtitleTooltip,
emptyLabel = 'No attributes',
showFilterActions = true,
propertyType,
@@ -208,8 +213,13 @@ export function SpanAttributes({
return (
<div className="bg-primary overflow-hidden rounded border border-border">
- <div className="px-3 py-2 bg-bg-light border-b border-border">
+ <div className="px-3 py-2 bg-bg-light border-b border-border flex flex-wrap items-baseline gap-x-2">
<span className="text-xs font-semibold text-muted uppercase">{title}</span>
+ {subtitle && (
+ <Tooltip title={subtitleTooltip}>
+ <span className="text-xs font-mono text-muted">{subtitle}</span>
+ </Tooltip>
+ )}
</div>
{rows.length === 0 ? (
<div className="px-3 py-2 text-xs text-muted italic">{emptyLabel}</div>
diff --git a/products/tracing/frontend/components/VirtualizedSpanList/SpanEvents.tsx b/products/tracing/frontend/components/VirtualizedSpanList/SpanEvents.tsx
new file mode 100644
index 000000000000..8e54e993d61f
--- /dev/null
+++ b/products/tracing/frontend/components/VirtualizedSpanList/SpanEvents.tsx
@@ -0,0 +1,36 @@
+import type { _SpanEventApi } from 'products/tracing/frontend/generated/api.schemas'
+
+import { parseTimestampUs } from '../../spanTree'
+import { formatDuration } from '../../TraceWaterfallView'
+import { SpanAttributes } from './SpanAttributes'
+
+export interface SpanEventsProps {
+ events: _SpanEventApi[]
+ /** Span start time. Each event shows its offset from this time. */
+ spanTimestamp: string
+}
+
+function formatOffset(offsetUs: number): string {
+ return `${offsetUs < 0 ? '-' : '+'}${formatDuration(Math.abs(offsetUs) * 1_000)}`
+}
+
+export function SpanEvents({ events, spanTimestamp }: SpanEventsProps): JSX.Element {
+ const spanStartUs = parseTimestampUs(spanTimestamp)
+ return (
+ <>
+ {events.map((event, index) => (
+ <SpanAttributes
+ key={index}
+ title={`Event: ${event.name || 'unnamed'}`}
+ subtitle={
+ event.timestamp ? formatOffset(parseTimestampUs(event.timestamp) - spanStartUs) : undefined
+ }
+ subtitleTooltip={event.timestamp ?? undefined}
+ attributes={event.attributes}
+ emptyLabel="No attributes on this event"
+ showFilterActions={false}
+ />
+ ))}
+ </>
+ )
+}
diff --git a/products/tracing/frontend/generated/api.schemas.ts b/products/tracing/frontend/generated/api.schemas.ts
index 3923e3a14a74..9056085cfc5b 100644
--- a/products/tracing/frontend/generated/api.schemas.ts
+++ b/products/tracing/frontend/generated/api.schemas.ts
@@ -1152,7 +1152,7 @@ export interface _SymbolStatsResponseApi {
export interface _TracingTraceRequestApi {
/** Date range for the query. Omit it to search all retained spans for this trace. */
dateRange?: _TracingDateRangeApi
- /** Omit the per-span attributes and resource attributes maps from results to keep payloads compact. Defaults to false. */
+ /** Omit the per-span attributes, resource attributes and events from results to keep payloads compact. Defaults to false. */
excludeAttributes?: boolean
/**
* Pagination offset into the trace's spans (ordered by start time ascending). Each page returns up to 2000 spans; pass the response's `nextOffset` to load the next page. Defaults to 0.
@@ -1161,6 +1161,23 @@ export interface _TracingTraceRequestApi {
offset?: number
}
+/**
+ * Event attributes. Keys are whatever the instrumentation set.
+ */
+export type _SpanEventApiAttributes = { [key: string]: string }
+
+export interface _SpanEventApi {
+ /** Event name, for example `exception`. */
+ name: string
+ /**
+ * When the event occurred. Null when the SDK did not set a time.
+ * @nullable
+ */
+ timestamp: string | null
+ /** Event attributes. Keys are whatever the instrumentation set. */
+ attributes: _SpanEventApiAttributes
+}
+
/**
* Span attributes. Keys are whatever the instrumentation set.
*/
@@ -1172,7 +1189,7 @@ export type _TraceSpanApiAttributes = { [key: string]: string }
export type _TraceSpanApiResourceAttributes = { [key: string]: string }
/**
- * A span in a single trace. The trace action adds self time, which the list does not compute.
+ * A span in a single trace. The trace action adds self time and span events, which the list does not return.
*/
export interface _TraceSpanApi {
/** Span's own UUID. */
@@ -1211,6 +1228,8 @@ export interface _TraceSpanApi {
resource_attributes: _TraceSpanApiResourceAttributes
/** Span duration minus the time spent in its children, in nanoseconds. */
self_time_nano: number
+ /** OpenTelemetry span events, earliest first. Omitted when `excludeAttributes` is true. */
+ events?: _SpanEventApi[]
}
export interface _TracingTraceResponseApi {
diff --git a/products/tracing/frontend/generated/api.zod.ts b/products/tracing/frontend/generated/api.zod.ts
index 1496c8b1913a..d9d9f739e46c 100644
--- a/products/tracing/frontend/generated/api.zod.ts
+++ b/products/tracing/frontend/generated/api.zod.ts
@@ -1272,7 +1272,7 @@ export const TracingSpansTraceCreateBody = /* @__PURE__ */ zod.object({
.boolean()
.default(tracingSpansTraceCreateBodyExcludeAttributesDefault)
.describe(
- 'Omit the per-span attributes and resource attributes maps from results to keep payloads compact. Defaults to false.'
+ 'Omit the per-span attributes, resource attributes and events from results to keep payloads compact. Defaults to false.'
),
offset: zod
.number()
diff --git a/products/tracing/frontend/types.ts b/products/tracing/frontend/types.ts
index fde94d3dfbb1..ad909dcf3670 100644
--- a/products/tracing/frontend/types.ts
+++ b/products/tracing/frontend/types.ts
@@ -1,3 +1,5 @@
+import type { _SpanEventApi } from './generated/api.schemas'
+
export interface Span {
uuid: string
trace_id: string
@@ -16,6 +18,8 @@ export interface Span {
attributes: Record<string, string>
// OTel resource attributes (who/what emitted the span: service.version, host, k8s, ...).
resource_attributes: Record<string, string>
+ // OTel span events, earliest first. Only the single-trace endpoint returns them.
+ events?: _SpanEventApi[]
trace_start?: string
trace_duration?: number
// Set on a span shown in place of a root span that was not found.
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index c56ac24e72b3..3586dccbdcb9 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -125178,6 +125178,23 @@ export namespace Schemas {
resource_attributes: _SpanResourceAttributes;
}
+ /**
+ * Event attributes. Keys are whatever the instrumentation set.
+ */
+ export type _SpanEventAttributes = {[key: string]: string};
+
+ export interface _SpanEvent {
+ /** Event name, for example `exception`. */
+ name: string;
+ /**
+ * When the event occurred. Null when the SDK did not set a time.
+ * @nullable
+ */
+ timestamp: string | null;
+ /** Event attributes. Keys are whatever the instrumentation set. */
+ attributes: _SpanEventAttributes;
+ }
+
/**
* * `exact` - exact
* * `is_not` - is_not
@@ -125422,7 +125439,7 @@ export namespace Schemas {
export type _TraceSpanResourceAttributes = {[key: string]: string};
/**
- * A span in a single trace. The trace action adds self time, which the list does not compute.
+ * A span in a single trace. The trace action adds self time and span events, which the list does not return.
*/
export interface _TraceSpan {
/** Span's own UUID. */
@@ -125461,6 +125478,8 @@ export namespace Schemas {
resource_attributes: _TraceSpanResourceAttributes;
/** Span duration minus the time spent in its children, in nanoseconds. */
self_time_nano: number;
+ /** OpenTelemetry span events, earliest first. Omitted when `excludeAttributes` is true. */
+ events?: _SpanEvent[];
}
export interface _TracingAggregationQueryBody {
@@ -125952,7 +125971,7 @@ export namespace Schemas {
export interface _TracingTraceRequest {
/** Date range for the query. Omit it to search all retained spans for this trace. */
dateRange?: _TracingDateRange;
- /** Omit the per-span attributes and resource attributes maps from results to keep payloads compact. Defaults to false. */
+ /** Omit the per-span attributes, resource attributes and events from results to keep payloads compact. Defaults to false. */
excludeAttributes?: boolean;
/**
* Pagination offset into the trace's spans (ordered by start time ascending). Each page returns up to 2000 spans; pass the response's `nextOffset` to load the next page. Defaults to 0.
diff --git a/services/mcp/src/generated/tracing/api.ts b/services/mcp/src/generated/tracing/api.ts
index 65616b6f3475..73ba61a02e02 100644
--- a/services/mcp/src/generated/tracing/api.ts
+++ b/services/mcp/src/generated/tracing/api.ts
@@ -1031,7 +1031,7 @@ export const TracingSpansTraceCreateBody = () => zod.object({
.boolean()
.default(tracingSpansTraceCreateBodyExcludeAttributesDefault)
.describe(
- 'Omit the per-span attributes and resource attributes maps from results to keep payloads compact. Defaults to false.'
+ 'Omit the per-span attributes, resource attributes and events from results to keep payloads compact. Defaults to false.'
),
offset: zod
.number()
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/apm-trace-get.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/apm-trace-get.json
index 11f28b332e40..2955d0635742 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/apm-trace-get.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/apm-trace-get.json
@@ -31,7 +31,7 @@
},
"excludeAttributes": {
"default": false,
- "description": "Omit the per-span attributes and resource attributes maps from results to keep payloads compact. Defaults to false.",
+ "description": "Omit the per-span attributes, resource attributes and events from results to keep payloads compact. Defaults to false.",
"type": "boolean"
},
"offset": {