Skip to content

Commit 89b7d15

Browse files
committed
fix: pass in metadata explicitly to get around type issues
1 parent 3893a1b commit 89b7d15

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/build-info/src/node/metrics.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ const pkgJSON = new URL('../../package.json', import.meta.url)
1010
export async function initializeMetrics(): Promise<Client | undefined> {
1111
try {
1212
const { version, name } = JSON.parse(await readFile(pkgJSON, 'utf-8'))
13+
const metadata: { [key: string]: any } = {
14+
deploy_id: process.env.DEPLOY_ID,
15+
build_id: process.env.BUILD_ID,
16+
repository_url: process.env.REPOSITORY_URL,
17+
}
1318
Bugsnag.start({
1419
apiKey: process.env.BUGSNAG_KEY_BUILD_INFO || '',
1520
appType: name,
1621
appVersion: version,
1722
releaseStage: 'production',
1823
enabledReleaseStages: ['production'],
19-
metadata: {
20-
deploy_id: process.env.DEPLOY_ID,
21-
build_id: process.env.BUILD_ID,
22-
repository_url: process.env.REPOSITORY_URL,
23-
},
24+
metadata,
2425
autoTrackSessions: false,
2526

2627
logger: new NoopLogger(),

0 commit comments

Comments
 (0)