Hanzo
OpenapiO11y

Updates the match type and labels of a volume-control rule by its id; the…

Updates the match type and labels of a volume-control rule by its id; the metric name is immutable.

PUT /v1/o11y/metric_reduction_rules/{id}

Addresshttps://api.hanzo.ai/v1/o11y/metric_reduction_rules/{id}
MethodPUT
OperationUpdateMetricReductionRuleByID
AuthAuthorization: Bearer $HANZO_API_KEY

Updates the match type and labels of a volume-control rule by its id; the metric name is immutable.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyesID is the rule's id.
idbodystringyesID is the rule's id.
labelsbodystring[]yesLabels are the label names the rule matches.
matchTypebodystringyesMatchType is drop or keep.

Response

StatusBodyMeaning
200o11y.O11yReductionRuleOutok

200 body — 16 fields.

FieldInTypeAlwaysDescription
databodyo11y.O11yReductionRule
data.activebodybooleanActive says whether the rule is in force.
data.createdAtbodystring (date-time)CreatedAt is when the rule was created.
data.createdBybodystringCreatedBy is who created it.
data.effectiveFrombodystring (date-time)EffectiveFrom is when the rule took effect.
data.idbodystringID is the rule's id.
data.ingestedSamplesbodyintegerIngestedSamples is how many samples arrived while the rule was active.
data.ingestedSeriesbodyintegerIngestedSeries is how many series arrived while the rule was active.
data.labelsbodystring[]Labels are the label names the rule matches.
data.matchTypebodystringMatchType is drop or keep.
data.metricNamebodystringMetricName is the metric the rule governs.
data.retainedSamplesbodyintegerRetainedSamples is how many of them were kept.
data.retainedSeriesbodyintegerRetainedSeries is how many of them were kept.
data.updatedAtbodystring (date-time)UpdatedAt is when the rule last changed.
data.updatedBybodystringUpdatedBy is who last changed it.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y metric_reduction_rules set <id> \
  --labels '["<labels>"]' \
  --match-type <matchType>

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page