Skip to content

Make SQL Server database_metrics.instance_metrics.enabled gate collection - #24953

Merged
jasonmp85 merged 5 commits into
masterfrom
jmp/sqlserver-3b-inert-instance-metrics
Aug 25, 2026
Merged

Make SQL Server database_metrics.instance_metrics.enabled gate collection#24953
jasonmp85 merged 5 commits into
masterfrom
jmp/sqlserver-3b-inert-instance-metrics

Conversation

@jasonmp85

@jasonmp85 jasonmp85 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes database_metrics.instance_metrics.enabled actually gate instance metric collection, and marks the legacy include_instance_metrics option as deprecated in favor of it.

Measured effect

Three configurations against the same bench instance, expected fan-out 1,400 samples:

configuration master samples this PR
instance_metrics.enabled: true 1,477 878
instance_metrics.enabled: false 1,477 (no effect) 0
legacy include_instance_metrics: false 1,400 0

The documented option goes from inert to working. On master, setting it to false produced byte-identical output to setting it to true; on this branch it emits zero samples and zero residual metric names. The legacy option continues to work, so nobody's existing configuration changes meaning.

Motivation

The documented switch is currently inert. A user following the current documentation to turn instance metrics off gets no effect and no warning — the check keeps collecting and they keep paying for it, with nothing in the logs to suggest the option was ignored.

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

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Tests  Code Coverage

All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 91.10%

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 872cd40 | Docs | View more details | Give us feedback!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3588c7500a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sqlserver/assets/configuration/spec.yaml
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 21, 2026

Copy link
Copy Markdown

evalya-impact-summary

evalya impact analysis
Impact analysis: RUN-ALL — every test task will run
Trigger:         empty diff (default branch, scheduled run, or shallow-clone fallback)
Test tasks:      0 (all selected)
Publish tasks:   2 (always emitted)
Diff:            empty (no diff information)

Learn more about CI impact filtering

@jasonmp85
jasonmp85 force-pushed the jmp/sqlserver-3b-inert-instance-metrics branch 2 times, most recently from 4df358c to 9f66892 Compare August 24, 2026 18:36
@jasonmp85
jasonmp85 force-pushed the jmp/sqlserver-3b-inert-instance-metrics branch from 9f66892 to db824b6 Compare August 25, 2026 15:46
@jasonmp85 jasonmp85 added qa/skip-qa Automatically skip this PR for the next QA and removed qa/required QA is required for this PR and will generate a QA card labels Aug 25, 2026
Comment thread sqlserver/assets/configuration/spec.yaml Outdated
azhou-datadog
azhou-datadog previously approved these changes Aug 25, 2026
@temporal-github-worker-1
temporal-github-worker-1 Bot dismissed azhou-datadog’s stale review August 25, 2026 19:06

Review from azhou-datadog is dismissed. Related teams and files:

  • database-monitoring-agent
    • sqlserver/assets/configuration/spec.yaml
    • sqlserver/datadog_checks/sqlserver/config_models/deprecations.py
    • sqlserver/datadog_checks/sqlserver/data/conf.yaml.example
    • sqlserver/tests/test_unit.py
@dd-octo-sts

dd-octo-sts Bot commented Aug 25, 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

@jasonmp85
jasonmp85 enabled auto-merge August 25, 2026 19:13
@jasonmp85
jasonmp85 added this pull request to the merge queue Aug 25, 2026
Merged via the queue into master with commit 971dbec Aug 25, 2026
105 checks passed
@jasonmp85
jasonmp85 deleted the jmp/sqlserver-3b-inert-instance-metrics branch August 25, 2026 19:25
@dd-octo-sts dd-octo-sts Bot added this to the 7.83.0 milestone Aug 25, 2026
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.

3 participants