-
Notifications
You must be signed in to change notification settings - Fork 293
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
Change hash computation for protobuf to better represent impacting changes + save proto number in schema #8201
Open
vandonr
wants to merge
3
commits into
master
Choose a base branch
from
vandonr/proto
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
vandonr
added
inst: protobuf
Protocol Buffer instrumentation
type: enhancement
comp: data streams
Data Streams Monitoring
labels
Jan 14, 2025
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 5 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~d702a13e68, baseline=1.46.0-SNAPSHOT~8b63e5a85b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.068 s) : 0, 1068375
Total [baseline] (8.666 s) : 0, 8665547
Agent [candidate] (1.07 s) : 0, 1069896
Total [candidate] (8.677 s) : 0, 8677345
section iast
Agent [baseline] (1.186 s) : 0, 1186240
Total [baseline] (9.243 s) : 0, 9242833
Agent [candidate] (1.185 s) : 0, 1184695
Total [candidate] (9.232 s) : 0, 9231735
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.183 s) : 0, 1183065
Total [baseline] (9.186 s) : 0, 9186051
Agent [candidate] (1.198 s) : 0, 1197808
Total [candidate] (9.259 s) : 0, 9259134
section iast_TELEMETRY_OFF
Agent [baseline] (1.185 s) : 0, 1185249
Total [baseline] (9.257 s) : 0, 9256627
Agent [candidate] (1.177 s) : 0, 1177083
Total [candidate] (9.261 s) : 0, 9261177
gantt
title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~d702a13e68, baseline=1.46.0-SNAPSHOT~8b63e5a85b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (723.73 ms) : 0, 723730
BytebuddyAgent [candidate] (724.361 ms) : 0, 724361
GlobalTracer [baseline] (259.295 ms) : 0, 259295
GlobalTracer [candidate] (259.745 ms) : 0, 259745
AppSec [baseline] (55.975 ms) : 0, 55975
AppSec [candidate] (56.713 ms) : 0, 56713
Remote Config [baseline] (748.722 µs) : 0, 749
Remote Config [candidate] (739.772 µs) : 0, 740
Telemetry [baseline] (13.386 ms) : 0, 13386
Telemetry [candidate] (13.106 ms) : 0, 13106
section iast
BytebuddyAgent [baseline] (836.016 ms) : 0, 836016
BytebuddyAgent [candidate] (833.473 ms) : 0, 833473
GlobalTracer [baseline] (245.854 ms) : 0, 245854
GlobalTracer [candidate] (247.25 ms) : 0, 247250
AppSec [baseline] (58.134 ms) : 0, 58134
AppSec [candidate] (58.104 ms) : 0, 58104
IAST [baseline] (21.698 ms) : 0, 21698
IAST [candidate] (21.365 ms) : 0, 21365
Remote Config [baseline] (677.889 µs) : 0, 678
Remote Config [candidate] (670.389 µs) : 0, 670
Telemetry [baseline] (8.848 ms) : 0, 8848
Telemetry [candidate] (8.774 ms) : 0, 8774
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (831.716 ms) : 0, 831716
BytebuddyAgent [candidate] (842.058 ms) : 0, 842058
GlobalTracer [baseline] (247.048 ms) : 0, 247048
GlobalTracer [candidate] (250.044 ms) : 0, 250044
AppSec [baseline] (58.295 ms) : 0, 58295
AppSec [candidate] (58.868 ms) : 0, 58868
IAST [baseline] (21.494 ms) : 0, 21494
IAST [candidate] (21.989 ms) : 0, 21989
Remote Config [baseline] (672.115 µs) : 0, 672
Remote Config [candidate] (695.792 µs) : 0, 696
Telemetry [baseline] (8.85 ms) : 0, 8850
Telemetry [candidate] (9.026 ms) : 0, 9026
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (834.381 ms) : 0, 834381
BytebuddyAgent [candidate] (827.202 ms) : 0, 827202
GlobalTracer [baseline] (248.062 ms) : 0, 248062
GlobalTracer [candidate] (246.671 ms) : 0, 246671
AppSec [baseline] (57.816 ms) : 0, 57816
AppSec [candidate] (57.932 ms) : 0, 57932
IAST [baseline] (20.692 ms) : 0, 20692
IAST [candidate] (20.917 ms) : 0, 20917
Remote Config [baseline] (668.196 µs) : 0, 668
Remote Config [candidate] (679.741 µs) : 0, 680
Telemetry [baseline] (8.584 ms) : 0, 8584
Telemetry [candidate] (8.696 ms) : 0, 8696
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~d702a13e68, baseline=1.46.0-SNAPSHOT~8b63e5a85b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.068 s) : 0, 1067857
Total [baseline] (10.626 s) : 0, 10625789
Agent [candidate] (1.055 s) : 0, 1054605
Total [candidate] (10.435 s) : 0, 10435009
section appsec
Agent [baseline] (1.187 s) : 0, 1186807
Total [baseline] (10.731 s) : 0, 10731266
Agent [candidate] (1.19 s) : 0, 1190416
Total [candidate] (10.718 s) : 0, 10717949
section iast
Agent [baseline] (1.197 s) : 0, 1196661
Total [baseline] (11.003 s) : 0, 11003404
Agent [candidate] (1.191 s) : 0, 1190559
Total [candidate] (11.014 s) : 0, 11014071
section profiling
Agent [baseline] (1.255 s) : 0, 1255476
Total [baseline] (10.832 s) : 0, 10832349
Agent [candidate] (1.259 s) : 0, 1258748
Total [candidate] (10.82 s) : 0, 10820480
gantt
title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~d702a13e68, baseline=1.46.0-SNAPSHOT~8b63e5a85b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (723.168 ms) : 0, 723168
BytebuddyAgent [candidate] (713.553 ms) : 0, 713553
GlobalTracer [baseline] (257.995 ms) : 0, 257995
GlobalTracer [candidate] (255.844 ms) : 0, 255844
AppSec [baseline] (55.68 ms) : 0, 55680
AppSec [candidate] (55.232 ms) : 0, 55232
Remote Config [baseline] (728.93 µs) : 0, 729
Remote Config [candidate] (725.709 µs) : 0, 726
Telemetry [baseline] (15.137 ms) : 0, 15137
Telemetry [candidate] (14.224 ms) : 0, 14224
section appsec
BytebuddyAgent [baseline] (729.988 ms) : 0, 729988
BytebuddyAgent [candidate] (732.122 ms) : 0, 732122
GlobalTracer [baseline] (252.704 ms) : 0, 252704
GlobalTracer [candidate] (253.387 ms) : 0, 253387
AppSec [baseline] (170.298 ms) : 0, 170298
AppSec [candidate] (171.057 ms) : 0, 171057
IAST [baseline] (19.349 ms) : 0, 19349
IAST [candidate] (19.614 ms) : 0, 19614
Remote Config [baseline] (669.009 µs) : 0, 669
Remote Config [candidate] (672.595 µs) : 0, 673
Telemetry [baseline] (8.567 ms) : 0, 8567
Telemetry [candidate] (8.283 ms) : 0, 8283
section iast
BytebuddyAgent [baseline] (843.349 ms) : 0, 843349
BytebuddyAgent [candidate] (837.701 ms) : 0, 837701
GlobalTracer [baseline] (248.64 ms) : 0, 248640
GlobalTracer [candidate] (248.162 ms) : 0, 248162
AppSec [baseline] (58.226 ms) : 0, 58226
AppSec [candidate] (58.294 ms) : 0, 58294
IAST [baseline] (21.655 ms) : 0, 21655
IAST [candidate] (21.49 ms) : 0, 21490
Remote Config [baseline] (671.015 µs) : 0, 671
Remote Config [candidate] (676.398 µs) : 0, 676
Telemetry [baseline] (8.877 ms) : 0, 8877
Telemetry [candidate] (8.886 ms) : 0, 8886
section profiling
BytebuddyAgent [baseline] (703.186 ms) : 0, 703186
BytebuddyAgent [candidate] (705.556 ms) : 0, 705556
GlobalTracer [baseline] (349.931 ms) : 0, 349931
GlobalTracer [candidate] (351.677 ms) : 0, 351677
AppSec [baseline] (54.755 ms) : 0, 54755
AppSec [candidate] (53.99 ms) : 0, 53990
Remote Config [baseline] (658.881 µs) : 0, 659
Remote Config [candidate] (663.146 µs) : 0, 663
Telemetry [baseline] (8.88 ms) : 0, 8880
Telemetry [candidate] (8.869 ms) : 0, 8869
ProfilingAgent [baseline] (95.973 ms) : 0, 95973
ProfilingAgent [candidate] (95.969 ms) : 0, 95969
Profiling [baseline] (95.998 ms) : 0, 95998
Profiling [candidate] (95.994 ms) : 0, 95994
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~d702a13e68, baseline=1.46.0-SNAPSHOT~8b63e5a85b
dateFormat X
axisFormat %s
section baseline
no_agent (382.414 µs) : 361, 404
. : milestone, 382,
iast (499.102 µs) : 477, 521
. : milestone, 499,
iast_FULL (662.328 µs) : 641, 684
. : milestone, 662,
iast_GLOBAL (517.885 µs) : 496, 539
. : milestone, 518,
iast_HARDCODED_SECRET_DISABLED (502.426 µs) : 481, 524
. : milestone, 502,
iast_INACTIVE (453.792 µs) : 433, 475
. : milestone, 454,
iast_TELEMETRY_OFF (484.824 µs) : 463, 506
. : milestone, 485,
tracing (453.682 µs) : 433, 475
. : milestone, 454,
section candidate
no_agent (379.713 µs) : 360, 400
. : milestone, 380,
iast (497.694 µs) : 476, 519
. : milestone, 498,
iast_FULL (655.235 µs) : 634, 677
. : milestone, 655,
iast_GLOBAL (528.697 µs) : 506, 552
. : milestone, 529,
iast_HARDCODED_SECRET_DISABLED (494.784 µs) : 473, 516
. : milestone, 495,
iast_INACTIVE (453.812 µs) : 432, 475
. : milestone, 454,
iast_TELEMETRY_OFF (485.49 µs) : 464, 507
. : milestone, 485,
tracing (457.438 µs) : 437, 478
. : milestone, 457,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~d702a13e68, baseline=1.46.0-SNAPSHOT~8b63e5a85b
dateFormat X
axisFormat %s
section baseline
no_agent (1.343 ms) : 1323, 1364
. : milestone, 1343,
appsec (1.764 ms) : 1740, 1787
. : milestone, 1764,
appsec_no_iast (1.756 ms) : 1731, 1782
. : milestone, 1756,
iast (1.499 ms) : 1476, 1522
. : milestone, 1499,
profiling (1.566 ms) : 1541, 1590
. : milestone, 1566,
tracing (1.475 ms) : 1450, 1500
. : milestone, 1475,
section candidate
no_agent (1.328 ms) : 1309, 1348
. : milestone, 1328,
appsec (1.757 ms) : 1734, 1780
. : milestone, 1757,
appsec_no_iast (1.76 ms) : 1737, 1783
. : milestone, 1760,
iast (1.496 ms) : 1473, 1519
. : milestone, 1496,
profiling (1.496 ms) : 1473, 1520
. : milestone, 1496,
tracing (1.472 ms) : 1447, 1497
. : milestone, 1472,
Dacapo |
vandonr
changed the title
Change hash computation for protobuf to better represent impacting changes
Change hash computation for protobuf to better represent impacting changes + save proto number in schema
Jan 15, 2025
piochelepiotr
approved these changes
Jan 15, 2025
vandonr
added
comp: api
Tracer public API
and removed
comp: api
Tracer public API
labels
Jan 16, 2025
amarziali
approved these changes
Jan 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
comp: data streams
Data Streams Monitoring
inst: protobuf
Protocol Buffer instrumentation
type: enhancement
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
Change the way the hash is computed for protobuf schemas:
It should also be marginally faster as we don't hash a whole string, and also isolates the hash from json shennanigans like the OpenAPI version for instance.
This new hash computation is aligned with what's done in the dotnet version of the instrumentation in DataDog/dd-trace-dotnet#6166
ℹ️ Also add protobuf number to the OpenAPI schema saved, so that we can reconstruct the hash if needed, and also because it's an important component of a protobuf schema.
Additional Notes
Depending on how schema hashes are used now in DSM, when deploying this, it may look to users as if all their schemas changed
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]