Creates OpenTelemetry attributes from Langfuse trace attributes.
Converts user-friendly trace attributes into the internal OpenTelemetry attribute format required by the span processor.
Langfuse trace attributes to convert
OpenTelemetry attributes object with non-null values
import { createTraceAttributes } from '@langfuse/tracing';const otelAttributes = createTraceAttributes({ name: 'user-checkout-flow', userId: 'user-123', sessionId: 'session-456', tags: ['checkout', 'payment'], metadata: { version: '2.1.0' }});span.setAttributes(otelAttributes); Copy
import { createTraceAttributes } from '@langfuse/tracing';const otelAttributes = createTraceAttributes({ name: 'user-checkout-flow', userId: 'user-123', sessionId: 'session-456', tags: ['checkout', 'payment'], metadata: { version: '2.1.0' }});span.setAttributes(otelAttributes);
Creates OpenTelemetry attributes from Langfuse trace attributes.
Converts user-friendly trace attributes into the internal OpenTelemetry attribute format required by the span processor.