-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathsubject.js
More file actions
12 lines (9 loc) · 630 Bytes
/
subject.js
File metadata and controls
12 lines (9 loc) · 630 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
Sentry.metrics.count('test.counter', 1, { attributes: { endpoint: '/api/test' } });
Sentry.metrics.gauge('test.gauge', 42, { unit: 'millisecond', attributes: { server: 'test-1' } });
Sentry.metrics.distribution('test.distribution', 200, { unit: 'second', attributes: { priority: 'high' } });
Sentry.startSpan({ name: 'test-span', op: 'test' }, () => {
Sentry.metrics.count('test.span.counter', 1, { attributes: { operation: 'test' } });
});
Sentry.setUser({ id: 'user-123', email: 'test@example.com', username: 'testuser' });
Sentry.metrics.count('test.user.counter', 1, { attributes: { action: 'click' } });
Sentry.flush();