Skip to content

[docs] Document faster agent telemetry hook and OTLP request size breaking change - #1751

Closed
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.6from
docs/pr-20387-36091981346-1-f0d8ae2a288cb27f
Closed

aspire-repo-bot[bot] wants to merge 1 commit into
release/13.6from
docs/pr-20387-36091981346-1-f0d8ae2a288cb27f

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#20387

@IEvangelist

Target branch

Targeting release/13.6 — the latest release branch on microsoft/aspire.dev — because the source PR's milestone (14.0) has no matching release/14.0 branch there yet.

Why this PR is needed

microsoft/aspire#20387 ("Reduce agent telemetry hook overhead without reducing coverage") makes two user-facing changes that the deterministic signal scan flagged as docs_required:

  1. CLI: the PostToolUse hook installed by aspire agent init now runs the CLI's native aspire agent telemetry --hook executable directly instead of a shell-script wrapper, removing shell startup and synchronous upload waits from every agent tool call. Coverage (which tool calls are observed) is unchanged. The PR's own "User-facing usage" section tells users to run aspire agent init again to refresh their hook registration, and introduces a new environment variable, ASPIRE_AGENT_TELEMETRY_MAX_PAYLOAD_CHARACTERS, that bounds the hook's input size before parsing (default 65536, range 1-1048576).
  2. Breaking change (the PR carries the breaking-change label and an explicit "Breaking changes" section): the coordinated OpenTelemetry package upgrade to the 1.18.x line drops the default maximum serialized OTLP request size from 128 MiB to 64 MiB. Oversized batches are now dropped instead of exported, with a documented OtlpExporterOptions.MaxRequestSizeBytes workaround.

Neither change was previously documented on aspire.dev.

What was changed

  • src/frontend/src/content/docs/whats-new/aspire-13-6.mdx:
    • Added a "Faster agent telemetry hook" subsection under 🛠️ Aspire CLI enhancements covering the native-exec hook, unchanged wildcard tool-call coverage, the aspire agent init refresh step, and the new ASPIRE_AGENT_TELEMETRY_MAX_PAYLOAD_CHARACTERS environment variable.
    • Added an "OpenTelemetry packages upgraded, smaller default OTLP request size" subsection under ⚠️ Breaking changes covering the coordinated package upgrade and the 128 MiB → 64 MiB default OTLP request size reduction, with the MaxRequestSizeBytes restoration snippet.
    • Updated the release intro bullet list and the upgrade-page caution Aside to reference both changes.
  • src/frontend/src/content/docs/reference/cli/microsoft-collected-cli-telemetry.mdx:
    • Updated the existing "AI agent skill usage" section to describe the native-exec hook behavior and the new max-payload environment variable, alongside the already-documented event/data-point details (which are unchanged by this PR).

No new pages were created; all edits are to existing, directly relevant pages.

Generated by PR Documentation Check for #20387 · copilot · auto · 121.2 AIC · ⌖ 10.5 AIC · ⊞ 18.7K · ◷

…hange

Documents user-facing changes from microsoft/aspire#20387:
- Native aspire agent telemetry --hook execution (no shell wrapper)
- ASPIRE_AGENT_TELEMETRY_MAX_PAYLOAD_CHARACTERS environment variable
- Breaking change: OpenTelemetry 1.18 default OTLP request size drops
  from 128 MiB to 64 MiB, with the OtlpExporterOptions workaround

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

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.

Copilot review overview

🟡 Changes recommended

The documentation describes Aspire 14.0 behavior on the 13.6 branch; align the version or backport the implementation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)
What changed in this PR

Documents faster agent telemetry hooks and the OpenTelemetry request-size change.

Changes:

  • Adds release notes for telemetry and OTLP updates.
  • Updates CLI telemetry reference guidance.
File Summary
src/​frontend/​src/​content/​docs/​whats-new/​aspire-13-6.mdx Adds telemetry and breaking-change release notes.
src/​frontend/​src/​content/​docs/​reference/​cli/​microsoft-collected-cli-telemetry.mdx Documents native hook behavior and payload limits.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +18 to +22
Since Aspire 13.6, the hook runs the CLI's native `aspire agent telemetry --hook` executable directly rather than through a shell wrapper, reducing the overhead added to every agent tool call. GitHub Copilot CLI and Claude Code hook registrations still match every tool call, so coverage is unchanged.

After each agent tool use, the hook checks if an **Aspire** skill, Aspire MCP tool, or Aspire skill reference file was involved. If so, the hook inspects the event and forwards a low-cardinality usage event to the hidden `aspire agent telemetry` command. The command records the event through the same CLI telemetry pipeline. Tool uses that don't involve Aspire skills or tools are ignored. See [AI agent skill usage data](#ai-agent-skill-usage-data) for exactly what's recorded.

Set `ASPIRE_AGENT_TELEMETRY_MAX_PAYLOAD_CHARACTERS` to change the maximum size of hook input the CLI reads before parsing. The default is `65536` UTF-16 characters, and the accepted range is `1`-`1048576`; oversized input is drained without being retained, and an invalid value produces a diagnostic without breaking the agent.
Comment on lines +287 to +291
The `PostToolUse` hook installed by `aspire agent init` now runs the CLI's native `aspire agent telemetry --hook` executable directly instead of the previous shell-script wrapper, removing shell startup and synchronous upload waits from every agent tool call. GitHub Copilot CLI and Claude Code hook registrations still match every tool call (`matcher: "*"` for Claude, unfiltered `postToolUse` for Copilot); coverage of Aspire skills, MCP tools, and skill reference files is unchanged. Refresh existing hook registrations after upgrading:

```bash title="Aspire CLI — Refresh agent hook configuration"
aspire agent init
```
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1751. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1751 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants