Configure a custom OpenTelemetry collector changedoffice-agents/opentelemetry
Nearest release: v2.1.334, published 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 1 Dec 2026 20:17 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 1 Dec 2026 20:37 UTC.
Upstream edited
Recorded here
Lines+62added
Lines−20removed
From line
323
where the diff opens
First seen
25 Aug 2026
this site's first read of the page
Recorded edits11to this page, all time
The whole hunk
from line 323, old and new numbered
/
from line 323
323323whenever your collector receives spans, and `agent.query` carries the
324324MCP connection counts.
325325
326The add-in takes the MCP connection counts once, when it finishes
327loading the connectors of the user's Claude account. They count every
328MCP server that is connected or has failed at that moment, including
329servers from your deployment's configuration. On a third-party platform
326The add-in takes the MCP connection counts and the three `mcp.fetch_*`
327attributes when it finishes loading the connectors of the user's Claude
328account. The counts cover every MCP server that is connected or has
329failed at that moment, including servers from your deployment's
330configuration. On a third-party platform
330331connection, including one that your organization manages from the
331332Enterprise Admin Console, the add-in does not load a Claude account's
332333connectors, so the counts read 0 even while MCP servers from your
from line 350
349350root, and `agent.stream` and `agent.compaction` are its children.
350351`agent.tool_execution` is a child of `agent.stream`, or of `agent.query`
351352when the tool starts after its model call has ended. `file.upload`
352arrives as a separate root span. The four `agent.*` spans each carry
353`agent.surface` (`sheet`, `doc`, `slide`, or `mail`), `agent.vendor`
354(`m` for Microsoft), and `session.id`, and, with a Claude account or
355Claude for Government sign-in, `user.email`, `user.account_uuid`, and
356`organization.id`, so each can be filtered on its own. `file.upload`
353arrives as a separate root span.
354
355The four `agent.*` spans each carry `agent.surface`, `agent.vendor`, and
356`session.id`, so each can be filtered on its own. With a Claude account
357or Claude for Government sign-in, they also carry `user.email`,
358`user.bucket`, `user.account_uuid`, and `organization.id`. `file.upload`
357359carries `session.id` and, with one of those sign-ins, `user.email`;
358360correlate it to a turn by `session.id` and timestamp, since it has its
359own trace ID. Attributes marked *content* carry user-generated data.
360Attributes marked *Claude sign-in only* are populated only when users
361sign in with a Claude account or a Claude for Government sign-in.
362Members who sign in through the Enterprise Admin Console get only
363`user.email` and `user.account_uuid` of these, and Claude for Government
364sign-ins never get `org.rate_limit_tier`.
365Attributes marked *managed settings document only* are sent only to a
366collector delivered by an administrator-managed settings document, and
367only when the administrator selected the attribute's category, as
368described under [What the collector receives](#what-the-collector-receives).
361own trace ID.
369362
363The attribute tables use three marks:
364
365* *content*: the attribute carries user-generated data.
366* *Claude sign-in only*: the attribute is sent only when users sign in
367 with a Claude account or a Claude for Government sign-in. Members who
368 sign in through the Enterprise Admin Console also get `user.email`,
369 `user.bucket`, and `user.account_uuid`, and no other attribute with
370 this mark. Claude for Government sign-ins never get
371 `org.rate_limit_tier`.
372* *managed settings document only*: the attribute is sent only to a
373 collector delivered by an administrator-managed settings document, and
374 only when the administrator selected the attribute's category, as
375 described under [What the collector receives](#what-the-collector-receives).
376
370377### Resource attributes
371378
372379These are set on every span and log record. A deployment configured
from line 394
387394| Attribute | Description |
388395| - | - |
389396| `agent.surface` | `sheet`, `doc`, `slide`, or `mail` |
390| `agent.vendor` | `m` |
397| `agent.vendor` | `m`, for Microsoft |
391398| `user.message` *content* | User prompt, truncated per the attribute cap |
392399| `user.message_chars` | Pre-truncation length of the prompt |
393400| `session.id` | Random identifier the add-in generates when the task pane loads. A new one replaces it when the chat is cleared, for example when the user starts a new chat, deletes all chats, or signs out. Opening an earlier chat from the history list keeps it, so one value can cover several chats |
from line 403
396403| `office.platform` | `PC`, `Mac`, `OfficeOnline`, `iOS`, `Android`, or `Universal` |
397404| `office.version` | Office build number |
398405| `user.email` *Claude sign-in only* | User email |
406| `user.bucket` *Claude sign-in only* | A whole number from 0 to 29 that the add-in computes from a SHA-256 hash of the user's email, for approximate counts of users. The same email address always gives the same number. Different users can share a number, and the email cannot be worked out from it |
399407| `user.account_uuid` *Claude sign-in only* | Claude account UUID |
400408| `organization.id` *Claude sign-in only* | Claude organization UUID |
401409| `org.rate_limit_tier` *Claude sign-in only* | Subscription tier |
410| `org.type` *Claude sign-in only* | The plan type of the user's Claude organization, such as `claude_team` or `claude_enterprise`. With a Claude for Government sign-in, the fixed value `external_gateway` |
402411| `mcp.configured_count` | MCP servers connected or failed when the add-in finished loading the connectors of the user's Claude account, including servers from your deployment's configuration. 0 on a third-party platform connection, including one managed from the Enterprise Admin Console |
403412| `mcp.connected_count` | Of the servers in `mcp.configured_count`, those that were connected |
404413| `mcp.failed_count` | Of the servers in `mcp.configured_count`, those that had failed to connect |
414| `mcp.fetch_status` | How the add-in's reading of the list of the user's Claude account connectors ended, in the load that `mcp.configured_count` describes: `success`, `error`, `timeout`, `no_auth`, or `not_attempted` |
415| `mcp.fetch_duration_ms` | Time the add-in spent reading that list, in milliseconds. The add-in reads the list in pages of up to 100 connectors, so the time can cover several requests. About 0 when `mcp.fetch_status` is `no_auth`, since no request is sent. Absent when `mcp.fetch_status` is `not_attempted` |
416| `mcp.fetch_http_status` | HTTP status of the last response the add-in received while reading that list. With `error` or `timeout` it can be 200, from an earlier page of the list or from a response the add-in could not read. Absent when `mcp.fetch_status` is `not_attempted` or `no_auth`, and when no response arrived |
405417| `file.upload.count` | Files attached to the turn |
418| `file.upload.image_count` | Of those files, images: MIME type `image/*` |
419| `file.upload.document_count` | Of those files, documents: `application/pdf`, `application/json`, `application/xml`, any `text/*` type, and any MIME type that contains `document`, `spreadsheet`, or `presentation`, such as those of .docx, .xlsx, and .pptx files. Any other type, such as `application/msword` or `application/vnd.ms-excel`, counts under `file.upload.other_count` |
420| `file.upload.other_count` | Of those files, all others |
406421| `file.upload.total_bytes` | Total uploaded bytes |
407422| `error.name` | Exception class name, on failure |
408423| `agent.query_phase` | Phase at failure, on failure |
409424
425`mcp.fetch_status` takes one of five values:
426
427* **success**: the add-in read the list.
428* **error**: a request for the list was refused or failed.
429* **timeout**: a response took more than 5 seconds.
430* **no\_auth**: the add-in had no Claude sign-in token to send.
431* **not\_attempted**: the load that `mcp.configured_count` describes had not
432 finished by the end of the turn, or the add-in does not load the
433 connectors of the user's Claude account, as on a third-party platform
434 connection, including one managed from the Enterprise Admin Console.
435
410436### agent.stream
411437
412438One span per model API call, child of `agent.query`. SpanKind `CLIENT`.
from line 476
450476| `tool.output` *content* | Serialized tool output, truncated per the attribute cap |
451477| `tool.output_chars` | Full output length in characters |
452478| `tool.error_type` | Error classification, on failure |
479| `tool.office_error_code` | Error code from Microsoft's Office.js API, set mainly on failed `execute_office_js` calls, for example `PropertyNotLoaded` or `InvalidArgument`. The add-in records a code it does not recognize as `other`. Absent when the error has no such code, such as a JavaScript error in the script |
480| `tool.office_error_location` | `chart` if Office.js reports that a failed call's error came from a chart object, otherwise `other`. Absent when Office.js reports no location |
481| `tool.script_mentions_charts` | Boolean. Whether the script of an `execute_office_js` call contains `.charts`, the Office.js property that holds a worksheet's charts. Set when the span starts, so some calls that the user declines carry it too. Sheet surface only |
453482
454483The add-in sets `tool.accept_decision` when the tool starts. The value
455484records whether the add-in required the user's approval at that moment.
from line 567
538567* `agent.tool_execution`: `tool_init`, `tool_run`, `tool_result`, `tool_error`
539568* `agent.compaction`: `compaction_start`, `compaction_complete`, `compaction_error`
540569* `file.upload`: `exception`
570
571Each `file_upload` event on `agent.query` describes one file attached to
572the turn and carries three attributes:
573
574| Attribute | Description |
575| - | - |
576| `file_id` | The same value as [`file.upload.file_id`](#file-upload) on that file's `file.upload` span |
577| `mime_type` | The file's MIME type. It can differ from `file.upload.mime_type`, which records the type the browser reported before the upload |
578| `content_category` | `image`, `document`, or `other`, by the same rules as `file.upload.image_count`, `file.upload.document_count`, and `file.upload.other_count` |
579
580Every collector that receives spans gets these three attributes,
581whichever [content categories](#what-the-collector-receives) it
582receives.
541583
542584One counter also appears as a span event. `office_agent.token.usage` is
543585emitted on each `agent.stream` span whose call completes, once for each
No line in this hunk matches that.