Skip to content

kong: add container-based config discovery support#24318

Draft
vitkyrka wants to merge 2 commits into
masterfrom
kong-discovery
Draft

kong: add container-based config discovery support#24318
vitkyrka wants to merge 2 commits into
masterfrom
kong-discovery

Conversation

@vitkyrka

@vitkyrka vitkyrka commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds container-based config discovery support to the kong integration. When the Datadog Agent detects a container with the kong AD identifier, it probes the container's exposed ports — starting with 8001 if it is among them — until it finds the metrics endpoint, then schedules an OpenMetrics check against it automatically — no manual conf.yaml needed.

Both the legacy and OpenMetrics modes are probed — see the two candidates in the discovery: block.

Endpoint availability: Since Kong 2.8, the Admin API exposes /metrics natively without requiring the Prometheus plugin to be explicitly enabled, which is why the OpenMetrics candidate works against the standard, unmodified kong container.

Motivation

Part of DSCVR-485. Follows the same pattern established by the krakend integration.

Port selection rationale: Port 8001 is Kong's default Admin API port, which exposes both the OpenMetrics /metrics endpoint and the legacy /status/ endpoint (confirmed by the KONG_ADMIN_LISTEN default in the test environment and the integration's own conf.yaml.example default of http://localhost:8001/metrics).

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Adds a discovery strategy and auto_conf.yaml entry so the Agent can
automatically discover and configure Kong containers, covering both the
OpenMetrics and legacy status-endpoint modes.

Environment: Datadog workspace

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Environment: Datadog workspace

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dd-octo-sts

dd-octo-sts Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@datadog-datadog-prod-us1

Copy link
Copy Markdown
Contributor

Tests  Code Coverage

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 43.75%
Overall Coverage: 84.80% (-3.30%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4f29da8 | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant