Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add current timestamp to SQLServer activity collection #10786

Merged
merged 2 commits into from Dec 3, 2021

Conversation

jmeunier28
Copy link
Contributor

@jmeunier28 jmeunier28 commented Dec 2, 2021

What does this PR do?

Follow up to this #10782, which added ISO timestamp formatting for tx begin and query start times. In the backend, we were calculating the difference based off the unix timestamp collected by the agent, but its possible for there to be drift between these two things. The most accurate calculation will only be possible if we collect the CURRENT_TIMESTAMP from the server itself

Motivation

DBM SQLServer Active Sessions beta feedback / Follow up PR from #10610

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@codecov
Copy link

codecov bot commented Dec 2, 2021

Codecov Report

Merging #10786 (2ba9e60) into master (eddd3aa) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Flag Coverage Δ
sqlserver 85.95% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@ -45,7 +45,7 @@ def dbm_instance(instance_docker):
def instance_sql_msoledb_dbm(instance_sql_msoledb):
instance_sql_msoledb['dbm'] = True
instance_sql_msoledb['min_collection_interval'] = 1
instance_sql_msoledb['query_metrics'] = {'enabled': True, 'run_sync': True, 'collection_interval': 0.1}
instance_sql_msoledb['query_metrics'] = {'enabled': True, 'run_sync': True, 'collection_interval': 2}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test_statement_metrics_and_plans_windows test has been super flakey with CI so I tried increasing the collection interval for this, which should allow us catch metrics in the test

@jmeunier28 jmeunier28 merged commit 5052de1 into master Dec 3, 2021
@jmeunier28 jmeunier28 deleted the jmeunier/moar-timestamps branch December 3, 2021 18:32
cswatt pushed a commit that referenced this pull request Jan 5, 2022
* Add current timestamp to SQLServer activity collection
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.

None yet

3 participants