Updates the currently active trace with new attributes.
This function finds the currently active OpenTelemetry span and updates it with trace-level attributes. If no active span is found, a warning is logged.
Trace attributes to set
import { updateActiveTrace } from '@langfuse/tracing';// Inside an active span contextupdateActiveTrace({ name: 'user-workflow', userId: '123', sessionId: 'session-456', tags: ['production', 'critical'], public: true}); Copy
import { updateActiveTrace } from '@langfuse/tracing';// Inside an active span contextupdateActiveTrace({ name: 'user-workflow', userId: '123', sessionId: 'session-456', tags: ['production', 'critical'], public: true});
Updates the currently active trace with new attributes.
This function finds the currently active OpenTelemetry span and updates it with trace-level attributes. If no active span is found, a warning is logged.