Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-docs

Configure a custom OpenTelemetry collector changedoffice-agents/opentelemetry

Nearest release: v2.1.301, published under an hour before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 15 Oct 2026 14:57 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 15 Oct 2026 15:07 UTC.

Upstream edited
Recorded here
Lines+63added
Lines−18removed
From line 18 where the diff opens
First seen 25 Aug 2026 this site's first read of the page
Recorded edits4to this page, all time

The whole hunk

from line 18, old and new numbered
/
lines
from line 18
1818each model call, each tool execution, file uploads, and context
1919compaction.
2020 
21All span attributes are included. They carry user-generated content:
21For the setups described under [Set up the collector](#set-up-the-collector),
22all span attributes are included. They carry user-generated content:
2223prompt text, tool inputs and outputs, and document URLs. The allowlist
2324filter that strips sensitive attributes on the Anthropic path does not
2425run on this path. One normalization still applies: MCP connector tool
2526names are recorded as the literal `mcp_tool` rather than the
26connector-specific name. Assistant response text is not included in
27span data. Your organization owns the collected data; treat the
27connector-specific name. For these setups, assistant response text is
28not included. Your organization owns the collected data; treat the
2829endpoint as containing prompt and document content when you scope
2930access controls and retention.
3031 
32When the collector is instead delivered by an administrator-managed
33settings document, such as the one Claude for Government delivers, the
34add-in follows that document: it includes only the content categories
35the administrator selected, sends one log record per prompt, model call,
36and tool call to `{your_url}/v1/logs`, and sends the spans only while
37the administrator has turned traces on.
38 
39One of those categories is Claude's responses: when selected, the reply
40is recorded as `response` on each model call's span and sent as its own
41log record, `office_agent.assistant_response`. Each turn's spans and log
42records also name the signed-in member as `user.email` and
43`user.account_uuid`, and with a Claude for Government sign-in the
44organization as `organization.id`, except a model call Claude makes while
45running a tool, which is reported with the model and token counts only.
46 
47The add-in sends these log records to such a collector:
48 
49| Log record | Sent for |
50| - | - |
51| `office_agent.user_prompt` | Each prompt |
52| `office_agent.api_request` | Each model call that completes |
53| `office_agent.api_error` | Each model call that is refused, fails, is cut off, or that the user stops |
54| `office_agent.assistant_response` | Each completed model call whose reply contains text, when the Claude's responses category is selected |
55| `office_agent.tool_result` | Each tool call |
56 
57Auxiliary model calls the add-in makes for itself, such as context
58compaction (the `agent.compaction` span), the short progress headline
59shown while Claude works, and connection checks, yield no log record.
60 
61Every record except `office_agent.assistant_response` carries
62`event.name`, `duration_ms`, and the attributes of the span it reports,
63as listed in the [span reference](#span-reference), minus tool output
64and the reply text. `office_agent.assistant_response` carries
65`event.name`, the reply as `response` and `response_chars`, `model`,
66`request_id`, and the same surface, session, member, and organization
67attributes as its model call.
68 
3169Metrics are not sent to custom collectors. The `office_agent.*` counter
3270namespace routes to Anthropic only. Every counter increment is also
3371recorded as a span event on the active span, so the same signals are
3472recoverable from the trace stream.
3573 
36Telemetry is sent over OTLP/HTTP to `{your_url}/v1/traces`. gRPC is not
37supported because of Office WebView constraints.
74Telemetry is sent over OTLP/HTTP to `{your_url}/v1/traces`, and the log
75records above to `{your_url}/v1/logs`. gRPC is not supported because of
76Office WebView constraints.
3877 
3978## Endpoint requirements
4079 
from line 153
114153 
115154### Attribute size cap
116155 
117Prompt, tool-input, and tool-output attributes are truncated in the
118add-in at 4,000 characters each by default and marked with a trailing
119`…[truncated]`. Set the `otlp_attr_max_chars` configuration key to a
156Prompt, reply, tool-input, and tool-output attributes are truncated in
157the add-in at 4,000 characters each by default and marked with a
158trailing `…[truncated]`. Set the `otlp_attr_max_chars` configuration key to a
120159positive integer to change the cap. Values are clamped to between 256
121160and 32,000. Before raising the cap, confirm your collector and tracing
122161backend accept attribute values of the configured size: many backends
from line 181
142181Each user turn produces up to five span types. `agent.query` is the
143182root; `agent.stream` and `agent.compaction` are its children;
144183`agent.tool_execution` is a child of `agent.stream`; `file.upload`
145arrives as a separate root span. The `agent.query` and
146`agent.compaction` spans carry `agent.surface` (`sheet`, `doc`,
147`slide`, or `mail`) and `agent.vendor` (`m` for Microsoft); the other
148three do not. To filter those by surface, join `agent.stream` and
149`agent.tool_execution` to their parent `agent.query` by trace ID, and
150correlate `file.upload` to a turn by `session.id` and timestamp, since
151it has its own trace ID and no surface attribute. Attributes marked
184arrives as a separate root span. The four `agent.*` spans each carry
185`agent.surface` (`sheet`, `doc`, `slide`, or `mail`), `agent.vendor`
186(`m` for Microsoft), and `session.id`, and with Claude sign-in
187`user.email`, `user.account_uuid`, and `organization.id`, so each
188can be filtered on its own. `file.upload` carries `session.id` and, with
189Claude sign-in, `user.email`; correlate it to a turn by `session.id` and
190timestamp, since it has its own trace ID. Attributes marked
152191*content* carry user-generated data. Attributes marked *Claude sign-in
153192only* are populated only when users sign in with a Claude account.
193Attributes marked *managed settings document only* are sent only to a
194collector delivered by an administrator-managed settings document, and
195only when the administrator selected the attribute's category, as
196described under [What the collector receives](#what-the-collector-receives).
154197 
155198### Resource attributes
156199 
from line 247
204247| `cache_creation_tokens` | Tokens written to prompt cache |
205248| `stop_reason` | `end_turn`, `tool_use`, `max_tokens`, and similar |
206249| `request_id` | Provider request ID for support correlation |
250| `response` *content, managed settings document only* | Text of Claude's reply (its text blocks), truncated per the attribute cap |
251| `response_chars` *managed settings document only* | Full reply length in characters, sent with `response` |
252| `error.name` | On failure, the exception class name (`APIUserAbortError` when the user stops the call; `Aborted` when the add-in abandons the call to retry it or because the conversation was reset) |
207253 
208254The add-in requests prompt caching on every call. Cache token attributes
209255are set from the provider's response and omitted when the provider does
from line 281
235281 
236282One span per automatic conversation summarization when context nears
237283the window limit, child of `agent.query`. SpanKind `CLIENT`. Also
238carries `agent.surface`, `agent.vendor`, `session.id`,
239`office.platform`, `office.version`, and `user.email` (Claude sign-in
240only).
284carries `office.platform` and `office.version` beside the identity
285attributes the other `agent.*` spans carry.
241286 
242287| Attribute | Description |
243288| - | - |
Feedback