File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
packages/node-integration-tests/suites/public-api/setTags/with-primitives Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ import * as Sentry from '@sentry/node' ;
2+
3+ Sentry . init ( {
4+ dsn : 'https://public@dsn.ingest.sentry.io/1337' ,
5+ release : '1.0' ,
6+ } ) ;
7+
8+ Sentry . setTag ( 'tag_1' , 'foo' ) ;
9+ Sentry . setTag ( 'tag_2' , Math . PI ) ;
10+ Sentry . setTag ( 'tag_3' , false ) ;
11+ Sentry . setTag ( 'tag_4' , null ) ;
12+ Sentry . setTag ( 'tag_5' , undefined ) ;
13+ Sentry . setTag ( 'tag_6' , - 1 ) ;
14+
15+ Sentry . captureMessage ( 'primitive_tags' ) ;
Original file line number Diff line number Diff line change 1+ import { assertSentryEvent , getEventRequest , runServer } from '../../../../utils' ;
2+
3+ test ( 'should set primitive tags' , async ( ) => {
4+ const url = await runServer ( __dirname ) ;
5+ const requestBody = await getEventRequest ( url ) ;
6+
7+ assertSentryEvent ( requestBody , {
8+ message : 'primitive_tags' ,
9+ tags : {
10+ tag_1 : 'foo' ,
11+ tag_2 : 3.141592653589793 ,
12+ tag_3 : false ,
13+ tag_4 : null ,
14+ tag_6 : - 1 ,
15+ } ,
16+ } ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments