-
Notifications
You must be signed in to change notification settings - Fork 3
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
[APR-278] Add config refresher to update API key #351
Conversation
lib/saluki-config/src/refresher.rs
Outdated
#[allow(unused)] | ||
pub async fn query_agent(&self) -> Result<(), GenericError> { | ||
let url = format!("https://localhost:5004/config/v1/"); | ||
let client = reqwest::ClientBuilder::new() |
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.
Using reqwest
here since I needed .danger_accept_invalid_certs
for the request to work.
The curl command i was trying to imitate was
curl -H "authorization: Bearer $(cat /etc/datadog-agent/auth/auth_token)" -k https://localhost:5004/config/v1/
Regression Detector (DogStatsD)Regression Detector ResultsRun ID: b430d5be-2203-49f9-be23-1309b4d7cdf2 Baseline: 7.59.0 Optimization Goals: ✅ No significant changes detected
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
➖ | dsd_uds_512kb_3k_contexts | ingress throughput | +0.00 | [-0.01, +0.01] | 1 | |
➖ | dsd_uds_1mb_50k_contexts_memlimit | ingress throughput | +0.00 | [-0.00, +0.00] | 1 | |
➖ | dsd_uds_100mb_250k_contexts | ingress throughput | +0.00 | [-0.00, +0.00] | 1 | |
➖ | dsd_uds_500mb_3k_contexts | ingress throughput | +0.00 | [-0.01, +0.01] | 1 | |
➖ | dsd_uds_1mb_50k_contexts | ingress throughput | +0.00 | [-0.00, +0.00] | 1 | |
➖ | dsd_uds_10mb_3k_contexts | ingress throughput | -0.00 | [-0.00, +0.00] | 1 | |
➖ | dsd_uds_1mb_3k_contexts | ingress throughput | -0.00 | [-0.00, +0.00] | 1 | |
➖ | dsd_uds_1mb_3k_contexts_dualship | ingress throughput | -0.00 | [-0.00, +0.00] | 1 | |
➖ | dsd_uds_100mb_3k_contexts | ingress throughput | -0.00 | [-0.04, +0.04] | 1 | |
➖ | dsd_uds_100mb_3k_contexts_distributions_only | memory utilization | -0.55 | [-0.76, -0.35] | 1 | |
➖ | quality_gates_idle_rss | memory utilization | -2.48 | [-2.60, -2.36] | 1 |
Bounds Checks: ❌ Failed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
❌ | quality_gates_idle_rss | memory_usage | 0/10 |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
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.
Left a bunch of comments.
lib/saluki-components/src/destinations/datadog_metrics/request_builder.rs
Outdated
Show resolved
Hide resolved
Regression Detector LinksExperiment Result Links
|
lib/saluki-components/src/destinations/datadog_metrics/endpoint/endpoints.rs
Outdated
Show resolved
Hide resolved
lib/saluki-components/src/destinations/datadog_metrics/endpoint/endpoints.rs
Outdated
Show resolved
Hide resolved
lib/saluki-components/src/destinations/datadog_metrics/endpoint/endpoints.rs
Outdated
Show resolved
Hide resolved
lib/saluki-components/src/destinations/datadog_metrics/endpoint/endpoints.rs
Show resolved
Hide resolved
lib/saluki-config/src/refresher.rs
Outdated
} | ||
|
||
fn default_agent_ipc_port() -> u64 { | ||
0 |
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.
Zero still doesn't make sense as a value for something we're connecting to, so we shouldn't specify a default port at all. This would let us bubble up an error when calling RefresherConfiguration::from_configuration
if agent_ipc_port
isn't set.
Probably have the code building the refreshable config in bin/agent-data-plane/src/main.rs
catch the error and report an INFO-level log that dynamic configuration refreshing will be unavailable due to not being configured, etc etc.
lib/saluki-config/src/refresher.rs
Outdated
/// | ||
/// Defaults to 15 seconds. | ||
#[serde( | ||
rename = "agent_config_refresh_internal_seconds", |
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.
Sorry for the flip-flopping here, but now that I see how we're aligning more with the agent_ipc
stuff in the Agent, I think we would actually want this to be agent_ipc_config_refresh_interval
, which would align with how it's used by the comp/core/configsync
component.
Context
We would like to receive configuration updates via the datadog-agent
config/v1
endpoint.Solution
This pr creates a new object
RefreshableConfiguration
that has a task that sends a request to the endpoint every15
seconds. This can be configured withrefresh_interval_seconds
.Notes
The
ResolvedEndpoint
will have an optionalRefreshableConfiguration
that they can use to get the api key.