-
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
Make OpenMetrics use the RequestsWrapper #5414
Conversation
Codecov Report
|
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.
Awesome if all CI pass.
Left few comments.
datadog_checks_base/datadog_checks/base/checks/openmetrics/base_check.py
Outdated
Show resolved
Hide resolved
datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py
Outdated
Show resolved
Hide resolved
datadog_checks_base/datadog_checks/base/checks/openmetrics/base_check.py
Outdated
Show resolved
Hide resolved
'ssl_cert': {'name': 'tls_cert'}, | ||
'ssl_private_key': {'name': 'tls_private_key'}, | ||
'ssl_ca_cert': {'name': 'tls_ca_cert'}, | ||
'prometheus_timeout': {'name': 'timeout'}, |
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.
Mean we need to update all integrations config examples?
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.
Yes, though they'd still work of course so no rush
datadog_checks_base/datadog_checks/base/checks/openmetrics/base_check.py
Outdated
Show resolved
Hide resolved
Codecov Report
|
if bearer_token is not None: | ||
headers['Authorization'] = 'Bearer {}'.format(bearer_token) | ||
|
||
# TODO: Determine if we really need this |
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.
Determine if we really need this
Can we determine now? What's needed to answer this question? :)
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.
datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py
Outdated
Show resolved
Hide resolved
datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py
Outdated
Show resolved
Hide resolved
datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py
Outdated
Show resolved
Hide resolved
if self._client_token_path: | ||
self.renew_client_token() | ||
else: | ||
self.set_client_token(self._client_token) |
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.
Why changes are needed in vault
?
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 had to do with where create_scraper_configuration
was called
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.
I mean, why
Actually, I’m not sure, why
if self._client_token_path:
self.renew_client_token()
has been moved inside the `if condition` old line 232.
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.
renew_client_token
calls set_client_token
, set_client_token
updates self.http_handlers[self._scraper_config['prometheus_url']
, prometheus_url
wasn't set until next block
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.
🏅
* Make OpenMetrics use the RequestsWrapper * fix crio * fix kube_controller_manager * fix kube_metrics_server * fix kube_proxy * fix kube_scheduler * fix linkerd * fix nginx_ingress_controller * fix openmetrics * refactor * final refactor * fix headers * fix kubelet * add note * address reviews
Motivation
Standardize config for all checks