Generates annotation attributes for a span, trace, or session.
Collection indices are assigned in input order. Metadata objects are JSON-stringified, while metadata strings are preserved as provided.
Annotation values and target scope
Ordered annotations to flatten
Optional
Target scope; defaults to span
span
OpenTelemetry attributes using annotation terminology
getAnnotationAttributes({ annotations: [{ name: "correctness", score: 0.95 }], scope: "trace",}); Copy
getAnnotationAttributes({ annotations: [{ name: "correctness", score: 0.95 }], scope: "trace",});
Generates annotation attributes for a span, trace, or session.
Collection indices are assigned in input order. Metadata objects are JSON-stringified, while metadata strings are preserved as provided.