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 sqlserver deadlock data #18108

Merged
merged 92 commits into from
Sep 27, 2024
Merged

Collect sqlserver deadlock data #18108

merged 92 commits into from
Sep 27, 2024

Conversation

kozlovb
Copy link
Contributor

@kozlovb kozlovb commented Jul 23, 2024

What does this PR do?

Adds SQLServer deadlock data collection.

Motivation

Requested by various customers (DBMON-4445).

Limitation

In the first iteration, we only support odbc driver because adodb doesn't correctly map the xml data type. I'll immediately start working on a solution, but let's not block this PR.

Test case:

import adodbapi

connection_string = "Provider=MSOLEDBSQL19;Server=localhost;UID=datadog;PWD=datadog;Use Encryption for Data=Optional;"
conn = adodbapi.connect(connection_string)
cursor = conn.cursor()
query = "SELECT CAST('<root><element>Sample Value</element></root>' AS XML) AS DummyXML;"

cursor.execute(query)

adodbapi.apibase.InternalError: Data column of Unknown ADO type=141

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.
  • 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

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 86.30573% with 43 lines in your changes missing coverage. Please review.

Project coverage is 89.37%. Comparing base (c14b128) to head (33ce257).
Report is 2 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
active_directory ?
activemq ?
activemq_xml ?
aerospike ?
airflow ?
amazon_msk ?
ambari ?
apache ?
appgate_sdp ?
arangodb ?
argo_rollouts ?
argo_workflows ?
argocd ?
aspdotnet ?
avi_vantage ?
aws_neuron ?
azure_iot_edge ?
boundary ?
btrfs ?
cacti ?
calico ?
cassandra ?
cassandra_nodetool ?
ceph ?
cert_manager ?
cilium ?
cisco_aci ?
citrix_hypervisor ?
clickhouse ?
cloud_foundry_api ?
cloudera ?
cockroachdb ?
consul ?
coredns ?
couch ?
couchbase ?
crio ?
datadog_checks_base ?
datadog_checks_dev ?
datadog_checks_downloader ?
datadog_cluster_agent ?
dcgm ?
ddev ?
directory ?
disk ?
dns_check ?
dotnetclr ?
druid ?
ecs_fargate ?
eks_fargate ?
elastic ?
envoy ?
esxi ?
etcd ?
exchange_server ?
external_dns ?
fluentd ?
fluxcd ?
fly_io ?
foundationdb ?
gearmand ?
gitlab ?
gitlab_runner ?
glusterfs ?
go_expvar ?
gunicorn ?
haproxy ?
harbor ?
hazelcast ?
hdfs_datanode ?
hdfs_namenode ?
hive ?
hivemq ?
http_check ?
ibm_ace ?
ibm_db2 ?
ibm_i ?
ibm_mq ?
ibm_was ?
ignite ?
iis ?
impala ?
istio ?
jboss_wildfly ?
kafka ?
kafka_consumer ?
karpenter ?
kong ?
kube_apiserver_metrics ?
kube_controller_manager ?
kube_dns ?
kube_metrics_server ?
kube_proxy ?
kube_scheduler ?
kubeflow ?
kubelet ?
kubernetes_cluster_autoscaler ?
kubernetes_state ?
kubevirt_api ?
kubevirt_controller ?
kyototycoon ?
kyverno ?
lighttpd ?
linkerd ?
linux_proc_extras ?
mapr ?
mapreduce ?
marathon ?
marklogic ?
mcache ?
mesos_master ?
mesos_slave ?
mongo ?
mysql ?
nagios ?
network ?
nfsstat ?
nginx ?
nginx_ingress_controller ?
nvidia_triton ?
openldap ?
openmetrics ?
openstack ?
openstack_controller ?
pdh_check ?
pgbouncer ?
php_fpm ?
postfix ?
postgres ?
powerdns_recursor ?
presto ?
process ?
prometheus ?
proxysql ?
pulsar ?
rabbitmq ?
ray ?
redisdb ?
rethinkdb ?
riak ?
riakcs ?
sap_hana ?
scylla ?
silk ?
singlestore ?
snmp ?
snowflake ?
solr ?
sonarqube ?
spark ?
sqlserver 89.34% <86.30%> (+9.51%) ⬆️
squid ?
ssh_check ?
statsd ?
strimzi ?
supervisord ?
system_core ?
system_swap ?
tcp_check ?
teamcity ?
tekton ?
teleport ?
temporal ?
teradata ?
tibco_ems ?
tls ?
tokumx ?
torchserve ?
traefik_mesh ?
traffic_server ?
twemproxy ?
twistlock ?
varnish ?
vault ?
vertica ?
vllm ?
voltdb ?
vsphere ?
weaviate ?
win32_event_log ?
windows_performance_counters ?
windows_service ?
wmi_check ?
yarn ?
zk ?

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

lu-zhengda
lu-zhengda previously approved these changes Aug 6, 2024
sqlserver/datadog_checks/sqlserver/queries.py Outdated Show resolved Hide resolved
sqlserver/datadog_checks/sqlserver/deadlocks.py Outdated Show resolved Hide resolved
sqlserver/datadog_checks/sqlserver/activity.py Outdated Show resolved Hide resolved
Copy link

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

1 similar comment
Copy link

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

@kozlovb kozlovb changed the title Creating a test for the deadlock [DBMON-4404] Collect sqlserver deadlock data Aug 21, 2024
Copy link

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

@kozlovb kozlovb changed the title [DBMON-4404] Collect sqlserver deadlock data Collect sqlserver deadlock data Aug 21, 2024
Copy link

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

1 similar comment
Copy link

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

Copy link

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

@nenadnoveljic nenadnoveljic self-assigned this Sep 3, 2024
Copy link

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

1 similar comment
Copy link

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

Copy link

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

2 similar comments
Copy link

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

Copy link

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

@nenadnoveljic nenadnoveljic merged commit 0eac087 into master Sep 27, 2024
39 checks passed
@nenadnoveljic nenadnoveljic deleted the BorisKozlov-Deadlocks branch September 27, 2024 14:05
@nenadnoveljic nenadnoveljic added the qa/skip-qa Automatically skip this PR for the next QA label Sep 27, 2024
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.

6 participants