-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix resources not sent on service check metrics #14422
Conversation
_assert_complex_config( | ||
aggregator, | ||
[tags.DATABASE_INSTANCE_RESOURCE_TAG.format(hostname='stubbed.hostname')], | ||
tags.SC_TAGS + [tags.DATABASE_INSTANCE_RESOURCE_TAG.format(hostname='stubbed.hostname')], | ||
tags.METRIC_TAGS_WITH_RESOURCE, |
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.
it looks like this is asserting that the dd.resource.database_instance:*
would be in this array twice? I am assuming the test case normalizes the tag set somewhere and not that the tags would show up twice?
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.
Nah, the array only includes the internal resource tag once. tags.SC_TAGS
omits the internal tag because it had to be a formatted string depending on the hostname.
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.
tags.METRIC_TAGS_WITH_RESOURCE
includes it, though. Am i just reading this diff incorrectly?
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.
It does but one of those parameters is the service check tags and the other is the metric tags. They had to be separated because service check tags will include the internal resource tag even in the end to end case while metrics won't have the internal tags (because it gets transformed into actual resources on metrics).
What does this PR do?
While taking over PR 14333, I made the wrong call when addressing the end to end test failure related to the internal resource tags. Instead of removing the resources from service checks that we emit, we actually want to keep the resource tags so that the service check metrics like
check_run.postgres.can_connect.ok
have resources set on them.Motivation
Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attachedqa/skip-qa
label.