Overview
Kong Gateway is an open-source API gateway that routes and secures traffic to your upstream services. kong-plugin-signoz is a Kong plugin built by SigNoz that ships traces and logs from Kong to SigNoz with minimal configuration.
- Traces — the plugin delegates trace export to Kong's bundled OpenTelemetry plugin and enriches Kong's root request span before export.
- Logs — the plugin produces one structured OTLP log record per request and ships it over its own OTLP/HTTP pipeline.
Prerequisites
- A SigNoz Cloud or Self-Hosted workspace
- Kong Gateway 3.6+ (open-source or Enterprise)
- Access to every Kong node's filesystem (to install the plugin's Lua sources)
Setup
Step 1: Install the plugin
Install the plugin's Lua sources on every Kong node via LuaRocks (LuaRocks page):
luarocks install kong-plugin-signoz
For all available config fields, see the configuration reference.
For other install routes (custom images, Kubernetes), see Kong's installation and distribution guide.
Step 2: Load the plugin in Kong
Add signoz to the loaded plugins in kong.conf (or via the KONG_PLUGINS environment variable) on every node:
plugins = bundled,signoz
Step 3: Enable Kong's tracer
The plugin enriches Kong's root request span before export, so Kong's tracer must be on. Set in kong.conf (or via environment variables):
tracing_instrumentations = all
tracing_sampling_rate = 1.0
See Kong's tracing reference for the full list of values. Without these settings, Kong exports no spans. Logs still ship; only traces depend on the tracer.
Restart Kong to pick up both the new plugin and the tracer settings.
Step 4: Enable the plugin
Enable the plugin globally on the gateway via Kong's Admin API:
curl -X POST http://localhost:8001/plugins \
--data "name=signoz" \
--data "config.exporter.endpoint=https://ingest.<region>.signoz.cloud:443" \
--data "config.exporter.key=<your-ingestion-key>" \
--data "config.resource.service_name=kong" \
--data "config.resource.deployment_environment=production" \
--data "config.logs.instrumentations=access"
Verify these values:
<region>: Your SigNoz Cloud region<your-ingestion-key>: Your ingestion key
curl -X POST http://localhost:8001/plugins \
--data "name=signoz" \
--data "config.exporter.endpoint=http://<your-collector-host>:4318" \
--data "config.resource.service_name=kong" \
--data "config.resource.deployment_environment=production" \
--data "config.logs.instrumentations=access"
Verify this value:
<your-collector-host>: Hostname or IP of your SigNoz OTel Collector
Scope the plugin per-service, per-route, or per-consumer using Kong's Admin API. See Kong's Plugin entity docs for scoping syntax.
Step 5: Verify in SigNoz
Send a request through Kong:
curl -i http://localhost:8000/<your-route>
In SigNoz:
- Services view shows
kongwith traffic. - Traces Explorer lists spans named
kongwith attributeskong.service.name,kong.route.name, and HTTP semconv fields. - Logs Explorer lists one record per request with body
"<METHOD> <path> <status> <duration>ms"and severity set by status class (2xx → INFO, 4xx → WARN, 5xx → ERROR).
If nothing arrives within 5 seconds, check Kong's error log for entries containing signoz. Exporter errors surface as queue signoz: (traces) and queue signoz:logs_access: (logs).
Troubleshooting
- No traces in SigNoz — confirm Kong's tracer is enabled (
tracing_instrumentationsset to a non-offvalue such asall,request, orrouter). Without it,ngx.ctx.KONG_SPANSstays empty and the plugin has no spans to enrich or export. Logs are unaffected. - No logs or traces — check Kong's error log for entries containing
signoz(queue signoz:for traces,queue signoz:logs_access:for logs). Exporter HTTP errors (wrong endpoint, wrong region, bad ingestion key) and queue drops surface there. - 401 or 403 errors — verify
config.exporter.keymatches your SigNoz ingestion key andconfig.exporter.endpointmatches your SigNoz Cloud region. - Plugin not loading — confirm
signozis in thepluginsdirective inkong.conf(orKONG_PLUGINSenv var) on every node, and that Kong was restarted after the change. - Self-hosted: connection refused — ensure your SigNoz OTel Collector is reachable from Kong and that the OTLP/HTTP port (default
4318) is open.
Next Steps
- Set up log-based alerts to get notified on error patterns in Kong access logs.
- Set up trace-based alerts on Kong latency or error rates.
- Create a dashboard to combine Kong traces and logs in a single view.
Get Help
If you need help with the steps in this topic, please reach out to us on SigNoz Community Slack.
If you are a SigNoz Cloud user, please use in product chat support located at the bottom right corner of your SigNoz instance or contact us at cloud-support@signoz.io.