agentcrumbs

Environment variable

Configure agentcrumbs with the AGENTCRUMBS env var

Everything is controlled by a single AGENTCRUMBS environment variable.

Shorthand values

ValueEffect
1Enable all namespaces
*Enable all namespaces
trueEnable all namespaces
(unset)Disabled. All calls are noop.
AGENTCRUMBS=1 node your-app.js

Namespace filter

Non-JSON string values are treated as namespace filters:

AGENTCRUMBS=auth-*           # Wildcard match
AGENTCRUMBS=auth-service     # Exact match

JSON config

For full control, pass a JSON object:

# Enable specific namespaces
AGENTCRUMBS='{"ns":"auth-*,api-*"}'

# With exclusions
AGENTCRUMBS='{"ns":"* -internal-*"}'

# Custom port
AGENTCRUMBS='{"ns":"*","port":9999}'

# JSON output format (instead of pretty)
AGENTCRUMBS='{"ns":"*","format":"json"}'

Config schema

FieldTypeDefaultDescription
nsstring(required)Namespace filter pattern
portnumber8374Collector HTTP port
format"pretty" | "json""pretty"Output format for stderr

Namespace patterns

  • * matches everything
  • auth-* matches auth-service, auth-oauth, etc.
  • auth-*,api-* matches multiple patterns (comma or space separated)
  • * -internal-* matches everything except namespaces starting with internal-

On this page