Skip to main content
PATCH
/
spans
/
{span_id}
/
metrics
/
{metric_id}
cURL
curl --request PATCH \
  --url https://api.opper.ai/v2/spans/{span_id}/metrics/{metric_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dimension": "<string>",
  "value": 123,
  "comment": "<string>"
}
'
{
  "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>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

span_id
string<uuid>
required

The id of the span

metric_id
string<uuid>
required

The id of the metric to update

Body

application/json
dimension
string | null

The dimension of the metric

value
number | null

The value of the metric

comment
string | null

A comment about the metric, e.g. a description of the metric

Response

Successful Response

dimension
string
required

The dimension of the metric

value
number
required

The value of the metric

id
string<uuid>
required
span_id
string<uuid>
required
created_at
string<date-time>
required
comment
string | null

A comment about the metric, e.g. a description of the metric