Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Trace Summary

observability.trace_summary

ProductionBounded custom (Class B)Deterministicstrictmoderatev1.0.0
No network

Overview

You send up to 100000 already-normalized spans and an optional attribute allowlist of at most 20 keys. The answer is duration, a critical-path approximation, service and operation counts, error counts, roots, orphans and the slowest spans. Only allowlisted attribute values are returned; everything else is dropped. This does not fetch traces or claim a causal root cause. A successful call costs 2 execution credits.

A bounded span batch needs a published summary that cannot leak unaudited attributes.

Reliability

OBS_TRACE_SUMMARY_INVALID — trigger: duplicate spanId; retryable: no; next: send unique ids. OBS_TRACE_SUMMARY_LIMIT_EXCEEDED — trigger: more than 100000 spans or more than 20 allowlist keys; retryable: no; next: split the batch.

Context footprint

Only allowlisted attribute values are returned. A successful call costs 2 execution credits.

When to use it

When a caller already holds normalized spans and needs counts, roots and a critical-path approximation.

When the traces still live in a backend, or when a causal root-cause narrative is required.

Powered by Squillify's own span-graph walk. No telemetry backend is involved.

Scope

Note
Summarizes a bounded normalized span batch into duration, counts, roots, orphans and slow spans.

Non-goals

  • Does not fetch traces
  • Does not claim a causal root cause
  • Does not implement full OpenTelemetry semantics

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysis

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input10 MB

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
spansarrayYesNormalized spans, 0 through 100001 closed objects; runtime accepts at most 100000.
attributeAllowlistarrayNoAllowlist of 0 through 21 attribute keys; runtime accepts at most 20. Omit it to return no attribute values.

Output schema

FieldTypeRequiredDescription
spanCountintegerYesHow many spans were accepted.
rootCountintegerYesHow many spans have no parentSpanId.
orphanCountintegerYesHow many spans name a parent that is not in the batch.
errorCountintegerYesHow many spans have status ERROR.
durationNanosintegerYesmax(endNanos) minus min(startNanos) across the batch, or 0 when empty.
criticalPathNanosintegerYesLongest root-to-leaf duration sum used as a critical-path approximation.
criticalPathSpanIdstringYesSpan id at the start of the longest path, or empty when the batch is empty.
rootsarrayYesRoot span ids sorted lexicographically, 0 through 100000 strings.
orphansarrayYesOrphan span ids sorted lexicographically, 0 through 100000 strings.
servicesobjectYesName to non-negative span count sorted by count then name — unconstrained RFC 8259 JSON items are not used.
operationsobjectYesName to non-negative span count sorted by count then name — unconstrained RFC 8259 JSON items are not used.
topSlowSpansarrayYesUp to 10 slowest spans as closed {spanId, name, durationNanos, status, attributes?} objects.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"observability.trace_summary","input":{"spans":[{"spanId":"root","name":"GET /orders","startNanos":0,"endNanos":40}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("observability.trace_summary", {"attributeAllowlist":["http.status_code"],"spans":[{"traceId":"t1","spanId":"root","name":"GET /orders","kind":"SERVER","startNanos":0,"endNanos":40,"status":"OK","service":"api","attributes":{"http.status_code":"200","secret":"drop-me"}},{"traceId":"t1","spanId":"child","parentSpanId":"root","name":"SELECT orders","kind":"SERVER","startNanos":5,"endNanos":25,"status":"ERROR","service":"api","attributes":{"http.status_code":"500","secret":"drop-me"}}]});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
OBS_TRACE_SUMMARY_INVALID400NoThe request payload failed this skill's input validation.
OBS_TRACE_SUMMARY_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not fetch traces
  • Does not claim a causal root cause
  • Does not implement full OpenTelemetry semantics
  • Live trace query
  • Root-cause claims

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "observability.trace_summary",
  "input": {
    "attributeAllowlist": [
      "http.status_code"
    ],
    "spans": [
      {
        "traceId": "t1",
        "spanId": "root",
        "name": "GET /orders",
        "kind": "SERVER",
        "startNanos": 0,
        "endNanos": 40,
        "status": "OK",
        "service": "api",
        "attributes": {
          "http.status_code": "200",
          "secret": "drop-me"
        }
      },
      {
        "traceId": "t1",
        "spanId": "child",
        "parentSpanId": "root",
        "name": "SELECT orders",
        "kind": "SERVER",
        "startNanos": 5,
        "endNanos": 25,
        "status": "ERROR",
        "service": "api",
        "attributes": {
          "http.status_code": "500",
          "secret": "drop-me"
        }
      }
    ]
  }
}

Examples

A root and an error child report one orphan-free tree

Inputjson
{
  "attributeAllowlist": [
    "http.status_code"
  ],
  "spans": [
    {
      "traceId": "t1",
      "spanId": "root",
      "name": "GET /orders",
      "kind": "SERVER",
      "startNanos": 0,
      "endNanos": 40,
      "status": "OK",
      "service": "api",
      "attributes": {
        "http.status_code": "200",
        "secret": "drop-me"
      }
    },
    {
      "traceId": "t1",
      "spanId": "child",
      "parentSpanId": "root",
      "name": "SELECT orders",
      "kind": "SERVER",
      "startNanos": 5,
      "endNanos": 25,
      "status": "ERROR",
      "service": "api",
      "attributes": {
        "http.status_code": "500",
        "secret": "drop-me"
      }
    }
  ]
}
Expected outputjson
{
  "rootCount": 1,
  "services": {
    "api": 2
  },
  "criticalPathSpanId": "root",
  "criticalPathNanos": 60,
  "orphans": [],
  "spanCount": 2,
  "topSlowSpans": [
    {
      "spanId": "root",
      "name": "GET /orders",
      "durationNanos": 40,
      "status": "OK",
      "attributes": {
        "http.status_code": "200"
      }
    },
    {
      "spanId": "child",
      "name": "SELECT orders",
      "durationNanos": 20,
      "status": "ERROR",
      "attributes": {
        "http.status_code": "500"
      }
    }
  ],
  "errorCount": 1,
  "operations": {
    "GET /orders": 1,
    "SELECT orders": 1
  },
  "orphanCount": 0,
  "roots": [
    "root"
  ],
  "durationNanos": 40
}
Tip
Only http.status_code is returned; the secret attribute is dropped.

An empty span list is a successful zero summary

Inputjson
{
  "spans": []
}
Expected outputjson
{
  "rootCount": 0,
  "services": {},
  "criticalPathSpanId": "",
  "criticalPathNanos": 0,
  "orphans": [],
  "spanCount": 0,
  "topSlowSpans": [],
  "errorCount": 0,
  "operations": {},
  "orphanCount": 0,
  "roots": [],
  "durationNanos": 0
}
Tip
Empty input is not a validation error.
  • Summarize an already-exported trace batch
  • Redact span attributes down to an allowlist

Avoid for

  • Live trace query
  • Root-cause claims

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

analysisobservability