Skip to content

openclaw telemetry: capture tlon tool call summaries#5934

Open
patosullivan wants to merge 1 commit into
developfrom
po/migrate-tlon-tool-summaries
Open

openclaw telemetry: capture tlon tool call summaries#5934
patosullivan wants to merge 1 commit into
developfrom
po/migrate-tlon-tool-summaries

Conversation

@patosullivan

@patosullivan patosullivan commented Jun 15, 2026

Copy link
Copy Markdown
Member

Originally posted by @latter-bolden in the openclaw-tlon repo.

Layers in processing to capture context around which tlon commands were used in tool calls. Adds compact, filterable actions like groups.invite, contacts.update-profile, and groups.add-channel, while preserving the existing top-level reply telemetry.

Changes

  • a shared tlon command parser/classifier (packages/openclaw/src/tlon-tool-command.ts) that maps tlon commands to privacy-safe summary keys
  • added summaryKey to individual toolCalls[] entries so we can correlate action type with durationMs
  • added top-level tlon telemetry facets: tlonToolCallCount, tlonToolSummaryKeys, tlonToolChannelKinds, tlonToolUpdateFields

Migration note

Migrated from tloncorp/openclaw-tlon#124 (originally authored by ~latter-bolden, approved by @arthyn) as part of consolidating the OpenClaw Tlon plugin into this monorepo. Rebased onto current master and relocated to packages/openclaw under monorepo conventions.

One incidental, undocumented change in the original PR (await this.client.shutdown() in telemetry close()) was dropped in favor of master's deliberate void this.client.shutdown() (from openclaw-tlon commit 0f48100d).

Test plan

  • pnpm tsc --noEmit clean
  • Unit tests: 564/564 passing (pnpm test in packages/openclaw)
  • Prettier --check clean on all touched files

Layers in processing to capture context around which `tlon` commands were
used in tool calls. Adds compact, filterable actions like `groups.invite`,
`contacts.update-profile`, and `groups.add-channel`, while preserving the
existing top-level reply telemetry.

- shared tlon command parser/classifier mapping commands to privacy-safe
  summary keys
- `summaryKey` on individual `toolCalls[]` entries to correlate action type
  with `durationMs`
- top-level facets: `tlonToolCallCount`, `tlonToolSummaryKeys`,
  `tlonToolChannelKinds`, `tlonToolUpdateFields`

Migrated from tloncorp/openclaw-tlon#124 (originally authored by ~latter-bolden,
approved by @arthyn). Rebased onto current master and relocated to
packages/openclaw under monorepo conventions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@patosullivan patosullivan changed the title telemetry: capture tlon tool call summaries openclaw telemetry: capture tlon tool call summaries Jun 15, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e1b8b02f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +182 to +184
const operation = hasAction
? commandArgs[1]?.toLowerCase() ?? defaultOperationForSubcommand(subcommand)
: defaultOperationForSubcommand(subcommand);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize unknown tlon operations before telemetry

When a known tlon family is invoked with a mistyped or missing operation, e.g. tlon groups "Launch Planning", this takes commandArgs[1] as the operation and later emits it in summaryKey/operation (groups.launch planning) and tlonToolSummaryKeys. That sends arbitrary user text to PostHog even though the CLI will only reject the command, defeating the privacy-safe telemetry goal; collapse unrecognized operations to a fixed value before recording them.

Useful? React with 👍 / 👎.

@latter-bolden

Copy link
Copy Markdown
Member

thanks for carrying this over!

I'll take a look and make sure claw and hermes both log analogously

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants