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

Telemetry:add app-client-configuration-change event #2977

Merged
merged 3 commits into from
Jul 20, 2023
Merged

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Jul 18, 2023

This PR adds the telemetry event app-client-configuration-change, which reports that configuration at the Client Library (ddtrace) has changed.
This event captures the changes themselves and a change source (called origin in the event).

The first use case is reporting changes from Dynamic Configuration. These have the origin remote_config.
The changes are a list of 2-tuples (List<String, Integer | Boolean | String>) representing the configuration that was just set.

One thing to noticed is that app-client-configuration-change is a Telemetry V2 event, but ddtrace currently implements Telemetry V1.
To aid with the migration to V2, the Datadog backend supports a few V2 events through the V1 pipeline. This is one of them.

This PR does not actually report the new event, only creates the API to trigger this event.

This event is crucial to Dynamic Configuration because it reports back to Datadog that the changes have been applied successfully to the current Ruby process.

@marcotc marcotc self-assigned this Jul 18, 2023
@marcotc marcotc requested a review from a team July 18, 2023 05:31
@marcotc marcotc added the dev/internal Other internal work that does not need to be included in the changelog label Jul 18, 2023
@github-actions github-actions bot added the core Involves Datadog core libraries label Jul 18, 2023
@marcotc marcotc removed the core Involves Datadog core libraries label Jul 18, 2023
@github-actions github-actions bot added the core Involves Datadog core libraries label Jul 18, 2023
Copy link
Member

@GustavoCaso GustavoCaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments but overall LGTM

@marcotc
Copy link
Member Author

marcotc commented Jul 20, 2023

Thank you, @GustavoCaso!

@marcotc marcotc added this to the 1.13.0 milestone Jul 20, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2977 (2e71557) into master (544615c) will decrease coverage by 0.01%.
The diff coverage is 98.13%.

@@            Coverage Diff             @@
##           master    #2977      +/-   ##
==========================================
- Coverage   98.09%   98.08%   -0.01%     
==========================================
  Files        1301     1305       +4     
  Lines       72574    72672      +98     
  Branches     3365     3368       +3     
==========================================
+ Hits        71189    71283      +94     
- Misses       1385     1389       +4     
Impacted Files Coverage Δ
spec/datadog/core/telemetry/client_spec.rb 95.32% <91.66%> (-0.60%) ⬇️
lib/datadog/core/telemetry/client.rb 93.18% <100.00%> (+0.49%) ⬆️
lib/datadog/core/telemetry/emitter.rb 100.00% <100.00%> (ø)
lib/datadog/core/telemetry/event.rb 100.00% <100.00%> (ø)
...re/telemetry/v2/app_client_configuration_change.rb 100.00% <100.00%> (ø)
lib/datadog/core/telemetry/v2/request.rb 100.00% <100.00%> (ø)
spec/datadog/core/telemetry/emitter_spec.rb 100.00% <100.00%> (ø)
spec/datadog/core/telemetry/event_spec.rb 100.00% <100.00%> (ø)
...lemetry/v2/app_client_configuration_change_spec.rb 100.00% <100.00%> (ø)
spec/datadog/core/telemetry/v2/request_spec.rb 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@marcotc marcotc merged commit c0fc32e into master Jul 20, 2023
@marcotc marcotc deleted the telemetry-rc branch July 20, 2023 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries dev/internal Other internal work that does not need to be included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants