Langfuse JS/TS SDKs
    Preparing search index...

    Function serializeObservationMetadata

    • Internal

      Serializes observation metadata into the single JSON value written to the langfuse.observation.metadata span attribute.

      Object metadata is serialized with serializeObservationMetadataEntries: keys with null, undefined, function or symbol values are skipped, and keys beyond MAX_OBSERVATION_METADATA_KEYS are dropped with a warning.

      Parameters

      • metadata: unknown

        Metadata to serialize

      Returns undefined | string

      JSON string, or undefined if there is no metadata to write