Skip to main content
After setting up capture, attach feedback to the application work you want to evaluate.

Record feedback

Give each feedback occurrence a name 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.
Both SDKs validate the complete occurrence before local recording. Compact feedback JSON, including the target, can use up to 1 MiB of UTF-8 bytes and 4,096 JSON values. Nesting must stay below 64 levels. Labels and explanations count toward the same whole-occurrence budget. Invalid or oversized feedback raises an error before enqueueing. Python applies local sampling and delivery routing after validation.

Retry the same occurrence

The SDK generates an id 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.