Skip to content

Schemas

A snapshot of an environment's settings, which its SDKs run until the next commit.

FieldTypeDescription
messagerequiredstring | null
created_atrequiredstring (date-time)Example: "2026-10-08T14:03:12.000Z".
byrequiredstring | nullWho committed: a person's name; null for an organization token.

A runtime environment of a project, such as production or staging. Each has its own SDK API keys, and rules are switched on and off per (service, environment).

FieldTypeDescription
slugrequiredstringExample: "production".
namerequiredstringExample: "Production".
descriptionrequiredstring | null
requires_commitrequiredbooleanWhen true, the environment's SDKs keep running its last commit: changes to rules and settings wait as pending changes until someone commits them. When false, changes reach its SDKs as they are made.
positionrequiredintegerIts place in the project. The first is 0.

A team that owns projects, members and credentials.

FieldTypeDescription
slugrequiredstringExample: "snugghome".
namerequiredstringExample: "SnuggHome".
rolerequiredRoleYour role here. An access token acts with no more than the role it was made with.
created_atrequiredstring (date-time)Example: "2026-10-08T14:03:12.000Z".

One difference between what an environment runs (its latest commit) and what committing would make it run.

FieldTypeDescription
idrequiredstringNames the change for revertChange.
kindrequired"rule" | "sync_rule" | "stuck_timer" | "stuck_rule" | "sync_drop" | "trace_counts" | "archive_spans" | "instrumentation" | "auto_target" | "metrics" | "metric_view" | "span_metric" | "exporter" | "honeycomb" | "deployment" | "archive"What kind of setting changed.
changerequired"added" | "removed" | "edited" | "on" | "off" | "order"
rulestringFor a span rule's change, the rule's id (getRule takes it). Example: "rule_RVeVNOTP".
namestringFor settings that are not rows: which one.
servicesstring[]The names of the services it affects.
beforeanyThe setting as SDKs run it now; absent for an addition.
afteranyThe setting once committed; absent for a removal.
revertiblerequiredbooleanFalse for organization-wide settings, which only their own settings pages change.

An RFC 9457 problem details object, sent with Content-Type: application/problem+json for every error.

FieldTypeDescription
typerequiredstringA URL naming the kind of problem; its fragment is the code.
titlerequiredstringA short summary of the kind of problem.
statusrequiredintegerThe HTTP status code.
detailrequiredstringWhat went wrong with this request, and how to fix it where possible.
coderequiredstringStable, machine-readable: invalid_request, unauthorized, forbidden, not_found, conflict, precondition_failed, internal_error, or a more specific code an operation documents.
errorsobject[]For invalid_request: each problem found with the request.
errors[].detailrequiredstring
errors[].pointerstringWhere in the request body, as a JSON Pointer.
errors[].parameterstringWhich path or query parameter.
errors[].headerstringWhich header.

A product whose services send telemetry through SpanSlice. Rules belong to a project.

FieldTypeDescription
slugrequiredstringExample: "snugghome-app".
namerequiredstringExample: "SnuggHome App".
organizationrequiredstringThe organization's slug. Example: "snugghome".
created_atrequiredstring (date-time)Example: "2026-10-08T14:03:12.000Z".

What a member may do, lowest first: viewer (read), member (change settings and rules), admin (manage people, credentials and destinations), owner (everything, including deleting the organization).

"viewer" | "member" | "admin" | "owner"

A span rule: when a span matches when, its actions run. Rules belong to a project, apply to all its services or one, and are switched off per (service, environment).

FieldTypeDescription
idrequiredstringStable across environments and renames. Example: "rule_RVeVNOTP".
namerequiredstringThe name it was given; '' when unnamed.
titlerequiredstringGenerated from what the rule does. For an unnamed rule, spans carry this title in spanslice.rule_names.
stagerequired"created" | "completed"When the rule runs: created as a span starts (it can change, sample or drop it before children see it), completed once it ends (duration and, for roots, trace facts are known).
targetrequired"root" | "child" | "any"Which spans the rule looks at before its conditions: root (no local parent), child or any.
servicerequiredstring | nullThe one service the rule applies to, by slug; null for every service in the project.
whenrequiredCondition | nullWhat it matches; null, like an empty group, matches every span.
then_actionsrequiredAction[]
positionrequiredintegerIts place among the rules with the same stage and service. The first is 0. A service's rules run before the project's.
versionrequiredintegerBumped by each edit to what the rule does. Send it as If-Match to update only that version.
disabledrequiredobject[]Where the rule is switched off. A rule runs in every (service, environment) it applies to where the service is deployed, except these.
disabled[].servicerequiredstringA service's slug. Example: "api".
disabled[].environmentrequiredstringAn environment's slug. Example: "production".
keysrequiredmap of stringPer environment slug, the key spans carry in spanslice.rules when this rule acts on them.
created_atrequiredstring (date-time)Example: "2026-10-08T14:03:12.000Z".
updated_atrequiredstring (date-time)Example: "2026-10-08T14:03:12.000Z".

A program that runs the SpanSlice SDK, named by its OpenTelemetry service.name.

FieldTypeDescription
slugrequiredstringExample: "api".
namerequiredstringExample: "Api".
descriptionrequiredstring | null
languagerequired"nodejs" | "webjs" | "python" | "go" | "java" | "ruby" | "dotnet" | "php" | "rust" | nullThe language its SDK is written in, as OpenTelemetry's telemetry.sdk.language; null if unset. Example: "nodejs".
repository_urlrequiredstring | nullThe Git repository it is built from, which links the commits its processes run; null if unset. Example: "https://github.com/acme/api".
environmentsrequiredstring[]Slugs of the environments the service is deployed to, in project order.

What a rule matches: a clause, or a group of conditions joined by and / or. A group with no children matches every span the rule targets.

One of ServiceNameClause, SpanNameClause, LibraryNameClause, SpanKindClause, SpanAttributeClause, ResourceAttributeClause, SpanAttributeKeyClause, SpanDurationClause, TraceDurationClause, IsRootClause, IsChildClause, HasErrorClause, TraceSpanCountClause, SpansInTraceClause, CurrentTimeClause, or a group:

FieldTypeDescription
typerequired"group"
operatorrequired"and" | "or"
childrenrequiredCondition[]

Which descendants a forDescendants action's actions run on; no children means all of them.

One of ServiceNameClause, SpanNameClause, LibraryNameClause, SpanKindClause, SpanAttributeClause, ResourceAttributeClause, SpanAttributeKeyClause, SpanDurationClause, TraceDurationClause, IsRootClause, IsChildClause, HasErrorClause, TraceSpanCountClause, CurrentTimeClause, or a group:

FieldTypeDescription
typerequired"group"
operatorrequired"and" | "or"
childrenrequiredDescendantCondition[]

A condition on one span of the trace, for spansInTrace. Trace subjects are not allowed.

One of ServiceNameClause, SpanNameClause, LibraryNameClause, SpanKindClause, SpanAttributeClause, ResourceAttributeClause, SpanAttributeKeyClause, SpanDurationClause, TraceDurationClause, IsRootClause, IsChildClause, HasErrorClause, TraceSpanCountClause, CurrentTimeClause, or a group:

FieldTypeDescription
typerequired"group"
operatorrequired"and" | "or"
childrenrequiredSpanCondition[]At least 1 item.

The time of day on the SDK's own clock, between from and to (HH:MM). A window that crosses midnight (22:00 to 06:00) wraps.

"subject": "currentTime"

OperatorValue
between{ from: string, to: string }

Whether the span's status is error (yes) or not (no).

"subject": "hasError"

Operator
yes, no

The span has a local parent. Prefer the rule's target: child.

FieldTypeDescription
typerequired"clause"
subjectrequired"isChild"

The span has no local parent. Prefer the rule's target: root.

FieldTypeDescription
typerequired"clause"
subjectrequired"isRoot"

The instrumentation scope that made the span, such as @opentelemetry/instrumentation-http.

"subject": "libraryName"

OperatorValue
is, isNot, contains, notContains, startsWith, regexstring
in, notInstring[]

The value of the resource attribute named by argument: a fact about the process that made the span, such as deployment.environment.name or host.name. Operators work as for spanAttribute.

"subject": "resourceAttribute"

OperatorArgumentValue
is, isNot, contains, notContains, startsWith, regexstring: Attributestring
in, notInstring: Attributestring[]
exists, notExistsstring: Attributenone
eq, gt, gte, lt, ltestring: Attributenumber
betweenstring: Attribute{ from: number, to: number }

The span's service: its OpenTelemetry service.name.

"subject": "serviceName"

OperatorValue
is, isNot, contains, notContains, startsWith, regexstring
in, notInstring[]

The value of the span attribute named by argument. Text operators compare it as text; eq, gt, gte, lt, lte and between compare it as a number; exists and notExists test whether it is set.

"subject": "spanAttribute"

OperatorArgumentValue
is, isNot, contains, notContains, startsWith, regexstring: Attributestring
in, notInstring: Attributestring[]
exists, notExistsstring: Attributenone
eq, gt, gte, lt, ltestring: Attributenumber
betweenstring: Attribute{ from: number, to: number }

Whether any of the span's attribute keys matches. The matched-attribute actions act on the keys it matches. Every key is checked, so narrow the rule with other conditions first; it runs after its siblings.

"subject": "spanAttributeKey"

OperatorValue
is, contains, startsWith, regexstring

How long the span took. Completed stage only.

"subject": "spanDuration"

OperatorValue
eq, gt, gte, lt, lte{ amount: number, unit: "ms" | "s" | "m" }
between{ from: { amount: number, unit: "ms" | "s" | "m" }, to: { amount: number, unit: "ms" | "s" | "m" } }

The span's OpenTelemetry kind: internal, server, client, producer or consumer.

"subject": "spanKind"

OperatorValue
is, isNot"internal" | "server" | "client" | "producer" | "consumer"
in, notIn"internal" | "server" | "client" | "producer" | "consumer"[]

The span's name.

"subject": "spanName"

OperatorValue
is, isNot, contains, notContains, startsWith, regexstring
in, notInstring[]

How many of the trace's spans match a condition: any, none, all, or atLeast / atMost count of them. Completed stage only, on rules that target root spans.

"subject": "spansInTrace"

OperatorValue
any, none, allSpanCondition
atLeast, atMost{ count: integer, condition: SpanCondition }

How long the whole trace took. Completed stage only, on rules that target root spans.

"subject": "traceDuration"

OperatorValue
eq, gt, gte, lt, lte{ amount: number, unit: "ms" | "s" | "m" }
between{ from: { amount: number, unit: "ms" | "s" | "m" }, to: { amount: number, unit: "ms" | "s" | "m" } }

How many spans the trace has. Completed stage only, on rules that target root spans.

"subject": "traceSpanCount"

OperatorValue
eq, gt, gte, lt, ltenumber

Something a rule does to the span or trace it matched. Actions run in list order.

One of SetSpanAttributeAction, SetTraceSpanAttributeAction, SetRootSpanAttributeAction, RedactSpanAttributeAction, DropSpanAction, DropTraceAction, DropNonErrorsAction, SetSampleRateAction, SetSpanSampleRateAction, RenameSpanAction, DropAttributesAction, DropMatchedAttributesAction, PrefixMatchedAttributesAction, CollapseSpanAction, ForDescendantsAction, RollupSpansAction, StopRuleAction

An action inside forDescendants: span actions only, no nesting.

One of SetSpanAttributeAction, RedactSpanAttributeAction, DropSpanAction, SetSpanSampleRateAction, RenameSpanAction, DropAttributesAction, DropMatchedAttributesAction, PrefixMatchedAttributesAction, CollapseSpanAction, RollupSpansAction, StopRuleAction

Removes the span and copies its attributes onto its children, which move up to its parent. attributes: all, excluding attributeList, or only attributeList. onConflict when a child has the key: keepChild keeps the child's value; keepParent and ignore write the collapsed span's.

FieldTypeDescription
actionrequired"collapseSpan"
attributesrequired"all" | "excluding" | "only"
attributeListstring[]
onConflictrequired"ignore" | "keepChild" | "keepParent"

Removes the attributes listed in attributes, by exact key. spanslice.* attributes and SampleRate are never touched.

FieldTypeDescription
actionrequired"dropAttributes"
attributesrequiredstring[]At least 1 item.

Removes every attribute whose key matches one of the rule's spanAttributeKey conditions, so the rule needs one. spanslice.* attributes and SampleRate are never touched.

FieldTypeDescription
actionrequired"dropMatchedAttributes"

Drops the trace unless a span in it has an error.

FieldTypeDescription
actionrequired"dropNonErrors"

Removes the span. With reparent: true its children move up to the nearest kept ancestor; with false they're dropped with it.

FieldTypeDescription
actionrequired"dropSpan"
reparentrequiredboolean

Drops every span of the trace. It beats every sample rate.

FieldTypeDescription
actionrequired"dropTrace"

Runs nested span actions (then_actions) on the matched span's descendants that match when (all of them when it has no conditions). Trace actions and further nesting are not allowed inside.

FieldTypeDescription
actionrequired"forDescendants"
whenrequiredDescendantCondition
then_actionsrequiredDescendantAction[]

Moves every attribute whose key matches one of the rule's spanAttributeKey conditions under prefix, such as legacy.. The rule needs a spanAttributeKey condition.

FieldTypeDescription
actionrequired"prefixMatchedAttributes"
prefixrequiredstring

Replaces an attribute's value before it leaves the process: replace with text (default [Redacted]), mask (like p****d) or shape (like String<8>). The original is never exported or archived.

FieldTypeDescription
actionrequired"redactSpanAttribute"
namerequiredstring
stylerequired"replace" | "mask" | "shape"
textstring

Renames the span. value may be a template: {http.method} {http.route}.

FieldTypeDescription
actionrequired"renameSpan"
valuerequiredstring

Replaces a run of like spans with one summary span when the trace is sent. Spans are grouped by parent, name and the values of the groupBy attributes; a group needs at least minCount (2 or more). With rename, the summary is named {name} (rollup); without it, it keeps the spans' name.

FieldTypeDescription
actionrequired"rollupSpans"
groupBystring[]
minCountrequiredintegerAt least 2.
renameboolean

Sets an attribute on the trace's local root span, replacing any value. value may be a template, read from the span that matched.

FieldTypeDescription
actionrequired"setRootSpanAttribute"
namerequiredstring
valuerequiredstring

Keeps 1 in oneIn traces, decided by trace ID, and sets SampleRate on the spans sent. mode ifNotSet (default) leaves a rate an earlier rule set; override replaces it.

FieldTypeDescription
actionrequired"setSampleRate"
oneInrequiredintegerAt least 1.
mode"ifNotSet" | "override"

Sets an attribute on the span. value may be a template that reads the span's other attributes: {http.method} {http.route}.

FieldTypeDescription
actionrequired"setSpanAttribute"
namerequiredstring
valuerequiredstring

Keeps 1 in oneIn of the matched spans inside a kept trace, decided by span ID. A span not kept is dropped and its children move up. Same modes as setSampleRate.

FieldTypeDescription
actionrequired"setSpanSampleRate"
oneInrequiredintegerAt least 1.
mode"ifNotSet" | "override"

Sets an attribute on every span of the trace, ended or not. A span's own value for the key wins. value may be a template, read from the span that matched.

FieldTypeDescription
actionrequired"setTraceSpanAttribute"
namerequiredstring
valuerequiredstring

Ends rule evaluation for the span at this stage: the actions after it, and the rules after this one, don't run.

FieldTypeDescription
actionrequired"stopRule"
FieldTypeDescription
working_versionrequiredstringThe working_version from getPendingChanges: what you reviewed. If anything changed since, you get a 409 and nothing happens, so you never commit or revert what you haven't seen. Example: "5f0c2e9a41d3b7c8".
messagestringWhy, shown in the commit history. Up to 500 characters.
FieldTypeDescription
namestringOptional; an unnamed rule goes by its title, generated from what it does. Default "".
stagerequired"created" | "completed"When the rule runs: created as a span starts (it can change, sample or drop it before children see it), completed once it ends (duration and, for roots, trace facts are known).
target"root" | "child" | "any"Which spans the rule looks at before its conditions: root (no local parent), child or any. Default "root".
servicestring | nullA service's slug to apply to that service only; null for all. Default null.
whenCondition | null
then_actionsrequiredAction[]
FieldTypeDescription
stagerequired"created" | "completed"When the rule runs: created as a span starts (it can change, sample or drop it before children see it), completed once it ends (duration and, for roots, trace facts are known).
servicerequiredstring | nullThe list's service slug; null for the project's list.
orderrequiredstring[]Every rule of the list, in the order they should run.
FieldTypeDescription
working_versionrequiredstringThe working_version from getPendingChanges: what you reviewed. If anything changed since, you get a 409 and nothing happens, so you never commit or revert what you haven't seen. Example: "5f0c2e9a41d3b7c8".
FieldTypeDescription
cellsrequiredobject[]The pairs to change. At least 1 item.
cells[].servicerequiredstringA service's slug. Example: "api".
cells[].environmentrequiredstringAn environment's slug. Example: "production".
cells[].enabledrequiredboolean
FieldTypeDescription
namestringOptional; an unnamed rule goes by its title, generated from what it does. Default "".
stage"created" | "completed"When the rule runs: created as a span starts (it can change, sample or drop it before children see it), completed once it ends (duration and, for roots, trace facts are known).
target"root" | "child" | "any"Which spans the rule looks at before its conditions: root (no local parent), child or any.
servicestring | nullA service's slug to apply to that service only; null for all.
whenCondition | null
then_actionsAction[]
FieldTypeDescription
tokenrequiredobject
token.namerequiredstring
token.kindrequired"personal" | "organization"personal: acts as its user, capped at role. organization: belongs to the organization itself.
token.rolerequiredRoleThe highest role the token acts with.
token.organizationrequiredstringIts organization's slug; the only one it reaches.
token.expires_atrequiredstring (date-time) | null
token.created_atrequiredstring (date-time)Example: "2026-10-08T14:03:12.000Z".
userrequiredobject | nullA personal token's user; null for an organization token.
user.namerequiredstring
user.emailrequiredstring
FieldTypeDescription
environmentrequiredstring
requires_commitrequiredboolean
working_versionrequiredstringThe working_version from getPendingChanges: what you reviewed. If anything changed since, you get a 409 and nothing happens, so you never commit or revert what you haven't seen. Example: "5f0c2e9a41d3b7c8".
committedrequiredCommit | nullThe commit its SDKs run; null unless it requires commit.
changesrequiredPendingChange[]
FieldTypeDescription
conditionsrequiredstring
subjectsrequiredobject[]
subjects[].subjectrequiredstring
subjects[].descriptionrequiredstring
subjects[].argumentrequiredstring | nullWhat argument names, when the subject takes one.
subjects[].stagerequired"created" | "completed" | nullThe only stage it works at, if just one.
subjects[].root_onlyrequiredbooleanOnly on rules with target: root.
subjects[].choicesrequiredstring[] | nullThe values a choice or choiceList operator takes, when the subject has them.
subjects[].operatorsrequiredobject[]
subjects[].operators[].operatorrequiredstring
subjects[].operators[].labelrequiredstring
subjects[].operators[].valuerequired"none" | "text" | "textList" | "choice" | "choiceList" | "number" | "numberRange" | "duration" | "durationRange" | "timeRange" | "condition" | "countedCondition"
valuesrequiredmap of stringThe shape of value for each kind.
actionsrequiredobject[]
actions[].actionrequiredstring
actions[].descriptionrequiredstring
actions[].scoperequired"span" | "trace"Trace actions act on the whole trace.
actions[].oncerequiredbooleanAt most once in an action list.
actions[].in_descendantsrequiredbooleanAllowed inside forDescendants.
actions[].fieldsrequiredmap of anyJSON Schema of each field.
actions[].requiredrequiredstring[]
examplesrequiredmap of any[]
json_schemarequiredobject
json_schema.conditionrequiredany
json_schema.actionrequiredany
FieldTypeDescription
datarequiredEnvironment[]
next_cursorrequiredstring | nullPass as cursor to get the next page; null on the last page.
FieldTypeDescription
datarequiredOrganization[]
next_cursorrequiredstring | nullPass as cursor to get the next page; null on the last page.
FieldTypeDescription
datarequiredProject[]
next_cursorrequiredstring | nullPass as cursor to get the next page; null on the last page.
FieldTypeDescription
datarequiredRule[]
next_cursorrequiredstring | nullPass as cursor to get the next page; null on the last page.
FieldTypeDescription
datarequiredService[]
next_cursorrequiredstring | nullPass as cursor to get the next page; null on the last page.
FieldTypeDescription
datarequiredRule[]