mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-31 13:34:12 +00:00 
			
		
		
		
	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:
		
						commit
						50290cf002
					
				
					 2 changed files with 12 additions and 0 deletions
				
			
		|  | @ -90,6 +90,9 @@ export async function masterMain() { | ||||||
| 
 | 
 | ||||||
| 			maxBreadcrumbs: 0, | 			maxBreadcrumbs: 0, | ||||||
| 
 | 
 | ||||||
|  | 			// Set release version
 | ||||||
|  | 			release: "Sharkey@" + meta.version, | ||||||
|  | 
 | ||||||
| 			...config.sentryForBackend.options, | 			...config.sentryForBackend.options, | ||||||
| 		}); | 		}); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -9,6 +9,12 @@ import { nodeProfilingIntegration } from '@sentry/profiling-node'; | ||||||
| import { envOption } from '@/env.js'; | import { envOption } from '@/env.js'; | ||||||
| import { loadConfig } from '@/config.js'; | import { loadConfig } from '@/config.js'; | ||||||
| import { jobQueue, server } from './common.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 |  * Init worker process | ||||||
|  | @ -30,6 +36,9 @@ export async function workerMain() { | ||||||
| 
 | 
 | ||||||
| 			maxBreadcrumbs: 0, | 			maxBreadcrumbs: 0, | ||||||
| 
 | 
 | ||||||
|  | 			// Set release version
 | ||||||
|  | 			release: "Sharkey@" + meta.version, | ||||||
|  | 
 | ||||||
| 			...config.sentryForBackend.options, | 			...config.sentryForBackend.options, | ||||||
| 		}); | 		}); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue