-
Notifications
You must be signed in to change notification settings - Fork 394
DEBUG-3573 send AppClientConfigurationChange telemetry event when subsequent telemetry instances start #4678
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
Merged
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
93a7bfc
state management
p a1f1d50
state management
p 21fe6b7
hmm
p f596b22
update documentation to match reality
p cc85634
do not lose events
p ce38a92
remove redundant checks
p ca980f0
changing to initial event
p d396fec
fixing
p dee2aa6
note
p 92bf75b
initial events
p 7067e65
fake event
p 7446a11
type
p 381eec1
rename to synth
p 71301b7
use synth event
p 22d4453
fix
p b6df901
tests
p ae70584
synth event test
p cc45401
class -> module
p a9eccfb
no longer applicable
p 6f9b391
rubocop -> standard migration
p ae6bd7e
new tests
p 7ce6381
fix dep test
p db1c9f9
not needed
p 7bb70fe
return not needed
p 6fa986c
remove
p d40409d
fix test
p 0f90a11
fix test
p 8890454
send once
p 21344c8
avoid warning
p b367965
fix
p 8094955
cleanup
p a5ba0bd
cleanup
p 02351fc
rbs
p 1ca3983
types
p ed5effb
integration test for the synth event
p 8dc11b5
repair diagnostics
p 4efb289
fix condition
p 4a9bab0
fix diagnostics
p 77cf010
fix condition for real
p 5b3e780
test dependency collection event
p b4ce0c1
fix
p 1df630d
standard
p 936007c
explain
p ae6a2a5
mark private
p b32a647
test early event submission
p 8196384
test retries of initial event
p 0023b94
remove debug
p e125340
Update lib/datadog/core/configuration/components_state.rb
p-datadog 9698dcb
fix
p e473898
make Components return their state
p d979725
di + telemetry integration test
p e158a34
add assertions to diagnose flakiness
p efe549b
use equal?
p a6c0d13
adjust logger for debugging
p 691971f
rubocop
p 85a9c78
retest
p 932e02c
Merge branch 'master' into telemetry-lifecycle
p-datadog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
module Datadog | ||
module Core | ||
module Configuration | ||
# Stores the state of component tree when replacing the tree. | ||
class ComponentsState | ||
def initialize(telemetry_enabled:, remote_started:) | ||
@telemetry_enabled = !!telemetry_enabled | ||
@remote_started = !!remote_started | ||
end | ||
|
||
def telemetry_enabled? | ||
@telemetry_enabled | ||
end | ||
|
||
def remote_started? | ||
@remote_started | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
lib/datadog/core/telemetry/event/synth_app_client_configuration_change.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'base' | ||
|
||
module Datadog | ||
module Core | ||
module Telemetry | ||
module Event | ||
# app-client-configuration-change event emitted instead of | ||
# app-started event for telemetry startups other than the initial | ||
# one in a process. | ||
# | ||
# dd-trace-rb generally creates a new component tree whenever | ||
# the tracer is reconfigured via Datadog.configure (with some | ||
# components potentially reused, if their configuration has not | ||
# changed). Telemetry system tests on the other hand expect there | ||
# to be one "tracer" per process, and do not permit multiple | ||
# app-started events to be emitted. | ||
# | ||
# To resolve this conflict, we replace second and onward app-started | ||
# events with app-client-configuration-change events. | ||
# To avoid diffing configuration, we send all parameters that are | ||
# sent in app-started event. | ||
# | ||
# It's a "quick fix" on top of a not-so-quick fix that omitted | ||
# second and subsequent app-started (and app-closing) events in the | ||
# first place, and only works with the existing hackery of app-started | ||
# and app-closing events. | ||
class SynthAppClientConfigurationChange < AppStarted | ||
def type | ||
'app-client-configuration-change' | ||
end | ||
|
||
def payload | ||
{ | ||
configuration: configuration, | ||
} | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.