Skip to main content

OpenTelemetry

Dhal can emit Dhal-specific telemetry hooks for request security decisions.

npm install @opentelemetry/api @rokadhq/dhal
import { createOtelTelemetry } from "@rokadhq/dhal/telemetry/otel";

Enable in config:

{
"observability": {
"otel": {
"enabled": true,
"serviceName": "api"
}
}
}

Suggested attributes

Dhal events should preserve security value while respecting redaction policy:

  • dhal.action
  • dhal.rule_id
  • dhal.severity
  • dhal.route
  • dhal.risk_score
  • dhal.rate_limit.remaining

Redaction

Use privacy-first redaction before forwarding events to shared systems.

{
"observability": {
"redaction": {
"enabled": true,
"ip": "mask",
"identity": "hash",
"userAgent": "full"
}
}
}