mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 13:55:50 +00:00
feat: 加上 userId 的传递
This commit is contained in:
@@ -49,6 +49,7 @@ import { isBetaTracingEnabled } from '../utils/telemetry/betaSessionTracing.js'
|
||||
import { getTelemetryAttributes } from '../utils/telemetryAttributes.js'
|
||||
import { setShellIfWindows } from '../utils/windowsPaths.js'
|
||||
import { initSentry } from '../utils/sentry.js'
|
||||
import { initUser } from '../utils/user.js'
|
||||
import { initLangfuse, shutdownLangfuse } from '../services/langfuse/index.js'
|
||||
|
||||
// initialize1PEventLogging is dynamically imported to defer OpenTelemetry sdk-logs/resources
|
||||
@@ -156,6 +157,8 @@ export const init = memoize(async (): Promise<void> => {
|
||||
initSentry()
|
||||
|
||||
// Initialize Langfuse tracing (no-op if keys not configured)
|
||||
// Pre-warm user email cache so Langfuse traces include userId
|
||||
await initUser()
|
||||
initLangfuse()
|
||||
registerCleanup(shutdownLangfuse)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user