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

Do not modify readonly message attributes map on SNS integration #7150

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

vandonr
Copy link
Contributor

@vandonr vandonr commented Jun 10, 2024

What Does This Do

Fix a bug where the integration would crash in the sdk v1 integration if the message attributes were a readonly map
Also fix a minor bug in the sdk v2 batch requests where we'd write more than 10 message attributes, which is not supported in SQS.

Motivation

#7147

@vandonr vandonr requested a review from a team as a code owner June 10, 2024 15:19
@amarziali amarziali changed the title bugfixe(s) on SNS integration SNS integration: do not modify readonly message attributes map Jun 10, 2024
@amarziali amarziali added inst: aws sdk AWS SDK instrumentation tag: serverless Serverless support type: bug labels Jun 10, 2024
@vandonr vandonr removed the inst: aws sdk AWS SDK instrumentation label Jun 10, 2024
@pr-commenter
Copy link

pr-commenter bot commented Jun 10, 2024

Benchmarks

Startup

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-06-10T15:39:13 2024-06-10T15:46:02
git_branch master vandonr/fix
git_commit_date 1718022484 1718032172
git_commit_sha b7b9e69 9579b09
release_version 1.36.0-SNAPSHOT~b7b9e6991e 1.36.0-SNAPSHOT~9579b09cf4
start_time 2024-06-10T15:38:59 2024-06-10T15:45:49
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1718034707 1718034707
ci_job_id 537835801 537835801
ci_pipeline_id 36294436 36294436
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

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

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~9579b09cf4, baseline=1.36.0-SNAPSHOT~b7b9e6991e
    dateFormat X
    axisFormat %s
section baseline
no_agent (371.317 µs) : 352, 391
.   : milestone, 371,
iast (484.659 µs) : 463, 506
.   : milestone, 485,
iast_FULL (550.414 µs) : 529, 572
.   : milestone, 550,
iast_GLOBAL (504.762 µs) : 484, 526
.   : milestone, 505,
iast_HARDCODED_SECRET_DISABLED (480.144 µs) : 459, 502
.   : milestone, 480,
iast_INACTIVE (453.204 µs) : 432, 474
.   : milestone, 453,
iast_TELEMETRY_OFF (474.661 µs) : 453, 496
.   : milestone, 475,
tracing (433.721 µs) : 414, 454
.   : milestone, 434,
section candidate
no_agent (366.993 µs) : 347, 387
.   : milestone, 367,
iast (480.601 µs) : 460, 502
.   : milestone, 481,
iast_FULL (553.533 µs) : 532, 575
.   : milestone, 554,
iast_GLOBAL (518.048 µs) : 495, 541
.   : milestone, 518,
iast_HARDCODED_SECRET_DISABLED (477.713 µs) : 457, 499
.   : milestone, 478,
iast_INACTIVE (450.386 µs) : 429, 472
.   : milestone, 450,
iast_TELEMETRY_OFF (469.593 µs) : 448, 491
.   : milestone, 470,
tracing (443.738 µs) : 423, 465
.   : milestone, 444,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 371.317 µs [351.642 µs, 390.991 µs] -
iast 484.659 µs [463.009 µs, 506.309 µs] 113.343 µs (30.5%)
iast_FULL 550.414 µs [529.138 µs, 571.69 µs] 179.097 µs (48.2%)
iast_GLOBAL 504.762 µs [483.851 µs, 525.672 µs] 133.445 µs (35.9%)
iast_HARDCODED_SECRET_DISABLED 480.144 µs [458.596 µs, 501.693 µs] 108.828 µs (29.3%)
iast_INACTIVE 453.204 µs [432.122 µs, 474.287 µs] 81.888 µs (22.1%)
iast_TELEMETRY_OFF 474.661 µs [453.111 µs, 496.21 µs] 103.344 µs (27.8%)
tracing 433.721 µs [413.615 µs, 453.827 µs] 62.405 µs (16.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 366.993 µs [347.053 µs, 386.933 µs] -
iast 480.601 µs [459.553 µs, 501.648 µs] 113.608 µs (31.0%)
iast_FULL 553.533 µs [532.302 µs, 574.763 µs] 186.54 µs (50.8%)
iast_GLOBAL 518.048 µs [495.316 µs, 540.78 µs] 151.055 µs (41.2%)
iast_HARDCODED_SECRET_DISABLED 477.713 µs [456.717 µs, 498.709 µs] 110.72 µs (30.2%)
iast_INACTIVE 450.386 µs [428.864 µs, 471.908 µs] 83.393 µs (22.7%)
iast_TELEMETRY_OFF 469.593 µs [448.316 µs, 490.869 µs] 102.6 µs (28.0%)
tracing 443.738 µs [422.563 µs, 464.914 µs] 76.745 µs (20.9%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~9579b09cf4, baseline=1.36.0-SNAPSHOT~b7b9e6991e
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.341 ms) : 1321, 1360
.   : milestone, 1341,
appsec (1.715 ms) : 1691, 1738
.   : milestone, 1715,
appsec_no_iast (1.722 ms) : 1699, 1746
.   : milestone, 1722,
iast (1.47 ms) : 1447, 1493
.   : milestone, 1470,
profiling (1.505 ms) : 1479, 1531
.   : milestone, 1505,
tracing (1.476 ms) : 1452, 1500
.   : milestone, 1476,
section candidate
no_agent (1.359 ms) : 1340, 1378
.   : milestone, 1359,
appsec (1.724 ms) : 1700, 1748
.   : milestone, 1724,
appsec_no_iast (1.721 ms) : 1697, 1745
.   : milestone, 1721,
iast (1.46 ms) : 1437, 1482
.   : milestone, 1460,
profiling (1.513 ms) : 1486, 1539
.   : milestone, 1513,
tracing (1.437 ms) : 1413, 1462
.   : milestone, 1437,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.341 ms [1.321 ms, 1.36 ms] -
appsec 1.715 ms [1.691 ms, 1.738 ms] 373.881 µs (27.9%)
appsec_no_iast 1.722 ms [1.699 ms, 1.746 ms] 381.549 µs (28.5%)
iast 1.47 ms [1.447 ms, 1.493 ms] 129.759 µs (9.7%)
profiling 1.505 ms [1.479 ms, 1.531 ms] 164.361 µs (12.3%)
tracing 1.476 ms [1.452 ms, 1.5 ms] 135.577 µs (10.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.359 ms [1.34 ms, 1.378 ms] -
appsec 1.724 ms [1.7 ms, 1.748 ms] 365.236 µs (26.9%)
appsec_no_iast 1.721 ms [1.697 ms, 1.745 ms] 361.984 µs (26.6%)
iast 1.46 ms [1.437 ms, 1.482 ms] 100.706 µs (7.4%)
profiling 1.513 ms [1.486 ms, 1.539 ms] 153.508 µs (11.3%)
tracing 1.437 ms [1.413 ms, 1.462 ms] 78.005 µs (5.7%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master vandonr/fix
git_commit_date 1718022484 1718032172
git_commit_sha b7b9e69 9579b09
release_version 1.36.0-SNAPSHOT~b7b9e6991e 1.36.0-SNAPSHOT~9579b09cf4
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1718035320 1718035320
ci_job_id 537835802 537835802
ci_pipeline_id 36294436 36294436
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant appsec appsec

Summary

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

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~9579b09cf4, baseline=1.36.0-SNAPSHOT~b7b9e6991e
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.695 s) : 15695000, 15695000
.   : milestone, 15695000,
appsec (15.102 s) : 15102000, 15102000
.   : milestone, 15102000,
iast (18.719 s) : 18719000, 18719000
.   : milestone, 18719000,
iast_GLOBAL (18.047 s) : 18047000, 18047000
.   : milestone, 18047000,
profiling (16.045 s) : 16045000, 16045000
.   : milestone, 16045000,
tracing (15.074 s) : 15074000, 15074000
.   : milestone, 15074000,
section candidate
no_agent (15.38 s) : 15380000, 15380000
.   : milestone, 15380000,
appsec (14.869 s) : 14869000, 14869000
.   : milestone, 14869000,
iast (18.815 s) : 18815000, 18815000
.   : milestone, 18815000,
iast_GLOBAL (18.017 s) : 18017000, 18017000
.   : milestone, 18017000,
profiling (15.212 s) : 15212000, 15212000
.   : milestone, 15212000,
tracing (15.05 s) : 15050000, 15050000
.   : milestone, 15050000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.695 s [15.695 s, 15.695 s] -
appsec 15.102 s [15.102 s, 15.102 s] -593.0 ms (-3.8%)
iast 18.719 s [18.719 s, 18.719 s] 3.024 s (19.3%)
iast_GLOBAL 18.047 s [18.047 s, 18.047 s] 2.352 s (15.0%)
profiling 16.045 s [16.045 s, 16.045 s] 350.0 ms (2.2%)
tracing 15.074 s [15.074 s, 15.074 s] -621.0 ms (-4.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.38 s [15.38 s, 15.38 s] -
appsec 14.869 s [14.869 s, 14.869 s] -511.0 ms (-3.3%)
iast 18.815 s [18.815 s, 18.815 s] 3.435 s (22.3%)
iast_GLOBAL 18.017 s [18.017 s, 18.017 s] 2.637 s (17.1%)
profiling 15.212 s [15.212 s, 15.212 s] -168.0 ms (-1.1%)
tracing 15.05 s [15.05 s, 15.05 s] -330.0 ms (-2.1%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~9579b09cf4, baseline=1.36.0-SNAPSHOT~b7b9e6991e
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.461 ms) : 1450, 1473
.   : milestone, 1461,
appsec (2.211 ms) : 2177, 2245
.   : milestone, 2211,
iast (1.979 ms) : 1938, 2021
.   : milestone, 1979,
iast_GLOBAL (2.012 ms) : 1971, 2054
.   : milestone, 2012,
profiling (1.854 ms) : 1820, 1887
.   : milestone, 1854,
tracing (1.845 ms) : 1812, 1878
.   : milestone, 1845,
section candidate
no_agent (1.458 ms) : 1446, 1469
.   : milestone, 1458,
appsec (2.199 ms) : 2165, 2233
.   : milestone, 2199,
iast (1.969 ms) : 1927, 2010
.   : milestone, 1969,
iast_GLOBAL (2.014 ms) : 1973, 2056
.   : milestone, 2014,
profiling (1.857 ms) : 1823, 1891
.   : milestone, 1857,
tracing (1.838 ms) : 1806, 1871
.   : milestone, 1838,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.461 ms [1.45 ms, 1.473 ms] -
appsec 2.211 ms [2.177 ms, 2.245 ms] 749.096 µs (51.3%)
iast 1.979 ms [1.938 ms, 2.021 ms] 517.821 µs (35.4%)
iast_GLOBAL 2.012 ms [1.971 ms, 2.054 ms] 550.874 µs (37.7%)
profiling 1.854 ms [1.82 ms, 1.887 ms] 392.136 µs (26.8%)
tracing 1.845 ms [1.812 ms, 1.878 ms] 383.403 µs (26.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.458 ms [1.446 ms, 1.469 ms] -
appsec 2.199 ms [2.165 ms, 2.233 ms] 741.152 µs (50.8%)
iast 1.969 ms [1.927 ms, 2.01 ms] 510.979 µs (35.1%)
iast_GLOBAL 2.014 ms [1.973 ms, 2.056 ms] 556.725 µs (38.2%)
profiling 1.857 ms [1.823 ms, 1.891 ms] 399.06 µs (27.4%)
tracing 1.838 ms [1.806 ms, 1.871 ms] 380.559 µs (26.1%)

@amarziali amarziali added the inst: aws sdk AWS SDK instrumentation label Jun 11, 2024
@vandonr vandonr merged commit 7db8941 into master Jun 11, 2024
80 of 81 checks passed
@vandonr vandonr deleted the vandonr/fix branch June 11, 2024 10:39
@github-actions github-actions bot added this to the 1.36.0 milestone Jun 11, 2024
mcculls pushed a commit that referenced this pull request Jun 12, 2024
* fix bug when SNS message attr are readonly + test

* fix extra bug in v2 on message attr size
mcculls pushed a commit that referenced this pull request Jun 12, 2024
* fix bug when SNS message attr are readonly + test

* fix extra bug in v2 on message attr size
@PerfectSlayer PerfectSlayer changed the title SNS integration: do not modify readonly message attributes map Do not modify readonly message attributes map on SNS integration Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: aws sdk AWS SDK instrumentation tag: serverless Serverless support type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants