Skip to main content

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

MicroSkills Reference

Error Event Grouper

observability.extract_error_events

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
File inputNo network

Overview

You bind our roles to your log's own keys, say which roles form the group and how each one is normalised, and we return the distinct error classes with their counts and line numbers. The six normalisations run in one published order whatever order you list them in, so two people expressing the same intent get the same key. Nothing here is fingerprinting, fuzzy matching or a regular expression: you can predict every group from the documentation. No raw event comes back, only the normalised parts of the key and the lines to look at.

Grouping errors by hand means writing regular expressions against your own logs and rediscovering that request ids, hex object ids and path segments are what keep identical failures looking distinct.

Reliability

Fully deterministic and locale-independent: case folding is pinned so a Turkish default locale cannot change a group key, and the key is built from a length-prefixed serialisation that a crafted log line cannot forge a collision against. Grouping is by that serialisation and never by the published hash. Failures, none worth retrying unchanged: OBS_ERROR_INPUT_MISSING means none of logs, fileRef and records arrived, or records was empty, so send exactly one. OBS_ERROR_INPUT_AMBIGUOUS means more than one of them arrived, so send one. OBS_ERROR_INPUT_TOO_LARGE means the inline body went past 2097152 bytes, so upload it and pass a file reference. OBS_ERROR_FILE_REF_NOT_ACCESSIBLE means the reference is not readable with these credentials, so upload the object again. OBS_ERROR_FILE_TOO_LARGE means the referenced object went past 10000000 bytes, so split it and call once per part. OBS_ERROR_FORMAT_REQUIRED means logs or fileRef arrived without format, so add JSON_LINES or LOGFMT. OBS_ERROR_ROLE_UNBOUND means a role you grouped or required has no entry in fieldBindings, so bind it to one of your keys. OBS_ERROR_ROLE_UNSUPPORTED means a name is not one of the nine roles, so pick one that is. OBS_ERROR_NORMALISATION_UNSUPPORTED means an operation is not one of the six, so pick one that is. OBS_ERROR_GROUPBY_INVALID means groupBy was empty, too long or repeated a role, so send 1 to 8 distinct roles. OBS_ERROR_LINE_LIMIT_EXCEEDED means the body carries more lines than allowed, so split it or lower your expectations of one call. OBS_ERROR_GROUP_LIMIT_EXCEEDED means the grouping produced more distinct keys than maxGroups, and the remedy is to add MASK_DIGITS or MASK_HEX to the high-cardinality role. OBS_ERROR_OPTION_UNSUPPORTED means a property or a limit is not one we accept, so drop it or bring it into range. OBS_ERROR_WORK_REFUSED means the projected work went past 18000000 units, and the answer carries the projection and the budget. OBS_ERROR_OUTPUT_TOO_LARGE means the group list would not fit the inline response ceiling, so lower maxGroups or normalise harder.

Context footprint

Returns at most maxGroups groups and no raw log content, so the answer stays small even when the input does not. A successful call costs 3 execution credits.

When to use it

When you want the distinct error classes in a body of logs, with counts, and you can name the fields that define an error class.

When two messages need to be recognised as similar without sharing an exact normalised field, or when you want the raw lines back.

Scope

Note
Group selected error lines by a closed role vocabulary and a closed, fixed-order normalisation vocabulary, and count them.

Non-goals

  • Does not fingerprint, cluster fuzzily or infer that two messages are alike
  • Does not accept a regular expression, a template or any field expression
  • Does not parse stack traces, which code.parse_stacktrace answers
  • Does not echo any raw log line, message or record back to you
  • Does not store, forward or scrape anything, and reads no clock

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysis

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call3 credits

File handling

Accepts file_refProduces file_refMax input2 MBMax file size9.5 MB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file9.5 MiBSkill and platform maximum
Maximum number of input files1Skill maximum

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

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 does not contain submitted 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
logsstringNoRequired unless fileRef or records is provided. Raw log text of 1 to 2097152 UTF-8 bytes.
fileRefstringNoOptional Squillify file reference holding up to 10000000 bytes of log text; omit it when you send logs or records.
recordsarrayNoAlready-parsed objects, 1 to 50000 entries; omit it when you send logs or fileRef.
formatstringNoRequired unless records is provided. JSON_LINES or LOGFMT; omit it only when records are already parsed.
fieldBindingsobjectYesClosed map of 1 to 9 roles to the producer key each role reads; LEVEL must be bound because selection is by severity.
selectobjectNoClosed selection filters; omit the whole object to select everything at ERROR and above.
groupingRulesobjectYesClosed grouping recipe: groupBy names 1 to 8 roles in significant order, and optional normalise maps a role to up to 6 published operations.
maxGroupsintegerNoDistinct-key ceiling from 1 through 1000; omit it for 1000.
limitsobjectNoClosed caps; omit it for maxLines 50000, maxFieldsPerRecord 64 and maxKeyPartLength 256.

Output schema

FieldTypeRequiredDescription
groupsarrayYesOne distinct error class per entry, at most maxGroups rows, never echoing raw log lines.
summaryobjectYesClosed counters: selectedCount, examinedCount, groupCount, skippedUnselectedCount, parseErrorCount and truncated.

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.extract_error_events","input":{"records":[{"lvl":"error","msg":"boom"}],"fieldBindings":{"LEVEL":"lvl","MESSAGE":"msg"},"groupingRules":{"groupBy":["MESSAGE"]}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("observability.extract_error_events", {"groupingRules":{"groupBy":["MESSAGE"],"normalise":{"MESSAGE":["MASK_DIGITS","CASE_FOLD"]}},"logs":"{\"lvl\":\"error\",\"msg\":\"order 12 failed\"}\n{\"lvl\":\"error\",\"msg\":\"order 3456 failed\"}\n{\"lvl\":\"info\",\"msg\":\"order 7 placed\"}\n","format":"JSON_LINES","fieldBindings":{"MESSAGE":"msg","LEVEL":"lvl"}});

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_ERROR_INPUT_MISSING400NoThe request payload failed this skill's input validation.
OBS_ERROR_INPUT_AMBIGUOUS400NoThe request payload failed this skill's input validation.
OBS_ERROR_INPUT_TOO_LARGE429NoA size, quota, rate, or time limit was exceeded.
OBS_ERROR_FILE_REF_NOT_ACCESSIBLE412NoThe input is valid but cannot be processed as-is.
OBS_ERROR_FILE_TOO_LARGE429NoA size, quota, rate, or time limit was exceeded.
OBS_ERROR_FORMAT_REQUIRED400NoThe request payload failed this skill's input validation.
OBS_ERROR_ROLE_UNBOUND400NoThe request payload failed this skill's input validation.
OBS_ERROR_ROLE_UNSUPPORTED400NoThe skill does not support the requested variant.
OBS_ERROR_NORMALISATION_UNSUPPORTED400NoThe skill does not support the requested variant.
OBS_ERROR_GROUPBY_INVALID400NoThe request payload failed this skill's input validation.
OBS_ERROR_LINE_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
OBS_ERROR_GROUP_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
OBS_ERROR_OPTION_UNSUPPORTED400NoThe skill does not support the requested variant.
OBS_ERROR_WORK_REFUSED429NoA size, quota, rate, or time limit was exceeded.
OBS_ERROR_OUTPUT_TOO_LARGE429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not fingerprint, cluster fuzzily or infer that two messages are alike
  • Does not accept a regular expression, a template or any field expression
  • Does not parse stack traces, which code.parse_stacktrace answers
  • Does not echo any raw log line, message or record back to you
  • Does not store, forward or scrape anything, and reads no clock
  • Grouping messages that share no exact field after normalisation
  • Extracting frames from a stack trace

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "observability.extract_error_events",
  "input": {
    "groupingRules": {
      "groupBy": [
        "MESSAGE"
      ],
      "normalise": {
        "MESSAGE": [
          "MASK_DIGITS",
          "CASE_FOLD"
        ]
      }
    },
    "logs": "{\"lvl\":\"error\",\"msg\":\"order 12 failed\"}\n{\"lvl\":\"error\",\"msg\":\"order 3456 failed\"}\n{\"lvl\":\"info\",\"msg\":\"order 7 placed\"}\n",
    "format": "JSON_LINES",
    "fieldBindings": {
      "MESSAGE": "msg",
      "LEVEL": "lvl"
    }
  }
}

Examples

Two request ids collapsed into one group by digit masking

Inputjson
{
  "groupingRules": {
    "groupBy": [
      "MESSAGE"
    ],
    "normalise": {
      "MESSAGE": [
        "MASK_DIGITS",
        "CASE_FOLD"
      ]
    }
  },
  "logs": "{\"lvl\":\"error\",\"msg\":\"order 12 failed\"}\n{\"lvl\":\"error\",\"msg\":\"order 3456 failed\"}\n{\"lvl\":\"info\",\"msg\":\"order 7 placed\"}\n",
  "format": "JSON_LINES",
  "fieldBindings": {
    "MESSAGE": "msg",
    "LEVEL": "lvl"
  }
}
Expected outputjson
{
  "summary": {
    "selectedCount": 2,
    "examinedCount": 3,
    "groupCount": 1,
    "skippedUnselectedCount": 1,
    "parseErrorCount": 0,
    "truncated": false
  },
  "groups": [
    {
      "groupKey": "c6a54f1242e06a42",
      "keyParts": [
        {
          "value": "order # failed",
          "present": true,
          "role": "MESSAGE"
        }
      ],
      "count": 2,
      "firstSeenLine": 1,
      "lastSeenLine": 2,
      "keyTruncated": false
    }
  ]
}
Tip
The two error lines differ only in an id, so digit masking puts them in one group and the info line is never selected.

A missing service grouping apart from an empty one

Inputjson
{
  "records": [
    {
      "lvl": "error",
      "svc": ""
    },
    {
      "lvl": "error"
    }
  ],
  "fieldBindings": {
    "LEVEL": "lvl",
    "SERVICE": "svc"
  },
  "groupingRules": {
    "groupBy": [
      "SERVICE"
    ]
  }
}
Expected outputjson
{
  "summary": {
    "selectedCount": 2,
    "examinedCount": 2,
    "groupCount": 2,
    "skippedUnselectedCount": 0,
    "parseErrorCount": 0,
    "truncated": false
  },
  "groups": [
    {
      "groupKey": "75e31cdf1ce3b03b",
      "keyParts": [
        {
          "value": "",
          "present": true,
          "role": "SERVICE"
        }
      ],
      "count": 1,
      "firstSeenLine": 1,
      "lastSeenLine": 1,
      "keyTruncated": false
    },
    {
      "groupKey": "0788d0f936d5054e",
      "keyParts": [
        {
          "value": "",
          "present": false,
          "role": "SERVICE"
        }
      ],
      "count": 1,
      "firstSeenLine": 2,
      "lastSeenLine": 2,
      "keyTruncated": false
    }
  ]
}
Tip
A missing field is a value rather than an absence, so it never merges with a field that is present and empty.
  • Find the handful of distinct error classes hiding behind ten thousand lines
  • Collapse per-request ids out of error messages so the real classes stand out

Avoid for

  • Grouping messages that share no exact field after normalisation
  • Extracting frames from a stack trace

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

analysislogsobservabilitygrouping