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

added DD_GIT_* tags for serverless #28139

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

shreyamalpani
Copy link

What does this PR do?

  • Adds tags for the DD_GIT_COMMIT_SHA and DD_GIT_REPOSITORY_URL environment variables

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

@shreyamalpani shreyamalpani requested a review from a team as a code owner August 1, 2024 20:05
@bits-bot
Copy link
Collaborator

bits-bot commented Aug 1, 2024

CLA assistant check
All committers have signed the CLA.

@shreyamalpani shreyamalpani marked this pull request as draft August 1, 2024 20:10
@pr-commenter
Copy link

pr-commenter bot commented Aug 1, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=40724852 --os-family=ubuntu

Note: This applies to commit 51c2025

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Serverless Benchmark Results

BenchmarkStartEndInvocation comparison between 946ce87 and fea3ee7.

tl;dr

Use these benchmarks as an insight tool during development.

  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.

I need more help

First off, do not worry if the benchmarks are failing. They are not tests. The intention is for them to be a tool for you to use during development.

If you would like a hand interpreting the results come chat with us in #serverless-agent in the internal DataDog slack or in #serverless in the public DataDog slack. We're happy to help!

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                            87.77µ ± 4%   88.30µ ± 5%       ~ (p=0.739 n=10)
api-gateway-kong-appsec.json                       68.51µ ± 2%   70.83µ ± 3%  +3.39% (p=0.002 n=10)
api-gateway-kong.json                              67.42µ ± 1%   70.11µ ± 1%  +4.00% (p=0.000 n=10)
api-gateway-non-proxy-async.json                   106.4µ ± 1%   111.9µ ± 1%  +5.15% (p=0.000 n=10)
api-gateway-non-proxy.json                         106.6µ ± 2%   107.3µ ± 2%  +0.69% (p=0.009 n=10)
api-gateway-websocket-connect.json                 71.06µ ± 3%   70.20µ ± 1%  -1.21% (p=0.005 n=10)
api-gateway-websocket-default.json                 64.00µ ± 1%   63.65µ ± 2%       ~ (p=0.165 n=10)
api-gateway-websocket-disconnect.json              63.98µ ± 2%   63.72µ ± 1%       ~ (p=0.912 n=10)
api-gateway.json                                   117.0µ ± 1%   119.0µ ± 2%  +1.71% (p=0.035 n=10)
application-load-balancer.json                     63.57µ ± 1%   64.93µ ± 1%  +2.14% (p=0.000 n=10)
cloudfront.json                                    48.56µ ± 2%   48.85µ ± 1%       ~ (p=0.247 n=10)
cloudwatch-events.json                             38.15µ ± 1%   38.19µ ± 2%       ~ (p=0.436 n=10)
cloudwatch-logs.json                               67.20µ ± 1%   66.74µ ± 1%       ~ (p=0.089 n=10)
custom.json                                        30.81µ ± 2%   30.99µ ± 1%       ~ (p=0.739 n=10)
dynamodb.json                                      95.87µ ± 2%   95.44µ ± 1%       ~ (p=0.353 n=10)
empty.json                                         29.39µ ± 2%   29.08µ ± 1%  -1.06% (p=0.009 n=10)
eventbridge-custom.json                            42.30µ ± 2%   42.61µ ± 3%       ~ (p=0.853 n=10)
http-api.json                                      73.83µ ± 2%   73.35µ ± 2%       ~ (p=0.165 n=10)
kinesis-batch.json                                 72.15µ ± 2%   70.79µ ± 1%  -1.89% (p=0.009 n=10)
kinesis.json                                       55.31µ ± 1%   53.58µ ± 2%  -3.13% (p=0.003 n=10)
s3.json                                            60.67µ ± 1%   59.12µ ± 1%  -2.55% (p=0.001 n=10)
sns-batch.json                                     92.94µ ± 2%   91.85µ ± 1%       ~ (p=0.089 n=10)
sns.json                                           66.57µ ± 3%   65.78µ ± 2%       ~ (p=0.165 n=10)
snssqs.json                                        115.2µ ± 2%   112.8µ ± 2%  -2.07% (p=0.001 n=10)
snssqs_no_dd_context.json                         101.28µ ± 1%   99.47µ ± 4%       ~ (p=0.165 n=10)
sqs-aws-header.json                                56.47µ ± 2%   56.20µ ± 2%       ~ (p=0.075 n=10)
sqs-batch.json                                     97.14µ ± 1%   96.37µ ± 2%       ~ (p=0.165 n=10)
sqs.json                                           71.81µ ± 2%   70.57µ ± 2%  -1.73% (p=0.003 n=10)
sqs_no_dd_context.json                             64.59µ ± 3%   62.31µ ± 2%  -3.53% (p=0.000 n=10)
geomean                                            68.17µ        68.02µ       -0.21%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │          B/op          │     B/op      vs base               │
api-gateway-appsec.json                           37.25Ki ± 0%   37.33Ki ± 0%  +0.19% (p=0.000 n=10)
api-gateway-kong-appsec.json                      26.92Ki ± 0%   26.93Ki ± 0%       ~ (p=0.516 n=10)
api-gateway-kong.json                             24.41Ki ± 0%   24.42Ki ± 0%       ~ (p=0.402 n=10)
api-gateway-non-proxy-async.json                  48.01Ki ± 0%   48.08Ki ± 0%  +0.14% (p=0.000 n=10)
api-gateway-non-proxy.json                        47.24Ki ± 0%   47.28Ki ± 0%  +0.08% (p=0.000 n=10)
api-gateway-websocket-connect.json                25.45Ki ± 0%   25.48Ki ± 0%  +0.10% (p=0.000 n=10)
api-gateway-websocket-default.json                21.35Ki ± 0%   21.38Ki ± 0%  +0.12% (p=0.001 n=10)
api-gateway-websocket-disconnect.json             21.14Ki ± 0%   21.17Ki ± 0%  +0.14% (p=0.000 n=10)
api-gateway.json                                  49.54Ki ± 0%   49.55Ki ± 0%       ~ (p=0.324 n=10)
application-load-balancer.json                    22.32Ki ± 0%   23.25Ki ± 0%  +4.19% (p=0.000 n=10)
cloudfront.json                                   17.65Ki ± 0%   17.65Ki ± 0%       ~ (p=0.380 n=10)
cloudwatch-events.json                            11.69Ki ± 0%   11.72Ki ± 0%  +0.26% (p=0.000 n=10)
cloudwatch-logs.json                              53.38Ki ± 0%   53.36Ki ± 0%       ~ (p=0.171 n=10)
custom.json                                       9.711Ki ± 0%   9.721Ki ± 0%       ~ (p=0.078 n=10)
dynamodb.json                                     40.69Ki ± 0%   40.69Ki ± 0%       ~ (p=0.425 n=10)
empty.json                                        9.279Ki ± 0%   9.288Ki ± 0%       ~ (p=0.209 n=10)
eventbridge-custom.json                           13.40Ki ± 0%   13.44Ki ± 0%  +0.28% (p=0.014 n=10)
http-api.json                                     23.72Ki ± 0%   23.78Ki ± 0%  +0.24% (p=0.001 n=10)
kinesis-batch.json                                27.03Ki ± 0%   27.05Ki ± 0%       ~ (p=0.079 n=10)
kinesis.json                                      17.79Ki ± 0%   17.81Ki ± 0%       ~ (p=0.239 n=10)
s3.json                                           20.29Ki ± 0%   20.35Ki ± 0%  +0.33% (p=0.045 n=10)
sns-batch.json                                    38.67Ki ± 0%   38.65Ki ± 0%       ~ (p=0.425 n=10)
sns.json                                          23.96Ki ± 0%   24.01Ki ± 0%       ~ (p=0.617 n=10)
snssqs.json                                       50.76Ki ± 0%   50.79Ki ± 0%       ~ (p=0.425 n=10)
snssqs_no_dd_context.json                         44.79Ki ± 0%   44.87Ki ± 0%       ~ (p=0.086 n=10)
sqs-aws-header.json                               18.83Ki ± 0%   18.85Ki ± 0%       ~ (p=0.109 n=10)
sqs-batch.json                                    41.63Ki ± 0%   41.66Ki ± 0%       ~ (p=0.517 n=10)
sqs.json                                          25.56Ki ± 0%   25.56Ki ± 0%       ~ (p=0.739 n=10)
sqs_no_dd_context.json                            20.66Ki ± 0%   20.71Ki ± 1%       ~ (p=0.393 n=10)
geomean                                           25.70Ki        25.76Ki       +0.25%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │       allocs/op        │ allocs/op   vs base                 │
api-gateway-appsec.json                             629.5 ± 0%   629.5 ± 0%       ~ (p=1.000 n=10)
api-gateway-kong-appsec.json                        488.0 ± 0%   488.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-kong.json                               466.0 ± 0%   466.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-non-proxy-async.json                    725.0 ± 0%   726.0 ± 0%       ~ (p=0.370 n=10)
api-gateway-non-proxy.json                          716.0 ± 0%   716.0 ± 0%       ~ (p=0.474 n=10)
api-gateway-websocket-connect.json                  453.0 ± 0%   453.0 ± 0%       ~ (p=0.474 n=10)
api-gateway-websocket-default.json                  379.0 ± 0%   379.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-disconnect.json               370.0 ± 0%   370.0 ± 0%       ~ (p=1.000 n=10)
api-gateway.json                                    791.0 ± 0%   791.0 ± 0%       ~ (p=0.861 n=10)
application-load-balancer.json                      352.0 ± 0%   353.0 ± 0%  +0.28% (p=0.000 n=10)
cloudfront.json                                     284.0 ± 0%   284.0 ± 0%       ~ (p=1.000 n=10)
cloudwatch-events.json                              220.0 ± 0%   220.0 ± 0%       ~ (p=1.000 n=10)
cloudwatch-logs.json                                216.0 ± 0%   215.0 ± 0%       ~ (p=0.170 n=10)
custom.json                                         168.0 ± 0%   168.0 ± 0%       ~ (p=1.000 n=10)
dynamodb.json                                       589.0 ± 0%   589.0 ± 0%       ~ (p=1.000 n=10)
empty.json                                          160.0 ± 1%   159.5 ± 0%       ~ (p=1.000 n=10)
eventbridge-custom.json                             254.0 ± 0%   254.0 ± 0%       ~ (p=1.000 n=10)
http-api.json                                       433.0 ± 0%   433.0 ± 0%       ~ (p=1.000 n=10)
kinesis-batch.json                                  391.0 ± 0%   391.0 ± 0%       ~ (p=0.721 n=10)
kinesis.json                                        285.0 ± 0%   285.0 ± 0%       ~ (p=0.450 n=10)
s3.json                                             357.0 ± 0%   358.0 ± 0%       ~ (p=0.182 n=10)
sns-batch.json                                      455.0 ± 0%   455.0 ± 0%       ~ (p=0.706 n=10)
sns.json                                            323.0 ± 0%   323.0 ± 0%       ~ (p=0.539 n=10)
snssqs.json                                         450.0 ± 0%   450.0 ± 0%       ~ (p=0.336 n=10)
snssqs_no_dd_context.json                           399.0 ± 1%   399.0 ± 1%       ~ (p=0.595 n=10)
sqs-aws-header.json                                 274.0 ± 0%   274.0 ± 0%       ~ (p=0.466 n=10)
sqs-batch.json                                      503.0 ± 1%   503.5 ± 0%       ~ (p=0.569 n=10)
sqs.json                                            351.0 ± 1%   351.0 ± 0%       ~ (p=0.607 n=10)
sqs_no_dd_context.json                              324.0 ± 0%   324.5 ± 0%       ~ (p=0.728 n=10)
geomean                                             376.8        376.8       +0.01%
¹ all samples are equal

@pr-commenter
Copy link

pr-commenter bot commented Aug 1, 2024

Regression Detector

Regression Detector Results

Run ID: 0ac7832a-19f8-4d58-8d52-b9de722aeeb6 Metrics dashboard Target profiles

Baseline: 946ce87
Comparison: 51c2025

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

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.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
tcp_syslog_to_blackhole ingress throughput +9.27 [-4.29, +22.84] Logs
idle memory utilization +0.14 [+0.10, +0.17] Logs
uds_dogstatsd_to_api ingress throughput +0.00 [-0.00, +0.00] Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.01, +0.01] Logs
otel_to_otel_logs ingress throughput -0.13 [-0.94, +0.68] Logs
basic_py_check % cpu utilization -0.34 [-2.91, +2.23] Logs
file_tree memory utilization -0.83 [-0.90, -0.76] Logs
uds_dogstatsd_to_api_cpu % cpu utilization -1.06 [-1.94, -0.18] Logs
pycheck_1000_100byte_tags % cpu utilization -1.28 [-6.10, +3.53] Logs

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants