Skip to main content
POST
/
engine
/
metrics
Get Trace Metrics
curl --request POST \
  --url https://engine-api.unomiq.com/engine/metrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Unomiq-App-Id: <x-unomiq-app-id>' \
  --data '
{
  "filter": {
    "and": [
      {
        "field": "span_attributes.http.status_code",
        "op": "gte",
        "value": "200"
      },
      {
        "field": "span_attributes.http.status_code",
        "op": "lte",
        "value": "299"
      },
      {
        "or": [
          {
            "field": "span_kind",
            "op": "eq",
            "value": "SERVER"
          },
          {
            "field": "span_kind",
            "op": "eq",
            "value": "CLIENT"
          }
        ]
      }
    ]
  }
}
'
{
  "trace_count": 123,
  "duration": {
    "mean": 123,
    "median": 123,
    "p50": 123,
    "p90": 123,
    "p95": 123,
    "p99": 123,
    "min": 123,
    "max": 123,
    "stddev": 123
  },
  "cost": {
    "mean": 123,
    "median": 123,
    "p50": 123,
    "p90": 123,
    "p95": 123,
    "p99": 123,
    "min": 123,
    "max": 123,
    "stddev": 123
  },
  "spans_per_trace": {
    "mean": 123,
    "median": 123,
    "p50": 123,
    "p90": 123,
    "p95": 123,
    "p99": 123,
    "min": 123,
    "max": 123,
    "stddev": 123
  }
}

Authorizations

Authorization
string
header
required

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

Headers

X-Unomiq-App-Id
string
required

Query Parameters

start_time
string<date-time>
required

Start datetime (inclusive)

Example:

"2025-01-15T00:00:00Z"

end_time
string<date-time>
required

End datetime (exclusive)

Example:

"2025-01-16T00:00:00Z"

Body

application/json

Request model for query filter.

filter
Condition · object

A single filter condition.

Example:
{
"and": [
{
"field": "span_attributes.http.status_code",
"op": "gte",
"value": "200"
},
{
"field": "span_attributes.http.status_code",
"op": "lte",
"value": "299"
},
{
"or": [
{
"field": "span_kind",
"op": "eq",
"value": "SERVER"
},
{
"field": "span_kind",
"op": "eq",
"value": "CLIENT"
}
]
}
]
}

Response

Successful Response

Aggregated metrics for traces.

trace_count
integer
required
duration
DistributionStats · object
required

Statistical distribution metrics.

cost
DistributionStats · object
required

Statistical distribution metrics.

spans_per_trace
DistributionStats · object
required

Statistical distribution metrics.