Skip to content

Remote Config. Add target service+env check. - #6636

Merged
ygree merged 1 commit into
masterfrom
ygree/remote-config-svc-env-check
Feb 12, 2024
Merged

Remote Config. Add target service+env check.#6636
ygree merged 1 commit into
masterfrom
ygree/remote-config-svc-env-check

Conversation

@ygree

@ygreeygree commented Feb 8, 2024

Copy link
Copy Markdown
Contributor

What Does This Do

Add the target service and env checks.

Motivation

Prevent remote config update if service+env doesn't match.

Additional Notes

Jira ticket: APMJAVA-1222

  • Enable system test once this PR merged
  • Extends system tests to make sure that the check is case-insensitive

DataDog/system-tests#2144

@ygreeygree added the comp: remote config Configuration at Runtime label Feb 8, 2024
@pr-commenter

pr-commenterBot commented Feb 8, 2024

Copy link
Copy Markdown

Benchmarks

Startup

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterygree/remote-config-svc-env-check
git_commit_date17077560391707761271
git_commit_sha58ffdd2b7d232d
release_version1.31.0-SNAPSHOT~58ffdd26f71.31.0-SNAPSHOT~b7d232dc25
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17077642551707764255
ci_job_id432049783432049783
ci_pipeline_id2815414528154145
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
moduleAgentAgent
parentNoneNone
variantiastiast

Summary

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

Startup time reports for petclinic
gantt
title petclinic - global startup overhead: candidate=1.31.0-SNAPSHOT~b7d232dc25, baseline=1.31.0-SNAPSHOT~58ffdd26f7
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1067241
Total [baseline] (9.348 s) : 0, 9348032
Agent [candidate] (1.064 s) : 0, 1064221
Total [candidate] (9.354 s) : 0, 9354456
section appsec
Agent [baseline] (1.167 s) : 0, 1166719
Total [baseline] (9.553 s) : 0, 9553454
Agent [candidate] (1.163 s) : 0, 1162791
Total [candidate] (9.446 s) : 0, 9446015
section iast
Agent [baseline] (1.184 s) : 0, 1184316
Total [baseline] (9.703 s) : 0, 9702563
Agent [candidate] (1.185 s) : 0, 1185461
Total [candidate] (9.727 s) : 0, 9726955
section profiling
Agent [baseline] (1.284 s) : 0, 1284214
Total [baseline] (9.599 s) : 0, 9598509
Agent [candidate] (1.281 s) : 0, 1280648
Total [candidate] (9.643 s) : 0, 9642560
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.067 s-
Agentappsec1.167 s99.478 ms (9.3%)
Agentiast1.184 s117.075 ms (11.0%)
Agentprofiling1.284 s216.973 ms (20.3%)
Totaltracing9.348 s-
Totalappsec9.553 s205.422 ms (2.2%)
Totaliast9.703 s354.531 ms (3.8%)
Totalprofiling9.599 s250.478 ms (2.7%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.064 s-
Agentappsec1.163 s98.57 ms (9.3%)
Agentiast1.185 s121.24 ms (11.4%)
Agentprofiling1.281 s216.427 ms (20.3%)
Totaltracing9.354 s-
Totalappsec9.446 s91.559 ms (1.0%)
Totaliast9.727 s372.499 ms (4.0%)
Totalprofiling9.643 s288.104 ms (3.1%)
gantt
title petclinic - break down per module: candidate=1.31.0-SNAPSHOT~b7d232dc25, baseline=1.31.0-SNAPSHOT~58ffdd26f7
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (672.225 ms) : 0, 672225
BytebuddyAgent [candidate] (670.273 ms) : 0, 670273
GlobalTracer [baseline] (299.839 ms) : 0, 299839
GlobalTracer [candidate] (299.797 ms) : 0, 299797
AppSec [baseline] (52.281 ms) : 0, 52281
AppSec [candidate] (51.461 ms) : 0, 51461
Remote Config [baseline] (710.751 µs) : 0, 711
Remote Config [candidate] (703.373 µs) : 0, 703
Telemetry [baseline] (7.739 ms) : 0, 7739
Telemetry [candidate] (7.687 ms) : 0, 7687
section appsec
BytebuddyAgent [baseline] (672.595 ms) : 0, 672595
BytebuddyAgent [candidate] (669.385 ms) : 0, 669385
GlobalTracer [baseline] (300.066 ms) : 0, 300066
GlobalTracer [candidate] (300.082 ms) : 0, 300082
AppSec [baseline] (152.036 ms) : 0, 152036
AppSec [candidate] (151.406 ms) : 0, 151406
Remote Config [baseline] (657.267 µs) : 0, 657
Remote Config [candidate] (653.438 µs) : 0, 653
Telemetry [baseline] (6.888 ms) : 0, 6888
Telemetry [candidate] (6.841 ms) : 0, 6841
section iast
BytebuddyAgent [baseline] (778.663 ms) : 0, 778663
BytebuddyAgent [candidate] (778.756 ms) : 0, 778756
GlobalTracer [baseline] (288.76 ms) : 0, 288760
GlobalTracer [candidate] (290.26 ms) : 0, 290260
AppSec [baseline] (51.47 ms) : 0, 51470
AppSec [candidate] (53.611 ms) : 0, 53611
Remote Config [baseline] (628.906 µs) : 0, 629
Remote Config [candidate] (605.982 µs) : 0, 606
Telemetry [baseline] (6.61 ms) : 0, 6610
Telemetry [candidate] (6.596 ms) : 0, 6596
IAST [baseline] (23.813 ms) : 0, 23813
IAST [candidate] (21.377 ms) : 0, 21377
section profiling
ProfilingAgent [baseline] (111.858 ms) : 0, 111858
ProfilingAgent [candidate] (112.433 ms) : 0, 112433
BytebuddyAgent [baseline] (669.637 ms) : 0, 669637
BytebuddyAgent [candidate] (666.686 ms) : 0, 666686
GlobalTracer [baseline] (383.188 ms) : 0, 383188
GlobalTracer [candidate] (383.918 ms) : 0, 383918
AppSec [baseline] (52.42 ms) : 0, 52420
AppSec [candidate] (52.018 ms) : 0, 52018
Remote Config [baseline] (673.101 µs) : 0, 673
Remote Config [candidate] (662.542 µs) : 0, 663
Telemetry [baseline] (11.629 ms) : 0, 11629
Telemetry [candidate] (10.295 ms) : 0, 10295
Profiling [baseline] (111.882 ms) : 0, 111882
Profiling [candidate] (112.457 ms) : 0, 112457
Loading

Load

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
end_time2024-02-12T18:33:342024-02-12T18:52:32
git_branchmasterygree/remote-config-svc-env-check
git_commit_date17077560391707761271
git_commit_sha58ffdd2b7d232d
release_version1.31.0-SNAPSHOT~58ffdd26f71.31.0-SNAPSHOT~b7d232dc25
start_time2024-02-12T18:33:202024-02-12T18:52:19
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17077642551707764255
ci_job_id432049783432049783
ci_pipeline_id2815414528154145
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variantiastiast

Summary

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

scenarioΔ mean http_req_durationΔ mean throughputcandidate mean http_req_durationcandidate mean throughputbaseline mean http_req_durationbaseline mean throughput
scenario:load:petclinic:no_agentworse
[+68.180µs; +99.210µs] or [+5.261%; +7.656%]
unstable
[-766.739op/s; +518.536op/s] or [-22.177%; +14.998%]
1.380ms3333.333op/s1.296ms3457.435op/s
Request duration reports for petclinic
gantt
title petclinic - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~b7d232dc25, baseline=1.31.0-SNAPSHOT~58ffdd26f7
dateFormat X
axisFormat %s
section baseline
no_agent (1.296 ms) : 1290, 1301
. : milestone, 1296,
appsec (1.773 ms) : 1748, 1797
. : milestone, 1773,
iast (1.526 ms) : 1502, 1550
. : milestone, 1526,
profiling (1.564 ms) : 1537, 1591
. : milestone, 1564,
tracing (1.482 ms) : 1457, 1506
. : milestone, 1482,
section candidate
no_agent (1.38 ms) : 1360, 1399
. : milestone, 1380,
appsec (1.779 ms) : 1754, 1804
. : milestone, 1779,
iast (1.507 ms) : 1482, 1531
. : milestone, 1507,
profiling (1.541 ms) : 1516, 1566
. : milestone, 1541,
tracing (1.493 ms) : 1468, 1518
. : milestone, 1493,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.296 ms [1.29 ms, 1.301 ms]-
appsec1.773 ms [1.748 ms, 1.797 ms]476.781 µs (36.8%)
iast1.526 ms [1.502 ms, 1.55 ms]230.177 µs (17.8%)
profiling1.564 ms [1.537 ms, 1.591 ms]268.308 µs (20.7%)
tracing1.482 ms [1.457 ms, 1.506 ms]185.685 µs (14.3%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.38 ms [1.36 ms, 1.399 ms]-
appsec1.779 ms [1.754 ms, 1.804 ms]399.707 µs (29.0%)
iast1.507 ms [1.482 ms, 1.531 ms]127.226 µs (9.2%)
profiling1.541 ms [1.516 ms, 1.566 ms]161.38 µs (11.7%)
tracing1.493 ms [1.468 ms, 1.518 ms]113.468 µs (8.2%)
Request duration reports for insecure-bank
gantt
title insecure-bank - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~b7d232dc25, baseline=1.31.0-SNAPSHOT~58ffdd26f7
dateFormat X
axisFormat %s
section baseline
no_agent (371.667 µs) : 351, 392
. : milestone, 372,
iast (479.546 µs) : 458, 501
. : milestone, 480,
iast_FULL (547.514 µs) : 527, 569
. : milestone, 548,
iast_GLOBAL (504.758 µs) : 484, 526
. : milestone, 505,
iast_HARDCODED_SECRET_DISABLED (481.857 µs) : 461, 503
. : milestone, 482,
iast_INACTIVE (457.633 µs) : 436, 479
. : milestone, 458,
iast_TELEMETRY_OFF (477.531 µs) : 456, 499
. : milestone, 478,
tracing (446.566 µs) : 426, 467
. : milestone, 447,
section candidate
no_agent (369.322 µs) : 349, 389
. : milestone, 369,
iast (473.916 µs) : 453, 494
. : milestone, 474,
iast_FULL (547.812 µs) : 527, 569
. : milestone, 548,
iast_GLOBAL (495.22 µs) : 475, 516
. : milestone, 495,
iast_HARDCODED_SECRET_DISABLED (473.645 µs) : 453, 494
. : milestone, 474,
iast_INACTIVE (452.021 µs) : 431, 473
. : milestone, 452,
iast_TELEMETRY_OFF (470.48 µs) : 450, 491
. : milestone, 470,
tracing (451.477 µs) : 431, 472
. : milestone, 451,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent371.667 µs [351.385 µs, 391.949 µs]-
iast479.546 µs [458.273 µs, 500.819 µs]107.879 µs (29.0%)
iast_FULL547.514 µs [526.509 µs, 568.519 µs]175.847 µs (47.3%)
iast_GLOBAL504.758 µs [483.617 µs, 525.899 µs]133.091 µs (35.8%)
iast_HARDCODED_SECRET_DISABLED481.857 µs [460.747 µs, 502.967 µs]110.19 µs (29.6%)
iast_INACTIVE457.633 µs [436.008 µs, 479.257 µs]85.966 µs (23.1%)
iast_TELEMETRY_OFF477.531 µs [456.232 µs, 498.831 µs]105.864 µs (28.5%)
tracing446.566 µs [425.676 µs, 467.456 µs]74.899 µs (20.2%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent369.322 µs [349.39 µs, 389.253 µs]-
iast473.916 µs [453.467 µs, 494.364 µs]104.594 µs (28.3%)
iast_FULL547.812 µs [527.066 µs, 568.558 µs]178.49 µs (48.3%)
iast_GLOBAL495.22 µs [474.918 µs, 515.523 µs]125.898 µs (34.1%)
iast_HARDCODED_SECRET_DISABLED473.645 µs [452.823 µs, 494.466 µs]104.323 µs (28.2%)
iast_INACTIVE452.021 µs [430.946 µs, 473.096 µs]82.699 µs (22.4%)
iast_TELEMETRY_OFF470.48 µs [449.97 µs, 490.991 µs]101.159 µs (27.4%)
tracing451.477 µs [430.698 µs, 472.257 µs]82.155 µs (22.2%)

@ygree
ygreeforce-pushed the ygree/remote-config-svc-env-check branch 3 times, most recently from fb07b60 to 7909728CompareFebruary 8, 2024 18:38
@ygree
ygree marked this pull request as ready for review February 8, 2024 20:29
@ygree
ygree requested a review from a team as a code ownerFebruary 8, 2024 20:29
Comment on lines 359 to 360

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we add a test case to check the config is not apply when one of those values do not match?

@ygree
ygreeforce-pushed the ygree/remote-config-svc-env-check branch from 7909728 to 8ecc48dCompareFebruary 9, 2024 20:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: remote configConfiguration at Runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ygree@PerfectSlayer@mcculls@nayeem-kamal