Skip to content

Commit

Permalink
Add trace sample rate
Browse files Browse the repository at this point in the history
  • Loading branch information
holzmaster committed Jul 29, 2024
1 parent 08b006e commit 61d1c13
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"token": "${BOT_TOKEN}"
},
"sentry": {
"dsn": null
"dsn": null,
"tracesSampleRate": null
},
"activity": {
// https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
Expand Down
3 changes: 2 additions & 1 deletion config.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"token": "<BOT_TOKEN>"
},
"sentry": {
"dsn": null
"dsn": null,
"tracesSampleRate": null
},
"activity": {
// https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
Expand Down
1 change: 1 addition & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ if (config.sentry?.dsn) {
dsn: config.sentry.dsn,
environment: env.NODE_ENV,
release,
tracesSampleRate: config.sentry?.tracesSampleRate ?? 1,
});
}

Expand Down
1 change: 1 addition & 0 deletions src/service/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface Config {

sentry?: {
dsn?: string | null;
tracesSampleRate?: number;
};

activity: {
Expand Down

0 comments on commit 61d1c13

Please sign in to comment.