-
Notifications
You must be signed in to change notification settings - Fork 45
feat: Correct FIPS-mode metrics #588
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
feat: Correct FIPS-mode metrics #588
Conversation
This is now supported by both the go extension and bottlecap, so we can safely send metrics to the extension and not have to ship the ones with timestamps directly to the Datadog API.
Probably easiest to review this one commit at a time. |
|
||
|
||
metrics_handler = _select_metrics_handler() | ||
logger.debug("identified primary metrics handler as %s", metrics_handler) |
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 would be nice to fire off a metric here, similar to the way we do for dynamodb stream settings. but since the most interesting value, NO_METRICS
would actually be unavailable, i chose not to do this. let me know if you think we should still send the metric anyway, despite the NO_METRICS
blind spot.
confirmed that this is working as expected across the following combinations:
(all of the above correctly send metrics with and without timestamps) the no extension and no forwarder case in fipsish mode does not send metrics as expected. |
if extension_thread_stats is not None: | ||
tags = None | ||
if lambda_context is not None: | ||
tags = get_enhanced_metrics_tags(lambda_context) |
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.
Are we using the get_enhanced_metrics_tags
again? Or else this would be breaking?
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.
we still use it as part of the submit_enhanced_metric
call. but the extension_thread_stats
was never None
with the changes i put in and thus this code was not being called anymore anyway. this get function have important side effects we need to bring back somewhere?
d1acc58
to
f187a1b
Compare
dogstatsd
client now supports timestamps for the metrics that it will send.DD_LAMBDA_FIPS_MODE
flag which allows FIPS-mode logic to be enabled in commercial regions or disabled in govcloud regions.Breaking Change
Since the
DD_LAMBDA_FIPS_MODE
defaults totrue
in govcloud, direct metrics submission there (without an Extension or a Forwarder) will now be disabled.Testing Guidelines
Unit tests were added or updated. Also confirmed with test apps that this logic works as expected.
Types of Changes
Check all that apply