datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

[Serverless] remove h2non dependency

Open maxday opened this issue 1 year ago • 9 comments

What does this PR do?

Remove h2non from the serverless build

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

  • [ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • [ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • [ ] A release note has been added or the changelog/no-changelog label has been applied.
  • [ ] Changed code has automated tests for its functionality.
  • [ ] Adequate QA/testing plan information is provided. Except if the qa/skip-qa label, with required either qa/done or qa/no-code-change labels, are applied.
  • [ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • [ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • [ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
  • [ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • [ ] If applicable, the config template has been updated.

maxday avatar Jan 22 '24 20:01 maxday

Go Package Import Differences

Baseline: 10051595024fc6899519547e4572873faf735419 Comparison: b9c717faf75981471ef7e44adb053783fe4cb060

binaryosarchchange
serverlesslinuxamd64
+0, -4
-github.com/h2non/filetype
-github.com/h2non/filetype/matchers
-github.com/h2non/filetype/matchers/isobmff
-github.com/h2non/filetype/types
serverlesslinuxarm64
+0, -4
-github.com/h2non/filetype
-github.com/h2non/filetype/matchers
-github.com/h2non/filetype/matchers/isobmff
-github.com/h2non/filetype/types

cit-pr-commenter[bot] avatar Jan 22 '24 20:01 cit-pr-commenter[bot]

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 02de3716-dc76-4272-8263-6e5c8dcc9274 Baseline: 10051595024fc6899519547e4572873faf735419 Comparison: f5840c560c6d274ca3f27f0b8fba94a42b77275d Total CPUs: 7

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

Experiments with missing or malformed data

  • basic_py_check

Usually, this warning means that there is no usable optimization goal data for that experiment, which could be a result of misconfiguration.

No significant changes in experiment optimization goals

Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +1.37 [-5.22, +7.96]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +1.37 [-5.22, +7.96]
process_agent_real_time_mode memory utilization +0.94 [+0.90, +0.98]
idle memory utilization +0.55 [+0.51, +0.59]
tcp_syslog_to_blackhole ingress throughput +0.50 [+0.45, +0.56]
process_agent_standard_check_with_stats memory utilization +0.18 [+0.13, +0.23]
otel_to_otel_logs ingress throughput +0.13 [-0.50, +0.76]
trace_agent_json ingress throughput +0.01 [-0.03, +0.04]
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.00, +0.00]
uds_dogstatsd_to_api ingress throughput +0.00 [-0.00, +0.00]
trace_agent_msgpack ingress throughput +0.00 [-0.00, +0.00]
process_agent_standard_check memory utilization -0.02 [-0.06, +0.01]
file_tree memory utilization -0.39 [-0.47, -0.30]
uds_dogstatsd_to_api_cpu % cpu utilization -2.03 [-3.44, -0.62]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

pr-commenter[bot] avatar Jan 22 '24 21:01 pr-commenter[bot]

/merge

maxday avatar Feb 26 '24 16:02 maxday

:steam_locomotive: MergeQueue

Pull request added to the queue.

There are 13 builds ahead! (estimated merge in less than 3h)

Use /merge -c to cancel this operation!

dd-devflow[bot] avatar Feb 26 '24 16:02 dd-devflow[bot]

:x: MergeQueue

Tests failed on this commit e234e02

You should fix those tests and then re-add your pull request to the queue!

Details

some checks are failing:

If you need support, contact us on Slack #ci-interfaces with those details!

dd-devflow[bot] avatar Feb 26 '24 20:02 dd-devflow[bot]

/merge

maxday avatar Feb 27 '24 18:02 maxday

:steam_locomotive: MergeQueue

Pull request added to the queue.

There are 7 builds ahead! (estimated merge in less than 2h)

Use /merge -c to cancel this operation!

dd-devflow[bot] avatar Feb 27 '24 18:02 dd-devflow[bot]

:x: MergeQueue

Tests failed on this commit a033de0

You should fix those tests and then re-add your pull request to the queue!

Details

some checks are failing:

If you need support, contact us on Slack #ci-interfaces with those details!

dd-devflow[bot] avatar Feb 27 '24 21:02 dd-devflow[bot]

/merge

maxday avatar Mar 04 '24 15:03 maxday

:steam_locomotive: MergeQueue

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals. Note: if you pushed new commits since the last approval, you may need additional approval. You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!

dd-devflow[bot] avatar Mar 04 '24 15:03 dd-devflow[bot]

Serverless Benchmark Results

BenchmarkStartEndInvocation comparison between d46233ee827e4b4782c6a4709fc945562a53225c and 079b7237a320f2c19ff8138151e2b37a4cc983c1.

tl;dr
  1. Skim down the vs base column in each chart. If there is a ~, then there was no statistically significant change to the benchmark. Otherwise, ensure the estimated percent change is either negative or very small.

  2. The last row of each chart is the geomean. Ensure this percentage is either negative or very small.

What is this benchmarking?

The BenchmarkStartEndInvocation compares the amount of time it takes to call the start-invocation and end-invocation endpoints. For universal instrumentation languages (Dotnet, Golang, Java, Ruby), this represents the majority of the duration overhead added by our tracing layer.

The benchmark is run using a large variety of lambda request payloads. In the charts below, there is one row for each event payload type.

How do I interpret these charts?

The charts below comes from benchstat. They represent the statistical change in duration (sec/op), memory overhead (B/op), and allocations (allocs/op).

The benchstat docs explain how to interpret these charts.

Before the comparison table, we see common file-level configuration. If there are benchmarks with different configuration (for example, from different packages), benchstat will print separate tables for each configuration.

The table then compares the two input files for each benchmark. It shows the median and 95% confidence interval summaries for each benchmark before and after the change, and an A/B comparison under "vs base". ... The p-value measures how likely it is that any differences were due to random chance (i.e., noise). The "~" means benchstat did not detect a statistically significant difference between the two inputs. ...

Note that "statistically significant" is not the same as "large": with enough low-noise data, even very small changes can be distinguished from noise and considered statistically significant. It is, of course, generally easier to distinguish large changes from noise.

Finally, the last row of the table shows the geometric mean of each column, giving an overall picture of how the benchmarks changed. Proportional changes in the geomean reflect proportional changes in the benchmarks. For example, given n benchmarks, if sec/op for one of them increases by a factor of 2, then the sec/op geomean will increase by a factor of ⁿ√2.

Benchmark stats
goos: linux
goarch: amd64
pkg: github.com/DataDog/datadog-agent/pkg/serverless/daemon
cpu: AMD EPYC 7763 64-Core Processor                
                                      │ baseline/benchmark.log │       current/benchmark.log        │
                                      │         sec/op         │   sec/op     vs base               │
api-gateway-appsec.json                            85.97µ ± 7%   87.44µ ± 9%       ~ (p=0.280 n=10)
api-gateway-kong-appsec.json                       66.68µ ± 1%   67.53µ ± 2%  +1.28% (p=0.019 n=10)
api-gateway-kong.json                              65.30µ ± 3%   65.05µ ± 3%       ~ (p=0.436 n=10)
api-gateway-non-proxy-async.json                   103.2µ ± 2%   105.0µ ± 1%  +1.81% (p=0.029 n=10)
api-gateway-non-proxy.json                         109.3µ ± 5%   104.6µ ± 1%       ~ (p=0.089 n=10)
api-gateway-websocket-connect.json                 71.59µ ± 2%   68.40µ ± 1%  -4.46% (p=0.000 n=10)
api-gateway-websocket-default.json                 62.20µ ± 2%   61.62µ ± 1%       ~ (p=0.218 n=10)
api-gateway-websocket-disconnect.json              63.89µ ± 1%   61.21µ ± 1%  -4.19% (p=0.000 n=10)
api-gateway.json                                   115.2µ ± 3%   113.4µ ± 1%  -1.62% (p=0.011 n=10)
application-load-balancer.json                     63.19µ ± 1%   61.54µ ± 1%  -2.61% (p=0.000 n=10)
cloudfront.json                                    47.81µ ± 3%   46.63µ ± 2%  -2.47% (p=0.000 n=10)
cloudwatch-events.json                             38.25µ ± 1%   36.71µ ± 3%  -4.00% (p=0.000 n=10)
cloudwatch-logs.json                               67.76µ ± 2%   63.88µ ± 1%  -5.72% (p=0.000 n=10)
custom.json                                        30.22µ ± 2%   29.19µ ± 1%  -3.42% (p=0.000 n=10)
dynamodb.json                                      95.79µ ± 2%   94.68µ ± 1%       ~ (p=0.075 n=10)
empty.json                                         28.59µ ± 2%   28.21µ ± 1%  -1.33% (p=0.043 n=10)
eventbridge-custom.json                            42.60µ ± 2%   40.58µ ± 2%  -4.74% (p=0.000 n=10)
http-api.json                                      73.56µ ± 3%   71.24µ ± 1%  -3.16% (p=0.000 n=10)
kinesis-batch.json                                 71.59µ ± 4%   70.36µ ± 1%  -1.71% (p=0.001 n=10)
kinesis.json                                       56.54µ ± 2%   52.81µ ± 2%  -6.60% (p=0.000 n=10)
s3.json                                            60.76µ ± 2%   58.09µ ± 1%  -4.40% (p=0.000 n=10)
sns-batch.json                                     92.99µ ± 3%   89.73µ ± 2%  -3.50% (p=0.000 n=10)
sns.json                                           65.01µ ± 2%   62.94µ ± 1%  -3.19% (p=0.000 n=10)
snssqs.json                                        109.1µ ± 1%   104.6µ ± 1%  -4.11% (p=0.000 n=10)
snssqs_no_dd_context.json                         102.59µ ± 2%   98.85µ ± 1%  -3.65% (p=0.000 n=10)
sqs-aws-header.json                                56.83µ ± 2%   53.77µ ± 3%  -5.38% (p=0.000 n=10)
sqs-batch.json                                     97.57µ ± 2%   93.46µ ± 3%  -4.21% (p=0.000 n=10)
sqs.json                                           70.46µ ± 1%   67.61µ ± 1%  -4.04% (p=0.000 n=10)
sqs_no_dd_context.json                             62.82µ ± 1%   59.95µ ± 2%  -4.57% (p=0.001 n=10)
geomean                                            67.55µ        65.56µ       -2.95%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │          B/op          │     B/op      vs base               │
api-gateway-appsec.json                           37.02Ki ± 0%   36.96Ki ± 0%  -0.17% (p=0.000 n=10)
api-gateway-kong-appsec.json                      26.63Ki ± 0%   26.62Ki ± 0%       ~ (p=0.670 n=10)
api-gateway-kong.json                             24.11Ki ± 0%   24.11Ki ± 0%       ~ (p=0.516 n=10)
api-gateway-non-proxy-async.json                  47.82Ki ± 0%   47.76Ki ± 0%  -0.13% (p=0.000 n=10)
api-gateway-non-proxy.json                        47.03Ki ± 0%   46.97Ki ± 0%  -0.14% (p=0.000 n=10)
api-gateway-websocket-connect.json                25.24Ki ± 0%   25.19Ki ± 0%  -0.18% (p=0.000 n=10)
api-gateway-websocket-default.json                21.13Ki ± 0%   21.10Ki ± 0%  -0.17% (p=0.000 n=10)
api-gateway-websocket-disconnect.json             20.92Ki ± 0%   20.88Ki ± 0%  -0.17% (p=0.000 n=10)
api-gateway.json                                  49.29Ki ± 0%   49.27Ki ± 0%  -0.04% (p=0.014 n=10)
application-load-balancer.json                    23.00Ki ± 0%   22.06Ki ± 0%  -4.11% (p=0.000 n=10)
cloudfront.json                                   17.41Ki ± 0%   17.38Ki ± 0%  -0.16% (p=0.001 n=10)
cloudwatch-events.json                            11.48Ki ± 0%   11.44Ki ± 0%  -0.31% (p=0.000 n=10)
cloudwatch-logs.json                              53.12Ki ± 0%   53.10Ki ± 0%  -0.03% (p=0.045 n=10)
custom.json                                       9.484Ki ± 0%   9.465Ki ± 0%  -0.20% (p=0.004 n=10)
dynamodb.json                                     40.45Ki ± 0%   40.43Ki ± 0%  -0.05% (p=0.023 n=10)
empty.json                                        9.045Ki ± 0%   9.016Ki ± 0%  -0.32% (p=0.024 n=10)
eventbridge-custom.json                           13.20Ki ± 0%   13.14Ki ± 0%  -0.40% (p=0.000 n=10)
http-api.json                                     23.50Ki ± 0%   23.44Ki ± 0%  -0.26% (p=0.001 n=10)
kinesis-batch.json                                26.80Ki ± 0%   26.77Ki ± 0%  -0.12% (p=0.004 n=10)
kinesis.json                                      17.61Ki ± 0%   17.54Ki ± 0%  -0.37% (p=0.000 n=10)
s3.json                                           20.13Ki ± 0%   20.07Ki ± 0%  -0.27% (p=0.001 n=10)
sns-batch.json                                    38.39Ki ± 0%   38.38Ki ± 0%       ~ (p=0.382 n=10)
sns.json                                          23.77Ki ± 0%   23.73Ki ± 0%  -0.15% (p=0.034 n=10)
snssqs.json                                       49.44Ki ± 0%   49.33Ki ± 0%  -0.23% (p=0.000 n=10)
snssqs_no_dd_context.json                         44.62Ki ± 0%   44.53Ki ± 0%  -0.21% (p=0.001 n=10)
sqs-aws-header.json                               18.65Ki ± 0%   18.56Ki ± 0%  -0.47% (p=0.016 n=10)
sqs-batch.json                                    41.40Ki ± 0%   41.39Ki ± 0%       ~ (p=0.481 n=10)
sqs.json                                          25.35Ki ± 1%   25.34Ki ± 0%       ~ (p=1.000 n=10)
sqs_no_dd_context.json                            20.46Ki ± 0%   20.40Ki ± 0%       ~ (p=0.052 n=10)
geomean                                           25.46Ki        25.38Ki       -0.32%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │       allocs/op        │ allocs/op   vs base                 │
api-gateway-appsec.json                             629.0 ± 0%   628.5 ± 0%       ~ (p=1.000 n=10)
api-gateway-kong-appsec.json                        487.0 ± 0%   487.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-kong.json                               465.0 ± 0%   465.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-non-proxy-async.json                    724.0 ± 0%   724.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-non-proxy.json                          715.0 ± 0%   715.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-connect.json                  452.0 ± 0%   452.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-websocket-default.json                  378.0 ± 0%   378.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-websocket-disconnect.json               368.0 ± 0%   368.0 ± 0%       ~ (p=0.474 n=10)
api-gateway.json                                    789.0 ± 0%   789.0 ± 0%       ~ (p=0.303 n=10)
application-load-balancer.json                      351.0 ± 0%   350.0 ± 0%  -0.28% (p=0.001 n=10)
cloudfront.json                                     282.0 ± 0%   282.0 ± 0%       ~ (p=1.000 n=10)
cloudwatch-events.json                              219.0 ± 0%   219.0 ± 0%       ~ (p=1.000 n=10)
cloudwatch-logs.json                                214.0 ± 0%   214.0 ± 0%       ~ (p=0.087 n=10)
custom.json                                         167.0 ± 0%   167.0 ± 0%       ~ (p=1.000 n=10) ¹
dynamodb.json                                       588.0 ± 0%   588.0 ± 0%       ~ (p=0.277 n=10)
empty.json                                          158.0 ± 1%   158.0 ± 0%       ~ (p=0.211 n=10)
eventbridge-custom.json                             253.0 ± 0%   252.0 ± 0%       ~ (p=0.070 n=10)
http-api.json                                       431.0 ± 0%   431.0 ± 0%       ~ (p=1.000 n=10)
kinesis-batch.json                                  389.0 ± 0%   389.0 ± 0%       ~ (p=1.000 n=10)
kinesis.json                                        284.0 ± 0%   284.0 ± 0%       ~ (p=0.054 n=10)
s3.json                                             357.0 ± 0%   356.0 ± 0%  -0.28% (p=0.042 n=10)
sns-batch.json                                      454.0 ± 0%   453.0 ± 0%       ~ (p=0.264 n=10)
sns.json                                            322.0 ± 0%   322.0 ± 0%       ~ (p=0.135 n=10)
snssqs.json                                         423.0 ± 0%   423.0 ± 0%       ~ (p=0.191 n=10)
snssqs_no_dd_context.json                           398.0 ± 0%   398.0 ± 0%       ~ (p=0.326 n=10)
sqs-aws-header.json                                 273.0 ± 0%   272.0 ± 0%  -0.37% (p=0.005 n=10)
sqs-batch.json                                      502.0 ± 0%   502.0 ± 0%       ~ (p=0.670 n=10)
sqs.json                                            350.5 ± 1%   350.0 ± 0%       ~ (p=1.000 n=10)
sqs_no_dd_context.json                              323.5 ± 0%   323.0 ± 0%       ~ (p=0.442 n=10)
geomean                                             374.7        374.4       -0.07%
¹ all samples are equal

github-actions[bot] avatar Mar 04 '24 15:03 github-actions[bot]

/merge

maxday avatar Mar 04 '24 17:03 maxday

:x: MergeQueue

PR is already in db with waiting status

If you need support, contact us on Slack #ci-interfaces with those details!

dd-devflow[bot] avatar Mar 04 '24 17:03 dd-devflow[bot]

:warning: MergeQueue

This merge request was unqueued

If you need support, contact us on Slack #ci-interfaces!

dd-devflow[bot] avatar Mar 04 '24 19:03 dd-devflow[bot]

/merge

maxday avatar Mar 04 '24 20:03 maxday

:steam_locomotive: MergeQueue

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals. Note: if you pushed new commits since the last approval, you may need additional approval. You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!

dd-devflow[bot] avatar Mar 04 '24 20:03 dd-devflow[bot]

:warning: MergeQueue

This merge request was unqueued

If you need support, contact us on Slack #ci-interfaces!

dd-devflow[bot] avatar Mar 05 '24 00:03 dd-devflow[bot]

/merge

maxday avatar Mar 05 '24 11:03 maxday

:steam_locomotive: MergeQueue

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals. Note: if you pushed new commits since the last approval, you may need additional approval. You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!

dd-devflow[bot] avatar Mar 05 '24 11:03 dd-devflow[bot]

:steam_locomotive: MergeQueue

This pull request was merged directly.

dd-devflow[bot] avatar Mar 05 '24 15:03 dd-devflow[bot]