mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-08-03 13:56:07 +00:00
enhance: OTel設定時、JSONログにtrace_id, span_id, trace_flagがつくように (#17748)
* enhance: OTel設定時、JSONログにtrace_id, span_id, trace_flagがつくように * fix
This commit is contained in:
@@ -8,8 +8,8 @@ import { BootstrapConsoleBackend } from './BootstrapConsoleBackend.js';
|
||||
import { JsonConsoleBackend } from './JsonConsoleBackend.js';
|
||||
import { PrettyConsoleBackend } from './PrettyConsoleBackend.js';
|
||||
import type { LogManagerConfiguration } from './LogManager.js';
|
||||
import type { LogTraceContextProvider, LogFormat } from './types.js';
|
||||
import type { LogBackend } from './LogBackend.js';
|
||||
import type { LogFormat } from './types.js';
|
||||
|
||||
/**
|
||||
* プロセス内のすべてのLoggerが共有するLogManagerです。
|
||||
@@ -32,6 +32,11 @@ export function configureLogging(configuration?: LogManagerConfiguration & { rea
|
||||
logManager.setBackend(backend);
|
||||
}
|
||||
|
||||
/** Telemetry初期化後に、ログへTrace Contextを付加する取得処理を登録します。 */
|
||||
export function setLogTraceContextProvider(provider?: LogTraceContextProvider): void {
|
||||
logManager.setTraceContextProvider(provider);
|
||||
}
|
||||
|
||||
/** プロセス終了前に現在のログ出力処理を保留分まで書き出して閉じます。 */
|
||||
export function shutdownLogging(): Promise<void> {
|
||||
return logManager.shutdown();
|
||||
|
||||
Reference in New Issue
Block a user