For AI agents: the complete documentation index is available at /hclapi/llms.txt, the full documentation bundle is available at /hclapi/llms-full.txt, and this page is available as Markdown at /hclapi/docs/manifest/telemetry.md.

telemetry

The telemetry block configures structured access logging, service names for distributed tracing, and sensitive attribute redaction.

telemetry {
  service_name = "store-api"
  log_level    = "info"
  log_format   = "json"
  redact = [
    "password",
    "authorization",
    "x-api-key",
    "credit_card"
  ]
}

Attributes

AttributeTypeDefaultDescription
service_namestring""Service identifier attached to OpenTelemetry spans and logs
log_levelstring"info"Minimum log level: "debug", "info", "warn", or "error"
log_formatstring"text"Log encoding format: "json" or "text"
redactlist[]Sensitive key names or headers to scrub from log output

Automatic field redaction

When keys matching the redact list appear in request attributes, headers, or log statements, hclapi replaces their values with "[REDACTED]" before writing the log record:

{
  "time": "2026-09-18T12:00:00Z",
  "level": "INFO",
  "msg": "http_request",
  "path": "/users",
  "status": 200,
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "span_id": "00f067aa0ba902b7"
}