Integrations · Logs

Log subscriptions

Stream structured logs from your stack into Nightlamp. Each line is fingerprinted into the same Issue queue as your SDK events — a Kubernetes panic and a Sentry exception with the same root cause group together.

How do I ship Kubernetes logs to Nightlamp?

Point your log shipper's Loki push client at Nightlamp. We accept the standard Loki push API; no custom protocol. Promtail 2.7+ (Oct 2022) or Grafana Alloy required — earlier versions silently drop the headers map.

Promtail clients[] block

clients:
  - url: https://api.nightlamp.app/api/loki/api/v1/push
    headers:
      X-Nightlamp-App-Id: <your-app-id>
      X-Nightlamp-Dsn-Key: <your-dsn-key>
Pick a deep guide for your shipper:
  • Fluent Bit on Kubernetes — full DaemonSet walkthrough with RBAC, ConfigMap, opt-in label, and healthcheck filtering.
  • Promtail on Kubernetes — Grafana's classic Loki agent with scrape_configs and pipeline stages.
  • Vector to Nightlamp — Vector's kubernetes_logs source through a Loki sink (also works for journald, syslog, file).
  • Grafana Alloy — Promtail's successor, River-syntax config, includes a Promtail → Alloy migration table.

How do I subscribe AWS CloudWatch Logs?

Register a CloudWatch log group on the integrations page, then add a subscription filter on your side that targets Nightlamp's log-subscriber Lambda. Each delivered event is fingerprinted and routed to your app's Issue queue.

Run in the AWS account that owns the log group

aws logs put-subscription-filter \
  --log-group-name <your-log-group> \
  --filter-name nightlamp \
  --filter-pattern '' \
  --destination-arn <nightlamp-log-subscriber-arn>
Cross-account log groups. If your log group lives in a different AWS account, your subscription filter can't invoke our Lambda directly — set up a CloudWatch Logs Destination in our account that your filter targets instead. See AWS docs → "CloudWatch Logs Destinations".

How do I configure a log subscription on my app?

Both flows live on each app's Integrations page — the snippets there pre-fill with your actual app ID and the operator-configured Lambda ARN. Open Getting started first if you don't have an app registered yet.