Skip to content

fix(telemetry): emit the pfc_ event prefix the ingest service routes on - #181

Merged
elkaix merged 2 commits into
mainfrom
fix/telemetry-event-prefix
Aug 24, 2026
Merged

fix(telemetry): emit the pfc_ event prefix the ingest service routes on#181
elkaix merged 2 commits into
mainfrom
fix/telemetry-event-prefix

Conversation

@elkaix

@elkaix elkaix commented Aug 24, 2026

Copy link
Copy Markdown
Member

Related Issue

No issue — found while auditing the telemetry path before cutting a release.

Problem

The telemetry ingest service selects crash reports by an exact event name and its
dashboards query events by prefix. The client was emitting a different prefix than
the one the service routes on, so:

  • every crash report was silently dropped at ingest instead of reaching the error tracker;
  • ordinary events landed in storage but were invisible to every dashboard panel;
  • crashes were recorded at INFO severity rather than ERROR.

Nothing failed loudly — the ingest endpoint returns 200 {ok:true} regardless — so
the client looked healthy while reporting nothing usable.

What changed

  • packages/telemetry/src/transport.ts and
    packages/agent-core-v2/src/app/telemetry/cloudTransport.ts emit the prefix the
    ingest service actually routes on, for both the event name and the payload user id.
  • Both constants now carry JSDoc naming them as a wire contract, so a future edit has
    to acknowledge what depends on them.
  • The existing prefix-locking tests were the mechanism that caught this; they now
    assert the correct value and fail if either constant drifts again.

Verified: packages/telemetry 72/72 and the packages/agent-core-v2 telemetry suites
39/39 pass; a repo-wide search finds no remaining use of the old prefix.

[skip changeset] — this fixes an internal reporting path with no user-visible behavior.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Summary by CodeRabbit

  • Bug Fixes

    • Restored telemetry events and active device reporting in observability dashboards.
    • Corrected telemetry identifiers to use the current event and device ID naming format.
  • Tests

    • Updated telemetry validation to confirm correct event names, user identifiers, retries, fallbacks, and initialization behavior.
  • Release

    • Included a patch release for the code package.
elkaix added 2 commits August 24, 2026 16:26
The telemetry ingest service selects crash events by the exact name
`pfc_crash` and its dashboards query `pfc_*`. The client was emitting
`kfc_*`, so every crash report was dropped at ingest and ordinary events
were invisible to the dashboards.

Restore both outbound prefixes and lock them with JSDoc so a future edit
has to acknowledge the wire contract.
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4483df96-deb9-4964-bdcc-dc3c58c83c1e

📥 Commits

Reviewing files that changed from the base of the PR and between 496169d and b5ead8b.

📒 Files selected for processing (5)
  • .changeset/fix-telemetry-dashboard.md
  • packages/agent-core-v2/src/app/telemetry/cloudTransport.ts
  • packages/agent-core-v2/test/app/telemetry/cloudAppender.test.ts
  • packages/telemetry/src/transport.ts
  • packages/telemetry/test/telemetry.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

Telemetry transport prefixes changed from kfc_ to pfc_ and from kfc_device_id_ to pfc_device_id_. Agent and package tests now validate the new prefixes. A patch Changeset records the telemetry dashboard update.

Changes

Telemetry Prefix Restoration

Layer / File(s) Summary
Update telemetry transport prefixes
packages/agent-core-v2/src/app/telemetry/cloudTransport.ts, packages/telemetry/src/transport.ts
The exported event and device identity prefixes now use pfc_ and pfc_device_id_.
Align telemetry validation and release metadata
packages/agent-core-v2/test/app/telemetry/cloudAppender.test.ts, packages/telemetry/test/telemetry.test.ts, .changeset/fix-telemetry-dashboard.md
Telemetry tests expect the updated prefixes across payload, transport, retry, fallback, and bootstrap cases. The Changeset records a patch release.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to b5ead

This localized telemetry prefix correction is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required fix prefix, stays within 72 characters, uses imperative mood, and accurately describes the telemetry prefix correction.
Description check ✅ Passed The description includes all template sections, explains the problem and solution, documents testing, and completes the checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files. (1 skipped: 1 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 24, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@b5ead8b
npx https://pkg.pr.new/@pymodel/pythinker-code@b5ead8b

commit: b5ead8b

@elkaix
elkaix merged commit 199eaa9 into main Aug 24, 2026
25 checks passed
@elkaix
elkaix deleted the fix/telemetry-event-prefix branch August 24, 2026 20:47
elkaix pushed a commit that referenced this pull request Aug 25, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @pymodel/pythinker-code@1.3.0

### Minor Changes

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Add an experimental MCP
management API enabled with
`PYTHINKER_CODE_EXPERIMENTAL_MCP_MANAGEMENT=1`.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Add mobile bottom sheets
for composer slash commands, mentions, and model selection.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Add multi-root file
suggestions to `POST /api/v1/fs:suggest`.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Remove the built-in
hosted provider and its sign-in, usage, feedback, model aliases, and SDK
methods; configure a supported provider with its own API key or OAuth
instead.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Remove the bundled
Datasource plugin.

### Patch Changes

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Keep prompt activity and
background-task notices consistent between live and reopened
transcripts.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Add
`[dynamic_workflow].timeout_ms` and
`PYTHINKER_CODE_AGENT_DYNAMIC_WORKFLOW_TIMEOUT_MS` timeout settings.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Make skill activation
turns editable and reversible without a separate activation card.

- [#181](#181)
[`199eaa9`](199eaa9)
Thanks [@elkaix](https://github.com/elkaix)! - Restore telemetry events
and active devices in observability dashboards.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Make Escape handling and
focus behavior safe during IME composition.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Make `/tower` commands
apply immediately when `PYTHINKER_CODE_EXPERIMENTAL_TOWER=1` is enabled.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Fit model and permission
controls into narrow composer layouts.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Preserve the active
session and model after provider logout.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Rank file and skill
mention suggestions with path-aware matching and highlights.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Refresh provider sign-in
state when the browser window regains focus.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Make pinned-session
groups resizable and keep their scroll edges visible.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Honor the configured
secondary-model thinking effort for subagents.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Steer the first queued
prompt into an active session.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Hide button tooltips
while their surrounding menu is open.

- [#176](#176)
[`496169d`](496169d)
Thanks [@elkaix](https://github.com/elkaix)! - Keep the model picker
inside the visible viewport.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added experimental MCP management, mobile composer sheets, multi-root
file suggestions, dynamic workflow timeouts, and editable skill
activations.
- Improved transcript consistency, mention suggestions, model selection,
responsive composer behavior, and session persistence.
- Added immediate `/tower` commands and restored telemetry dashboard
activity.

- **Bug Fixes**
- Improved IME-safe input handling, provider sign-in refresh, model
picker positioning, and secondary-model settings.
  - Removed the built-in hosted provider and bundled Datasource plugin.

- **Release**
  - Updated the application to version 1.3.0.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant