Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Add error telemetry functions
haxzie committed
May 21, 2025 at 19:13 UTC
68025418a9db5476cb27a1c9c1eacb4b6bb2e752
1 file changed
+17
packages/core/src/telemetry/Telemetry.ts
+17
@@ -155,6 +155,23 @@ export class TelemetryService {
155
156
this.transport.send(reqPayload);
157
}
158
+
159
+ async sendErrorTelemetry(error: Error) {
160
+ if (!this.shouldSendTelemetry()) {
161
+ return;
162
+ }
163
+
164
+ const url = `${TELEMETRY_URL}/api/sdk_metrics/error`;
165
+
166
+ const reqPayload = {
167
+ data: { error },
168
+ url,
169
+ method: 'POST',
170
+ headers: { 'Content-Type': 'application/json' },
171
+ };
172
+
173
+ this.transport.send(reqPayload);
174
+ }
175
}
176
177
export const telemetry = new TelemetryService();