Do not switch to agent telemetry client on detecting agent telemetry endpoint availability when intake client is preferred#6644
Merged
nikita-tkachenko-datadog merged 2 commits intomasterfrom Feb 9, 2024
Conversation
…endpoint availability when intake client is preferred
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 43 metrics, 11 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.30.0-SNAPSHOT~6913074b37, baseline=1.31.0-SNAPSHOT~80420afa01
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1057864
Total [baseline] (9.405 s) : 0, 9405376
Agent [candidate] (1.068 s) : 0, 1068087
Total [candidate] (9.423 s) : 0, 9422926
section appsec
Agent [baseline] (1.156 s) : 0, 1155669
Total [baseline] (9.463 s) : 0, 9463419
Agent [candidate] (1.156 s) : 0, 1155973
Total [candidate] (9.459 s) : 0, 9458606
section iast
Agent [baseline] (1.192 s) : 0, 1191679
Total [baseline] (9.72 s) : 0, 9720457
Agent [candidate] (1.185 s) : 0, 1185059
Total [candidate] (9.79 s) : 0, 9790379
section profiling
Agent [baseline] (1.291 s) : 0, 1291090
Total [baseline] (9.59 s) : 0, 9589551
Agent [candidate] (1.284 s) : 0, 1283539
Total [candidate] (9.585 s) : 0, 9584674
gantt
title petclinic - break down per module: candidate=1.30.0-SNAPSHOT~6913074b37, baseline=1.31.0-SNAPSHOT~80420afa01
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (666.196 ms) : 0, 666196
BytebuddyAgent [candidate] (672.874 ms) : 0, 672874
GlobalTracer [baseline] (297.711 ms) : 0, 297711
GlobalTracer [candidate] (300.259 ms) : 0, 300259
AppSec [baseline] (51.466 ms) : 0, 51466
AppSec [candidate] (52.04 ms) : 0, 52040
Remote Config [baseline] (692.92 µs) : 0, 693
Remote Config [candidate] (714.829 µs) : 0, 715
Telemetry [baseline] (7.558 ms) : 0, 7558
Telemetry [candidate] (7.617 ms) : 0, 7617
section appsec
BytebuddyAgent [baseline] (666.759 ms) : 0, 666759
BytebuddyAgent [candidate] (667.281 ms) : 0, 667281
GlobalTracer [baseline] (297.519 ms) : 0, 297519
GlobalTracer [candidate] (297.291 ms) : 0, 297291
AppSec [baseline] (149.612 ms) : 0, 149612
AppSec [candidate] (149.771 ms) : 0, 149771
Remote Config [baseline] (648.868 µs) : 0, 649
Remote Config [candidate] (646.155 µs) : 0, 646
Telemetry [baseline] (6.818 ms) : 0, 6818
Telemetry [candidate] (6.722 ms) : 0, 6722
section iast
BytebuddyAgent [baseline] (784.594 ms) : 0, 784594
BytebuddyAgent [candidate] (778.7 ms) : 0, 778700
GlobalTracer [baseline] (290.594 ms) : 0, 290594
GlobalTracer [candidate] (289.583 ms) : 0, 289583
AppSec [baseline] (50.629 ms) : 0, 50629
AppSec [candidate] (52.123 ms) : 0, 52123
Remote Config [baseline] (634.383 µs) : 0, 634
Remote Config [candidate] (632.238 µs) : 0, 632
Telemetry [baseline] (7.335 ms) : 0, 7335
Telemetry [candidate] (8.132 ms) : 0, 8132
IAST [baseline] (23.301 ms) : 0, 23301
IAST [candidate] (21.485 ms) : 0, 21485
section profiling
BytebuddyAgent [baseline] (672.831 ms) : 0, 672831
BytebuddyAgent [candidate] (669.091 ms) : 0, 669091
GlobalTracer [baseline] (385.471 ms) : 0, 385471
GlobalTracer [candidate] (383.155 ms) : 0, 383155
AppSec [baseline] (52.512 ms) : 0, 52512
AppSec [candidate] (52.412 ms) : 0, 52412
Remote Config [baseline] (669.866 µs) : 0, 670
Remote Config [candidate] (656.818 µs) : 0, 657
Telemetry [baseline] (11.631 ms) : 0, 11631
Telemetry [candidate] (9.979 ms) : 0, 9979
ProfilingAgent [baseline] (112.803 ms) : 0, 112803
ProfilingAgent [candidate] (113.446 ms) : 0, 113446
Profiling [baseline] (112.828 ms) : 0, 112828
Profiling [candidate] (113.471 ms) : 0, 113471
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 16 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.30.0-SNAPSHOT~6913074b37, baseline=1.31.0-SNAPSHOT~80420afa01
dateFormat X
axisFormat %s
section baseline
no_agent (1.352 ms) : 1332, 1371
. : milestone, 1352,
appsec (1.79 ms) : 1764, 1815
. : milestone, 1790,
iast (1.506 ms) : 1481, 1531
. : milestone, 1506,
profiling (1.563 ms) : 1537, 1589
. : milestone, 1563,
tracing (1.481 ms) : 1455, 1506
. : milestone, 1481,
section candidate
no_agent (1.352 ms) : 1332, 1371
. : milestone, 1352,
appsec (1.78 ms) : 1755, 1805
. : milestone, 1780,
iast (1.527 ms) : 1502, 1551
. : milestone, 1527,
profiling (1.57 ms) : 1544, 1596
. : milestone, 1570,
tracing (1.504 ms) : 1479, 1529
. : milestone, 1504,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.30.0-SNAPSHOT~6913074b37, baseline=1.31.0-SNAPSHOT~80420afa01
dateFormat X
axisFormat %s
section baseline
no_agent (369.507 µs) : 349, 390
. : milestone, 370,
iast (486.896 µs) : 465, 508
. : milestone, 487,
iast_FULL (536.704 µs) : 516, 557
. : milestone, 537,
iast_GLOBAL (509.929 µs) : 488, 531
. : milestone, 510,
iast_HARDCODED_SECRET_DISABLED (473.449 µs) : 452, 494
. : milestone, 473,
iast_INACTIVE (455.032 µs) : 433, 477
. : milestone, 455,
iast_TELEMETRY_OFF (470.946 µs) : 450, 492
. : milestone, 471,
tracing (439.404 µs) : 419, 460
. : milestone, 439,
section candidate
no_agent (366.493 µs) : 347, 386
. : milestone, 366,
iast (491.995 µs) : 471, 513
. : milestone, 492,
iast_FULL (547.615 µs) : 527, 569
. : milestone, 548,
iast_GLOBAL (497.654 µs) : 477, 518
. : milestone, 498,
iast_HARDCODED_SECRET_DISABLED (473.488 µs) : 453, 494
. : milestone, 473,
iast_INACTIVE (453.68 µs) : 432, 475
. : milestone, 454,
iast_TELEMETRY_OFF (478.647 µs) : 457, 500
. : milestone, 479,
tracing (450.719 µs) : 430, 472
. : milestone, 451,
|
PerfectSlayer
approved these changes
Feb 9, 2024
Contributor
PerfectSlayer
left a comment
There was a problem hiding this comment.
LGTM
Should we have more test about it?
Contributor
Author
Sure, it won't hurt to have a couple of dedicated test cases for it. Added. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Does This Do
Updates telemetry client switch logic.
Prior to the change the logic could switch from intake client to agent client in the following circumstances:
With the change the logic is to do the switch if:
Motivation
If the tracer is explicitly configured to work in agentless mode, the intake telemetry client should be the preferred one.
Jira ticket: CIVIS-2427