exportMode: 'immediate', suitable for short-lived runtimes (Lambda, edge functions, scripts) where you don’t want to risk losing buffered spans on exit.
Install
Setup
Use
A simple RAG-style chain: retrieve context, then ask the LLM. Decorate the feature function withpropagateMetadata / propagate_metadata: every instrumented call it makes (here the OpenAI call inside .invoke(...)) is stamped with the metadata, and each invocation gets a fresh correlation id.
customer_name and feature_name, so the dashboard can correlate them as one logical request. The decorator fixes its metadata at decoration time; when a value varies per request (a per-call customer_name, say), use the inline form instead (weflayr.propagateMetadata(options, fn) in JS, or with weflayr.propagate_metadata(...): in Python).