Skip to content
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

tracer: report config-change telemetry in dynamic config #2350

Merged
merged 6 commits into from
Nov 16, 2023

Conversation

ahmed-mez
Copy link
Contributor

@ahmed-mez ahmed-mez commented Nov 14, 2023

What does this PR do?

AIT-8580

Report configuration changes applied via dynamic configuration. This required some refactoring of the current dynamicConfig implementation with an intent to keep it as generic as possible.
More logic was added to avoid unnecessary reconfigurations and unnecessary (or inaccurate) config change telemetry events in case of an attempt to reconfigure the same value.

This what an example payload looks like

{"api_version":"v2","request_type":"app-client-configuration-change","tracer_time":1699955789,"runtime_id":"9d6b96e5-6d6f-4d33-92e8-756b31d69776","seq_id":3,"debug":false,"payload":{"configuration":[{"name":"trace_sample_rate","value":0.7,"origin":"remote_config","error":{"code":0,"message":""},"is_overridden":false}]},"application":{"service_name":"my.go.service","env":"staging","service_version":"v1","tracer_version":"v1.57.0-dev","language_name":"go","language_version":"go1.20.5","runtime_name":"","runtime_version":""},"host":{"hostname":"REDACTED","os":"darwin","os_version":"13.6","architecture":"arm64","kernel_name":"","kernel_release":"","kernel_version":""}}

Motivation

Bette UX for dynamic config: the reported active configuration will be shown on the UI.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.

For Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@ahmed-mez ahmed-mez requested a review from a team as a code owner November 14, 2023 09:28
@ahmed-mez ahmed-mez requested a review from a team November 14, 2023 09:28
@pr-commenter
Copy link

pr-commenter bot commented Nov 14, 2023

Benchmarks

Benchmark execution time: 2023-11-16 08:38:33

Comparing candidate commit 759226d in PR branch ahmed/dynamic-config-part4 with baseline commit bd47d89 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 40 metrics, 1 unstable metrics.

@ahmed-mez ahmed-mez force-pushed the ahmed/dynamic-config-part4 branch 3 times, most recently from 0e17d68 to 7e831ce Compare November 15, 2023 13:25
@ahmed-mez ahmed-mez force-pushed the ahmed/dynamic-config-part4 branch 4 times, most recently from aef3e97 to 77da294 Compare November 15, 2023 14:03
ddtrace/tracer/remote_config.go Outdated Show resolved Hide resolved
ddtrace/tracer/rules_sampler.go Show resolved Hide resolved
ddtrace/tracer/dynamic_config.go Show resolved Hide resolved
@ahmed-mez ahmed-mez merged commit 6ae85ec into main Nov 16, 2023
51 checks passed
@ahmed-mez ahmed-mez deleted the ahmed/dynamic-config-part4 branch November 16, 2023 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants