cURL
curl -X POST https://api.opper.ai/v2/spans/123e4567-e89b-12d3-a456-426614174000/metrics \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${OPPER_API_KEY}" \ -d '{ "dimension": "response_quality", "value": 8.5, "comment": "Quality score based on human evaluation (1-10 scale)" }'
{ "dimension": "<string>", "value": 123, "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "span_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "created_at": "2023-11-07T05:31:56Z", "comment": "<string>" }
Create a new metric for a span
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The id of the span
The dimension of the metric
The value of the metric
A comment about the metric, e.g. a description of the metric
Successful Response