Record feedback
Give each feedback occurrence aname and at least one of score, label, or explanation. Omit
target to use the active Interaction.
Start an Interaction in JavaScript ·
Start an Interaction in Python
Outside an Interaction, supply an explicit target. Use kind: 'interaction' or kind: 'session' with
the application id, or kind: 'trace' with the Product Trace UUID as id. A kind: 'span' target
takes native OpenTelemetry IDs in traceId and spanId in JavaScript, or trace_id and span_id in
Python. An explicit target takes precedence over the active Interaction and uses its own carrier.
Ended spans keep their original contents.
These examples record feedback after an Interaction using its known ID.
Retry the same occurrence
The SDK generates anid if you omit it. Save the returned id, producer, and timestamp.
On a retry, pass all three back with the same feedback fields and target. A new id records a new
occurrence.
Verify the outcome
recorded-locally confirms local capture. Use authenticated Product readback to find the matching
record and confirm delivery. not-recorded means local capture did not occur, for example when
observation is unavailable or stopped. The SDK still validates the occurrence and explicit target.