Skip to content

cuabot: Consider using @trycua/core for shared telemetry #1019

@f-trycua

Description

@f-trycua

Current State

cuabot duplicates telemetry code that exists in @trycua/core:

  • PostHog configuration (API key, host)
  • Installation ID management (~/.cua/installation_id)
  • Telemetry event structure

The duplication is intentional to keep cuabot standalone, but means changes need to be synced manually.

Consideration

Evaluate whether cuabot should:

  1. Keep standalone - Current approach, duplicate code but no dependency
  2. Import @trycua/core - Share telemetry code, adds dependency
  3. Extract shared telemetry package - New @trycua/telemetry package used by both

Files involved

  • libs/cuabot/src/telemetry.ts - cuabot's telemetry implementation
  • libs/core/ - @trycua/core telemetry

Trade-offs

Approach Pros Cons
Standalone No deps, simpler install Code duplication
Import core Single source of truth Heavier dependency
Shared package Clean separation More packages to maintain

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions