Skip to content

feat: add dynamic target support - #1336

Open
ylighgh wants to merge 1 commit into
percona:mainfrom
ylighgh:feat/dynamic-targets
Open

feat: add dynamic target support#1336
ylighgh wants to merge 1 commit into
percona:mainfrom
ylighgh:feat/dynamic-targets

Conversation

@ylighgh

@ylighgh ylighgh commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • add a /probe endpoint for MongoDB targets supplied at scrape time
  • load credentials and TLS options from named YAML auth modules
  • reject credentials, paths, and query parameters in dynamic targets
  • redact credentials from connection URI logs
  • document dynamic target configuration and the new --config.file flag

Testing

  • make format
  • go test -tags gssapi -count=1 . -run '^Test(LoadAuthConfig|LoadAuthConfigRejectsInvalidModule|BuildDynamicURI|ResolveAuthModule|ValidateTargetConfiguration|DynamicTargetFactoryRejectsUnknownModule|RedactMongoURI)$'
  • go test -tags gssapi -count=1 ./exporter -run '^Test(DynamicTarget|DynamicTargetValidation|DynamicOnlyServer|ServerRequiresStaticOrDynamicTarget)$'
  • go build .
  • go run .github/check-license.go

The full integration suite requires the repository's MongoDB Docker sandbox; GitHub Actions runs that matrix.

Reviewer notes

The dynamic exporter handlers are cached by auth module and target so repeated Prometheus scrapes reuse MongoDB clients.

@ylighgh
ylighgh requested a review from a team as a code owner August 5, 2026 06:56
@ylighgh
ylighgh requested review from ademidoff and maxkondr and removed request for a team August 5, 2026 06:56
@it-percona-cla

it-percona-cla commented Aug 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ylighgh
ylighgh force-pushed the feat/dynamic-targets branch from fcb9899 to 50da951 Compare August 5, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants