mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-14 09:15:45 +00:00
dev: add stack trace for database in jaegar
When using opentelemetry to analyze the system with jaegar, I found this additional information helpful.
This commit is contained in:
@@ -60,7 +60,7 @@ class BaseDatabaseAccessService extends BaseService {
|
||||
const svc_trace = this.services.get('traceService');
|
||||
return await svc_trace.spanify(`database:read`, async () => {
|
||||
return await this._read(query, params);
|
||||
}, { attributes: { query } });
|
||||
}, { attributes: { query, trace: (new Error()).stack } });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,14 +98,14 @@ class BaseDatabaseAccessService extends BaseService {
|
||||
const svc_trace = this.services.get('traceService');
|
||||
return await svc_trace.spanify(`database:pread`, async () => {
|
||||
return await this._read(query, params, { use_primary: true });
|
||||
}, { attributes: { query } });
|
||||
}, { attributes: { query, trace: (new Error()).stack } });
|
||||
}
|
||||
|
||||
async write (query, params) {
|
||||
const svc_trace = this.services.get('traceService');
|
||||
return await svc_trace.spanify(`database:write`, async () => {
|
||||
return await this._write(query, params);
|
||||
}, { attributes: { query } });
|
||||
}, { attributes: { query, trace: (new Error()).stack } });
|
||||
}
|
||||
|
||||
insert (table_name, data) {
|
||||
|
||||
Reference in New Issue
Block a user