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

Collect stored procedure metrics from dm_exec_procedure_stats #15805

Merged
merged 25 commits into from
Sep 28, 2023

Conversation

joelmarcotte
Copy link
Contributor

@joelmarcotte joelmarcotte commented Sep 11, 2023

What does this PR do?

When DBM is enabled, starts collecting stored procedure metrics from sys.dm_exec_procedure_stats at 60s interval (configurable). Also adds the corresponding procedure_metrics section to the config file. The new DBM-only metrics are sqlserver.procedures.count, sqlserver.procedures.time, sqlserver.procedures.worker_time, sqlserver.procedures.physical_reads, sqlserver.procedures.logical_reads, sqlserver.procedures.logical_writes and sqlserver.procedures.spills.

image

Motivation

Improve the SQL Server monitoring posture of DBM (Database Monitoring) by adding stored procedure metrics to the collected telemetry.

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Changelog entries must be created for modifications to shipped code
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.

@joelmarcotte joelmarcotte changed the title stored procs Collect stored procedure metrics from dm_exec_procedure_stats Sep 11, 2023
@ghost ghost added the documentation label Sep 11, 2023
@github-actions
Copy link

github-actions bot commented Sep 11, 2023

Test Results

     18 files       18 suites   2h 43m 28s ⏱️
   250 tests    239 ✔️   11 💤 0
3 030 runs  2 777 ✔️ 253 💤 0

Results for commit 6f1157f.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #15805 (6f1157f) into master (99c0934) will decrease coverage by 0.05%.
Report is 21 commits behind head on master.
The diff coverage is 94.37%.

Flag Coverage Δ
confluent_platform ?
sqlserver 86.32% <94.37%> (-1.31%) ⬇️

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

@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
@DataDog DataDog deleted a comment from github-actions bot Sep 13, 2023
jmeunier28
jmeunier28 previously approved these changes Sep 25, 2023
'min_collection_interval': self.collection_interval,
'tags': self.tags,
'cloud_metadata': self.check.cloud_metadata,
'payload_type': 'procedure_metrics',
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a thought since we're at the stage where we can still consider changes: should we call this kind instead of payload_type? That's what we use for the metadata payloads and I was looking at this and thinking of adopting similar patterns for the new metric type.

@joelmarcotte joelmarcotte dismissed stale reviews from jmeunier28 and cswatt via 6f1157f September 27, 2023 16:05
@joelmarcotte joelmarcotte merged commit b820284 into master Sep 28, 2023
31 checks passed
@joelmarcotte joelmarcotte deleted the joel.marcotte/sprocs branch September 28, 2023 13:15
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.

5 participants