DataDog / integrations-core

Core integrations of the Datadog Agent
BSD 3-Clause "New" or "Revised" License
937 stars 1.41k forks source link

SQLServer: Add lookback_window param. #18979

Closed amw-zero closed 1 week ago

amw-zero commented 1 week ago

What does this PR do?

Adds a lookback_window param to query_metrics.

Motivation

The current lookback window defaults to 2 times the collection interval, and is not able to be overridden. This means that infrequently-run queries are unlikely to have metrics captured for them. One common use case that falls into this bucket is ETL queries which can run hourly or even daily. These have a very small chance of having metrics captured for them. In that case, we will support setting a lookback window that will include such queries.

Review checklist (to be filled by reviewers)

github-actions[bot] commented 1 week ago

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.87%. Comparing base (0ca918c) to head (3cdc1fe). Report is 109 commits behind head on master.

Additional details and impacted files | [Flag](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [activemq](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [cassandra](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [hive](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [hivemq](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [ignite](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [jboss_wildfly](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [kafka](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [presto](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [solr](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `?` | | | [sqlserver](https://app.codecov.io/gh/DataDog/integrations-core/pull/18979/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `91.10% <100.00%> (+11.36%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#carryforward-flags-in-the-pull-request-comment) to find out more.
github-actions[bot] commented 1 week ago

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

github-actions[bot] commented 1 week ago

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

github-actions[bot] commented 1 week ago

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.