Telemetry integration into Cow SDK(TS)
Integration of Posthog into Cow SDK(Typescript)
Author(s)
@supernovahs444
Github: supernovahs
Experiences and qualifications: (optional or keep it short)
Working on Ethereum OS, primarily focusing on development tooling, for the past four years.
Grant Description:
Problem: oW Protocol has zero visibility into SDK usage patterns. The team cannot identify which features are used, what errors occur, or how users interact with the SDK
Solution: Implement opt-in telemetry using PostHog. ( to track critical SDK events, including initialisation, quotes, order creation, signing, and errors)
Implementation: Create a telemetry module within @cowprotocol/sdk-trading that wraps PostHog. Integrate by adding telemetry tracking to TradingSdk public methods using a try-catch pattern to capture success/failure events. Includes CI/CD pipeline with secure secret injection, PostHog dashboard with key charts, and documentation.
Impact: Enable data-driven decisions, faster bug detection, and improved SDK quality. Benefits all developers building on the CoW Protocol with minimal overhead.
Deliverables: PR for Typescript SDK, PostHog dashboard, CI/CD setup, and documentation.
The following events will be recorded:-
- SDK Initialisation
- Parameter Updates
- Quote Operations
- Order Signing
- Swap Orders
- Limit Orders
- Native Currency Orders
- Order Cancellation
PostHog Setup & Privacy
Development: I will use a free-tier PostHog key (1M events/month) for testing and validation during the grant period.
Production: After PR merge, the CoW Protocol team must:
- Create their own PostHog account (free tier: 1M events/month)
- Add their production API key to GitHub Secrets
- Publish to npm with their key via CI/CD pipeline
Privacy: PostHog offers GDPR-compliant features including EU/US data residency, automatic PII detection, and configurable retention policies. CoW DAO will determine the specific privacy configuration based on its compliance requirements.
Type of Grant:
Milestone-Based Grant (Single Milestone)
Milestones:
| Milestones | Title | | Due date (*) | Funding request
| Milestones 1 | Pull Request to integrate telemetry into Typescript SDK along with CI/CD with working Posthog dashboard |4 weeks | | 2000 xDai|
Milestone 1: Complete SDK Telemetry System
Due Date: 4 weeks after grant acceptance
Length
Total Duration: 4 weeks
Funding Request:
2000 xDai
Gnosis Chain Address (to receive the grant)
TBD
Terms and Conditions
By submitting this grant application, I acknowledge and agree to be bound by the CoW DAO Participation Agreement and the CoW DAO Grant Agreement Terms.