merge: Add Release version to Sentry logging (!834)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/834

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
Hazelnoot 2024-12-20 22:34:34 +00:00
commit 50290cf002
2 changed files with 12 additions and 0 deletions

View file

@ -90,6 +90,9 @@ export async function masterMain() {
maxBreadcrumbs: 0,
// Set release version
release: "Sharkey@" + meta.version,
...config.sentryForBackend.options,
});
}

View file

@ -9,6 +9,12 @@ import { nodeProfilingIntegration } from '@sentry/profiling-node';
import { envOption } from '@/env.js';
import { loadConfig } from '@/config.js';
import { jobQueue, server } from './common.js';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as fs from 'node:fs';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../../built/meta.json`, 'utf-8'));
/**
* Init worker process
@ -30,6 +36,9 @@ export async function workerMain() {
maxBreadcrumbs: 0,
// Set release version
release: "Sharkey@" + meta.version,
...config.sentryForBackend.options,
});
}