-
Notifications
You must be signed in to change notification settings - Fork 814
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
Report SQL server correctly #1069
Conversation
The use may be limited because the metrics to collect are not specified on a per instance basis but between different versions of SQL Server, the method of collection may be different
type should not be used anymore because we based the choice on the db content
) | ||
try: | ||
cursor.execute(''' | ||
select distinct counter_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use a constant for that instead of having the query in the middle of the code ?
Nice work Rudy 👍 |
Constantify the query and remove use of type keyword
# | ||
# - name: sqlserver.clr.execution | ||
# type: gauge | ||
# counter_name: CLR Execution | ||
# | ||
# This counter has multiple instances assocaited with it and we're |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the "assocaited" while you're there ? :)
Fixes for the problem that @tmichelet was trying to fix with #968.
What the issue is: Most of the metrics we report from SQL Server are not reported correctly
How to fix it: Microsoft documentation explains how to do it properly. Each counter has associated with him a value
cntr_type
explaining how to report it. We can read this value and report the metric accordingly. This is preferred to setting the report method in advance because some metrics may change type between different verisons / OSImplementation info: In order to not break existing setup of users, the "type" (rate, gauge, histogram) attributes in the config is supported and overwrite any determination that we do ourselves.
@tmichelet @conorbranagan if you want to take a look.