Skip to content

Enable user event tracking only when AppSec is enabled#5756

Merged
ValentinZakharov merged 2 commits into
masterfrom
vzakharov/uet_activation_fix
Aug 23, 2023
Merged

Enable user event tracking only when AppSec is enabled#5756
ValentinZakharov merged 2 commits into
masterfrom
vzakharov/uet_activation_fix

Conversation

@ValentinZakharov

@ValentinZakharov ValentinZakharov commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

What Does This Do

Fixed activation for User Event Tracking.
Active only if AppSec is active with DD_APPSEC_ENABLED=true or via remote config.

Motivation

Customer reported an issue when User Event Tracking was working even with inactive AppSec.

Additional Notes

@ValentinZakharov ValentinZakharov added the comp: asm waf Application Security Management (WAF) label Aug 22, 2023
@ValentinZakharov ValentinZakharov self-assigned this Aug 22, 2023
@ValentinZakharov
ValentinZakharov requested a review from a team as a code owner August 22, 2023 21:00
@smola smola changed the title User Event Tracking activation fix Enable user event tracking only when AppSec is enabled Aug 23, 2023
@ValentinZakharov
ValentinZakharov force-pushed the vzakharov/uet_activation_fix branch from b064c27 to bdf3fc4 Compare August 23, 2023 10:32
@pr-commenter

pr-commenter Bot commented Aug 23, 2023

Copy link
Copy Markdown

Benchmarks

Startup

Parameters

Baseline Candidate
commit 1.20.0-SNAPSHOT~cbe55c2700 1.20.0-SNAPSHOT~c80a110603
config baseline candidate
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
module Agent Agent
parent None None
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 62 cases.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.20.0-SNAPSHOT~c80a110603, baseline=1.20.0-SNAPSHOT~cbe55c2700

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (988.335 ms) : 0, 988335
Total [baseline] (8.661 s) : 0, 8661236
Agent [candidate] (987.004 ms) : 0, 987004
Total [candidate] (8.652 s) : 0, 8651970
section appsec
Agent [baseline] (1.072 s) : 0, 1072490
Total [baseline] (8.727 s) : 0, 8726983
Agent [candidate] (1.072 s) : 0, 1071601
Total [candidate] (8.725 s) : 0, 8725195
section iast
Agent [baseline] (1.087 s) : 0, 1086742
Total [baseline] (9.145 s) : 0, 9144605
Agent [candidate] (1.091 s) : 0, 1091254
Total [candidate] (9.197 s) : 0, 9196733
section profiling
Agent [baseline] (1.156 s) : 0, 1155887
Total [baseline] (8.866 s) : 0, 8865724
Agent [candidate] (1.157 s) : 0, 1156693
Total [candidate] (8.884 s) : 0, 8884035
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 988.335 ms -
Agent appsec 1.072 s 84.155 ms (8.5%)
Agent iast 1.087 s 98.406 ms (10.0%)
Agent profiling 1.156 s 167.552 ms (17.0%)
Total tracing 8.661 s -
Total appsec 8.727 s 65.747 ms (0.8%)
Total iast 9.145 s 483.368 ms (5.6%)
Total profiling 8.866 s 204.488 ms (2.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 987.004 ms -
Agent appsec 1.072 s 84.597 ms (8.6%)
Agent iast 1.091 s 104.25 ms (10.6%)
Agent profiling 1.157 s 169.689 ms (17.2%)
Total tracing 8.652 s -
Total appsec 8.725 s 73.224 ms (0.8%)
Total iast 9.197 s 544.762 ms (6.3%)
Total profiling 8.884 s 232.065 ms (2.7%)
gantt
    title insecure-bank - break down per module: candidate=1.20.0-SNAPSHOT~c80a110603, baseline=1.20.0-SNAPSHOT~cbe55c2700

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (612.575 ms) : 0, 612575
BytebuddyAgent [candidate] (611.225 ms) : 0, 611225
GlobalTracer [baseline] (284.706 ms) : 0, 284706
GlobalTracer [candidate] (284.63 ms) : 0, 284630
AppSec [baseline] (50.044 ms) : 0, 50044
AppSec [candidate] (50.277 ms) : 0, 50277
Remote Config [baseline] (667.427 µs) : 0, 667
Remote Config [candidate] (664.721 µs) : 0, 665
Telemetry [baseline] (6.013 ms) : 0, 6013
Telemetry [candidate] (6.001 ms) : 0, 6001
section appsec
BytebuddyAgent [baseline] (612.252 ms) : 0, 612252
BytebuddyAgent [candidate] (611.056 ms) : 0, 611056
GlobalTracer [baseline] (284.628 ms) : 0, 284628
GlobalTracer [candidate] (284.942 ms) : 0, 284942
AppSec [baseline] (134.923 ms) : 0, 134923
AppSec [candidate] (135.054 ms) : 0, 135054
Remote Config [baseline] (720.02 µs) : 0, 720
Remote Config [candidate] (726.031 µs) : 0, 726
Telemetry [baseline] (5.73 ms) : 0, 5730
Telemetry [candidate] (5.741 ms) : 0, 5741
section iast
BytebuddyAgent [baseline] (715.173 ms) : 0, 715173
BytebuddyAgent [candidate] (716.633 ms) : 0, 716633
GlobalTracer [baseline] (269.966 ms) : 0, 269966
GlobalTracer [candidate] (272.193 ms) : 0, 272193
AppSec [baseline] (47.381 ms) : 0, 47381
AppSec [candidate] (47.843 ms) : 0, 47843
Remote Config [baseline] (547.545 µs) : 0, 548
Remote Config [candidate] (558.209 µs) : 0, 558
Telemetry [baseline] (5.656 ms) : 0, 5656
Telemetry [candidate] (5.805 ms) : 0, 5805
IAST [baseline] (13.769 ms) : 0, 13769
IAST [candidate] (13.968 ms) : 0, 13968
section profiling
BytebuddyAgent [baseline] (624.037 ms) : 0, 624037
BytebuddyAgent [candidate] (624.335 ms) : 0, 624335
GlobalTracer [baseline] (345.966 ms) : 0, 345966
GlobalTracer [candidate] (346.885 ms) : 0, 346885
AppSec [baseline] (49.18 ms) : 0, 49180
AppSec [candidate] (48.871 ms) : 0, 48871
Remote Config [baseline] (640.256 µs) : 0, 640
Remote Config [candidate] (649.09 µs) : 0, 649
Telemetry [baseline] (5.934 ms) : 0, 5934
Telemetry [candidate] (5.931 ms) : 0, 5931
ProfilingAgent [baseline] (77.228 ms) : 0, 77228
ProfilingAgent [candidate] (77.272 ms) : 0, 77272
Profiling [baseline] (77.252 ms) : 0, 77252
Profiling [candidate] (77.297 ms) : 0, 77297
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.20.0-SNAPSHOT~c80a110603, baseline=1.20.0-SNAPSHOT~cbe55c2700

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (994.724 ms) : 0, 994724
Total [baseline] (9.217 s) : 0, 9217470
Agent [candidate] (989.021 ms) : 0, 989021
Total [candidate] (9.216 s) : 0, 9216300
section appsec
Agent [baseline] (1.08 s) : 0, 1080199
Total [baseline] (9.264 s) : 0, 9264042
Agent [candidate] (1.081 s) : 0, 1080828
Total [candidate] (9.315 s) : 0, 9315233
section iast
Agent [baseline] (1.099 s) : 0, 1098869
Total [baseline] (9.425 s) : 0, 9424651
Agent [candidate] (1.099 s) : 0, 1099360
Total [candidate] (9.427 s) : 0, 9427401
section profiling
Agent [baseline] (1.156 s) : 0, 1156289
Total [baseline] (9.463 s) : 0, 9463040
Agent [candidate] (1.165 s) : 0, 1164610
Total [candidate] (9.478 s) : 0, 9477915
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 994.724 ms -
Agent appsec 1.08 s 85.475 ms (8.6%)
Agent iast 1.099 s 104.145 ms (10.5%)
Agent profiling 1.156 s 161.564 ms (16.2%)
Total tracing 9.217 s -
Total appsec 9.264 s 46.572 ms (0.5%)
Total iast 9.425 s 207.18 ms (2.2%)
Total profiling 9.463 s 245.57 ms (2.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 989.021 ms -
Agent appsec 1.081 s 91.807 ms (9.3%)
Agent iast 1.099 s 110.339 ms (11.2%)
Agent profiling 1.165 s 175.589 ms (17.8%)
Total tracing 9.216 s -
Total appsec 9.315 s 98.933 ms (1.1%)
Total iast 9.427 s 211.101 ms (2.3%)
Total profiling 9.478 s 261.614 ms (2.8%)
gantt
    title petclinic - break down per module: candidate=1.20.0-SNAPSHOT~c80a110603, baseline=1.20.0-SNAPSHOT~cbe55c2700

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (616.325 ms) : 0, 616325
BytebuddyAgent [candidate] (612.646 ms) : 0, 612646
GlobalTracer [baseline] (286.671 ms) : 0, 286671
GlobalTracer [candidate] (285.649 ms) : 0, 285649
AppSec [baseline] (50.47 ms) : 0, 50470
AppSec [candidate] (49.9 ms) : 0, 49900
Remote Config [baseline] (674.328 µs) : 0, 674
Remote Config [candidate] (666.776 µs) : 0, 667
Telemetry [baseline] (6.035 ms) : 0, 6035
Telemetry [candidate] (5.954 ms) : 0, 5954
section appsec
BytebuddyAgent [baseline] (616.932 ms) : 0, 616932
BytebuddyAgent [candidate] (617.175 ms) : 0, 617175
GlobalTracer [baseline] (286.625 ms) : 0, 286625
GlobalTracer [candidate] (287.423 ms) : 0, 287423
AppSec [baseline] (135.532 ms) : 0, 135532
AppSec [candidate] (135.168 ms) : 0, 135168
Remote Config [baseline] (731.645 µs) : 0, 732
Remote Config [candidate] (738.328 µs) : 0, 738
Telemetry [baseline] (5.775 ms) : 0, 5775
Telemetry [candidate] (5.776 ms) : 0, 5776
section iast
BytebuddyAgent [baseline] (724.428 ms) : 0, 724428
BytebuddyAgent [candidate] (724.055 ms) : 0, 724055
GlobalTracer [baseline] (272.218 ms) : 0, 272218
GlobalTracer [candidate] (272.929 ms) : 0, 272929
AppSec [baseline] (47.449 ms) : 0, 47449
AppSec [candidate] (47.584 ms) : 0, 47584
Remote Config [baseline] (558.779 µs) : 0, 559
Remote Config [candidate] (567.711 µs) : 0, 568
Telemetry [baseline] (5.766 ms) : 0, 5766
Telemetry [candidate] (5.802 ms) : 0, 5802
IAST [baseline] (13.918 ms) : 0, 13918
IAST [candidate] (13.993 ms) : 0, 13993
section profiling
BytebuddyAgent [baseline] (624.517 ms) : 0, 624517
BytebuddyAgent [candidate] (628.848 ms) : 0, 628848
GlobalTracer [baseline] (346.007 ms) : 0, 346007
GlobalTracer [candidate] (348.952 ms) : 0, 348952
AppSec [baseline] (49.176 ms) : 0, 49176
AppSec [candidate] (49.407 ms) : 0, 49407
Remote Config [baseline] (656.248 µs) : 0, 656
Remote Config [candidate] (655.383 µs) : 0, 655
Telemetry [baseline] (5.94 ms) : 0, 5940
Telemetry [candidate] (6.027 ms) : 0, 6027
ProfilingAgent [baseline] (77.248 ms) : 0, 77248
ProfilingAgent [candidate] (77.476 ms) : 0, 77476
Profiling [baseline] (77.272 ms) : 0, 77272
Profiling [candidate] (77.5 ms) : 0, 77500
Loading

Load

Parameters

Baseline Candidate
commit 1.20.0-SNAPSHOT~cbe55c2700 1.20.0-SNAPSHOT~c80a110603
config baseline candidate
end_time 2023-08-23T12:03:15 2023-08-23T12:21:21
start_time 2023-08-23T12:02:58 2023-08-23T12:21:03
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 cases.

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~c80a110603, baseline=1.20.0-SNAPSHOT~cbe55c2700
    dateFormat X
    axisFormat %s
section baseline
no_agent (364.583 µs) : 344, 385
.   : milestone, 365,
appsec (658.342 µs) : 638, 679
.   : milestone, 658,
iast (459.758 µs) : 439, 481
.   : milestone, 460,
iast_FULL (522.815 µs) : 502, 543
.   : milestone, 523,
iast_INACTIVE (430.993 µs) : 411, 451
.   : milestone, 431,
profiling (447.915 µs) : 426, 470
.   : milestone, 448,
tracing (436.44 µs) : 416, 457
.   : milestone, 436,
section candidate
no_agent (363.737 µs) : 343, 385
.   : milestone, 364,
appsec (667.96 µs) : 647, 689
.   : milestone, 668,
iast (450.305 µs) : 430, 471
.   : milestone, 450,
iast_FULL (511.496 µs) : 491, 532
.   : milestone, 511,
iast_INACTIVE (433.609 µs) : 413, 455
.   : milestone, 434,
profiling (428.064 µs) : 407, 449
.   : milestone, 428,
tracing (427.661 µs) : 407, 448
.   : milestone, 428,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 364.583 µs [344.09 µs, 385.077 µs] -
appsec 658.342 µs [637.786 µs, 678.897 µs] 293.758 µs (80.6%)
iast 459.758 µs [438.559 µs, 480.958 µs] 95.175 µs (26.1%)
iast_FULL 522.815 µs [502.381 µs, 543.249 µs] 158.232 µs (43.4%)
iast_INACTIVE 430.993 µs [410.537 µs, 451.449 µs] 66.41 µs (18.2%)
profiling 447.915 µs [425.867 µs, 469.964 µs] 83.332 µs (22.9%)
tracing 436.44 µs [415.647 µs, 457.233 µs] 71.857 µs (19.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 363.737 µs [342.558 µs, 384.916 µs] -
appsec 667.96 µs [646.573 µs, 689.346 µs] 304.222 µs (83.6%)
iast 450.305 µs [429.771 µs, 470.84 µs] 86.568 µs (23.8%)
iast_FULL 511.496 µs [490.828 µs, 532.164 µs] 147.759 µs (40.6%)
iast_INACTIVE 433.609 µs [412.584 µs, 454.634 µs] 69.872 µs (19.2%)
profiling 428.064 µs [407.016 µs, 449.111 µs] 64.327 µs (17.7%)
tracing 427.661 µs [407.412 µs, 447.909 µs] 63.923 µs (17.6%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~c80a110603, baseline=1.20.0-SNAPSHOT~cbe55c2700
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.348 ms) : 1329, 1367
.   : milestone, 1348,
appsec (1.657 ms) : 1632, 1682
.   : milestone, 1657,
iast (1.457 ms) : 1433, 1481
.   : milestone, 1457,
profiling (1.448 ms) : 1423, 1474
.   : milestone, 1448,
tracing (1.433 ms) : 1409, 1457
.   : milestone, 1433,
section candidate
no_agent (1.338 ms) : 1319, 1358
.   : milestone, 1338,
appsec (1.697 ms) : 1673, 1722
.   : milestone, 1697,
iast (1.444 ms) : 1420, 1469
.   : milestone, 1444,
profiling (1.453 ms) : 1428, 1478
.   : milestone, 1453,
tracing (1.442 ms) : 1417, 1467
.   : milestone, 1442,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.348 ms [1.329 ms, 1.367 ms] -
appsec 1.657 ms [1.632 ms, 1.682 ms] 309.027 µs (22.9%)
iast 1.457 ms [1.433 ms, 1.481 ms] 108.711 µs (8.1%)
profiling 1.448 ms [1.423 ms, 1.474 ms] 100.19 µs (7.4%)
tracing 1.433 ms [1.409 ms, 1.457 ms] 84.686 µs (6.3%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.338 ms [1.319 ms, 1.358 ms] -
appsec 1.697 ms [1.673 ms, 1.722 ms] 359.146 µs (26.8%)
iast 1.444 ms [1.42 ms, 1.469 ms] 106.201 µs (7.9%)
profiling 1.453 ms [1.428 ms, 1.478 ms] 114.469 µs (8.6%)
tracing 1.442 ms [1.417 ms, 1.467 ms] 103.661 µs (7.7%)

@ValentinZakharov
ValentinZakharov force-pushed the vzakharov/uet_activation_fix branch 2 times, most recently from 6575c99 to 60d02d3 Compare August 23, 2023 11:39
@ValentinZakharov
ValentinZakharov force-pushed the vzakharov/uet_activation_fix branch from 60d02d3 to c80a110 Compare August 23, 2023 11:42
@ValentinZakharov
ValentinZakharov merged commit 118962a into master Aug 23, 2023
@ValentinZakharov
ValentinZakharov deleted the vzakharov/uet_activation_fix branch August 23, 2023 12:35
@github-actions github-actions Bot added this to the 1.20.0 milestone Aug 23, 2023
smola pushed a commit that referenced this pull request Aug 23, 2023
smola added a commit that referenced this pull request Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: asm waf Application Security Management (WAF)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants