Skip to content

Commit a6bf73a

Browse files
Smart Wallet Telemetry Page (#48)
* new page * Update docs/smart-wallet/concepts/telemetry.mdx Co-authored-by: Stephan Cilliers <[email protected]> --------- Co-authored-by: Stephan Cilliers <[email protected]>
1 parent a1812b5 commit a6bf73a

File tree

2 files changed

+86
-1
lines changed

2 files changed

+86
-1
lines changed

docs/docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@
234234
"smart-wallet/concepts/usage-details/unsupported-calls"
235235
]
236236
},
237-
"smart-wallet/concepts/base-gasless-campaign"
237+
"smart-wallet/concepts/base-gasless-campaign",
238+
"smart-wallet/concepts/telemetry"
238239
]
239240
},
240241
{
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: Telemetry · Smart Wallet
3+
sidebarTitle: Telemetry
4+
description: Understanding Smart Wallet's anonymous telemetry system and how to configure it.
5+
---
6+
7+
Smart Wallet includes an anonymous telemetry system to help us better understand how Smart Wallet is used across applications and improve the developer experience. Participation in this anonymous program is optional—if you'd prefer not to share any usage data, you can easily opt out.
8+
9+
### Why Are We Collecting Telemetry?
10+
11+
Smart Wallet provides critical wallet infrastructure for onchain applications with features like signing transactions & messages, signer management, and more. By collecting telemetry data, we can:
12+
13+
- **Monitor Wallet Operation Success**: Track which wallet operations (signing, connecting, transactions) are most reliable and identify failure patterns
14+
- **Data-Informed Improvements**: Help our engineering team generate insights that drive future wallet enhancements and reliability improvements
15+
- **Proactive Issue Detection**: Quickly detect issues with new SDK releases or wallet operations through operational metrics and error monitoring
16+
17+
### What Data Will Be Collected?
18+
19+
Telemetry data is completely anonymous and focused on functional metrics. Specifically, we collect:
20+
21+
- **Request Success Metrics**: Information about the success and failure rates of wallet requests to identify reliability issues
22+
- **Error Events**: Generic error events with operational context to help us improve Smart Wallet reliability
23+
- **UI Component Usage**: Anonymous metrics on interface component functionality to ensure optimal reliability
24+
25+
**Privacy First**: No sensitive data—such as private keys, transaction contents, user addresses, or personal information—is ever collected.
26+
27+
### How Does It Work?
28+
29+
Telemetry is integrated into the Smart Wallet SDK and automatically triggers when certain wallet events occur (provided telemetry is enabled in your configuration). The data is sent to secure Coinbase endpoints for analysis.
30+
31+
For example, when a wallet request occurs, a telemetry event like this is sent:
32+
33+
```bash
34+
curl 'https://cca-lite.coinbase.com/amp' \
35+
-H 'content-type: application/x-www-form-urlencoded; charset=utf-8' \
36+
-H 'origin: https://your-app.com' \
37+
--data-raw 'e=[{"event_type":"scw_signer.request.started","event_properties":{"method":"eth_requestAccounts","correlationId":"abc123-def456","sdkVersion":"4.3.2","appName":"Your App Name","appOrigin":"https://your-app.com"}}]'
38+
```
39+
40+
The payload contains an array of telemetry events with operational data including:
41+
42+
- **event_type**: The specific wallet operation being tracked
43+
- **method**: The wallet method being called (e.g., `eth_requestAccounts`)
44+
- **correlationId**: A unique identifier for request tracking
45+
- **sdkVersion**: The Smart Wallet SDK version
46+
- **appName**: Your application name
47+
- **appOrigin**: Your application's domain
48+
49+
### How Do I Opt Out?
50+
51+
By default, telemetry collection follows an opt-out model. If you'd like to disable telemetry in your app that uses the Smart Wallet SDK, you can configure it during SDK initialization:
52+
53+
```typescript
54+
import { createCoinbaseWalletSDK } from "@coinbase/wallet-sdk";
55+
56+
const sdk = createCoinbaseWalletSDK({
57+
appName: "My App",
58+
appLogoUrl: "https://example.com/logo.png",
59+
telemetry: false, // [!code focus]
60+
});
61+
62+
const provider = sdk.makeProvider();
63+
```
64+
65+
For legacy Coinbase Wallet SDK class based components:
66+
67+
```tsx
68+
import { CoinbaseWalletSDK } from "@coinbase/wallet-sdk";
69+
70+
const sdk = new CoinbaseWalletSDK({
71+
appName: "My App",
72+
appLogoUrl: "https://example.com/logo.png",
73+
});
74+
75+
const provider = sdk.makeProvider({
76+
telemetry: false, // [!code focus]
77+
});
78+
```
79+
80+
We believe that this telemetry initiative will help us make Smart Wallet even better for all developers—by focusing our improvements on the most critical wallet operations and catching issues early. If you have any questions or feedback, please reach out to the Smart Wallet team.
81+
82+
Happy building with Smart Wallet!
83+
84+
— The Smart Wallet team

0 commit comments

Comments
 (0)