Hanzo
OpenapiO11y

Places one span's duration among its peers: the p50/p90/p99 durations of like…

Places one span's duration among its peers: the p50/p90/p99 durations of like spans, and the percentile the given duration lands at.

POST /v1/o11y/span_percentile

Addresshttps://api.hanzo.ai/v1/o11y/span_percentile
MethodPOST
Operationpost_o11y_span_percentile
AuthAuthorization: Bearer $HANZO_API_KEY

Places one span's duration among its peers: the p50/p90/p99 durations of like spans, and the percentile the given duration lands at.

Callers need the viewer role; the runtime's own gate enforces it.

Request

7 fields, body application/json (required).

FieldInTypeRequiredDescription
endbodyintegerEnd is the window end, as epoch nanoseconds.
namebodystringyesName is the span name whose peers are compared.
resourceAttributesbodyobjectResourceAttributes narrow the peer group to spans carrying them all.
resourceAttributes.*bodystring
serviceNamebodystringyesServiceName is the service the span belongs to.
spanDurationbodyintegerSpanDuration is the span's duration in nanoseconds.
startbodyintegerStart is the window start, as epoch nanoseconds.

Response

StatusBodyMeaning
200o11y.O11ySpanPercentileOutok

200 body — 9 fields.

FieldInTypeAlwaysDescription
databodyo11y.O11ySpanPercentile
data.percentilesbodyo11y.O11yPercentiles
data.percentiles.p50bodynumberP50 is the median.
data.percentiles.p90bodynumberP90 is the 90th percentile.
data.percentiles.p99bodynumberP99 is the 99th percentile.
data.positionbodyo11y.O11yPercentilePosition
data.position.descriptionbodystringDescription says the same in words.
data.position.percentilebodynumberPercentile is the percentile the duration lands at.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y span_percentile \
  --name <name> \
  --service-name <serviceName>

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page