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

Add missing required field SNSEntity.MessageAttributes. #21631

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

purple4reina
Copy link
Contributor

What does this PR do?

Add missing field SNSEntity.MessageAttributes.

Two PRs were pushed to main around the same time. The first added the need for this MessageAttributes field. The second created custom aws event types which did not include the MessageAttributes field.

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.

@purple4reina purple4reina added changelog/no-changelog [deprecated] qa/skip-qa - use other qa/ labels [DEPRECATED] Please use qa/done or qa/no-code-change to skip creating a QA card team/serverless labels Dec 18, 2023
@purple4reina purple4reina added this to the Triage milestone Dec 18, 2023
@purple4reina purple4reina requested a review from a team as a code owner December 18, 2023 19:25
Copy link
Contributor

@joeyzhao2018 joeyzhao2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@purple4reina
Copy link
Contributor Author

Serverless Binary Size and Serverless Benchmarks are failing. This is expected. Both will attempt to build the serverless extension from main without this PR. This expectedly fails because of the missing struct field.

@purple4reina purple4reina added the qa/done QA done before merge and regressions are covered by tests label Dec 18, 2023
Copy link
Contributor

Serverless Benchmark Results

BenchmarkStartEndInvocation comparison between 2bbefc8 and deb810a.

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                
                                      │   current    │
                                      │    sec/op    │
api-gateway-appsec.json                 142.7µ ±  3%
api-gateway-kong-appsec.json            99.47µ ±  1%
api-gateway-kong.json                   95.71µ ±  2%
api-gateway-non-proxy-async.json        146.1µ ±  2%
api-gateway-non-proxy.json              145.8µ ±  2%
api-gateway-websocket-connect.json      96.82µ ±  3%
api-gateway-websocket-default.json      82.90µ ±  2%
api-gateway-websocket-disconnect.json   83.84µ ±  3%
api-gateway.json                        167.7µ ±  3%
application-load-balancer.json          81.78µ ±  5%
cloudfront.json                         66.19µ ±  7%
cloudwatch-events.json                  48.60µ ±  5%
cloudwatch-logs.json                    62.41µ ± 13%
custom.json                             32.87µ ±  4%
dynamodb.json                           149.7µ ±  5%
empty.json                              35.27µ ±  5%
eventbridge-custom.json                 55.33µ ±  8%
http-api.json                           97.81µ ±  7%
kinesis-batch.json                      118.5µ ±  7%
kinesis.json                            80.80µ ±  9%
s3.json                                 96.37µ ± 14%
sns-batch.json                          133.2µ ± 12%
sns.json                                99.50µ ±  8%
snssqs.json                             147.4µ ± 11%
snssqs_no_dd_context.json               165.3µ ± 16%
sqs-aws-header.json                     87.98µ ± 11%
sqs-batch.json                          167.1µ ± 13%
sqs.json                                123.6µ ± 15%
sqs_no_dd_context.json                  102.5µ ± 18%
geomean                                 95.70µ

                                      │    current    │
                                      │     B/op      │
api-gateway-appsec.json                 39.99Ki ±  3%
api-gateway-kong-appsec.json            28.03Ki ± 11%
api-gateway-kong.json                   25.45Ki ± 23%
api-gateway-non-proxy-async.json        49.91Ki ±  0%
api-gateway-non-proxy.json              48.48Ki ±  0%
api-gateway-websocket-connect.json      28.69Ki ±  0%
api-gateway-websocket-default.json      22.95Ki ±  0%
api-gateway-websocket-disconnect.json   22.58Ki ±  0%
api-gateway.json                        52.27Ki ±  0%
application-load-balancer.json          23.35Ki ±  0%
cloudfront.json                         18.58Ki ±  0%
cloudwatch-events.json                  12.17Ki ±  0%
cloudwatch-logs.json                    54.13Ki ±  0%
custom.json                             9.694Ki ±  0%
dynamodb.json                           41.78Ki ±  0%
empty.json                              9.146Ki ±  0%
eventbridge-custom.json                 13.72Ki ±  0%
http-api.json                           24.18Ki ±  0%
kinesis-batch.json                      27.66Ki ±  0%
kinesis.json                            18.23Ki ±  0%
s3.json                                 20.72Ki ±  0%
sns-batch.json                          40.84Ki ±  0%
sns.json                                24.96Ki ±  0%
snssqs.json                             43.77Ki ±  0%
snssqs_no_dd_context.json               36.75Ki ±  0%
sqs-aws-header.json                     19.34Ki ±  0%
sqs-batch.json                          42.09Ki ±  0%
sqs.json                                25.89Ki ±  0%
sqs_no_dd_context.json                  20.68Ki ±  0%
geomean                                 26.24Ki

                                      │  current   │
                                      │ allocs/op  │
api-gateway-appsec.json                 464.0 ± 0%
api-gateway-kong-appsec.json            439.0 ± 0%
api-gateway-kong.json                   422.0 ± 0%
api-gateway-non-proxy-async.json        589.0 ± 0%
api-gateway-non-proxy.json              580.0 ± 0%
api-gateway-websocket-connect.json      388.0 ± 0%
api-gateway-websocket-default.json      318.0 ± 0%
api-gateway-websocket-disconnect.json   313.0 ± 0%
api-gateway.json                        640.0 ± 0%
application-load-balancer.json          329.0 ± 0%
cloudfront.json                         246.0 ± 0%
cloudwatch-events.json                  221.0 ± 0%
cloudwatch-logs.json                    211.0 ± 0%
custom.json                             172.0 ± 0%
dynamodb.json                           413.0 ± 0%
empty.json                              161.0 ± 0%
eventbridge-custom.json                 241.0 ± 0%
http-api.json                           379.0 ± 0%
kinesis-batch.json                      297.0 ± 0%
kinesis.json                            244.0 ± 0%
s3.json                                 282.0 ± 0%
sns-batch.json                          349.0 ± 0%
sns.json                                275.0 ± 0%
snssqs.json                             333.0 ± 0%
snssqs_no_dd_context.json               288.5 ± 0%
sqs-aws-header.json                     239.0 ± 0%
sqs-batch.json                          391.0 ± 0%
sqs.json                                298.0 ± 0%
sqs_no_dd_context.json                  276.0 ± 0%
geomean                                 319.2

@pr-commenter
Copy link

pr-commenter bot commented Dec 18, 2023

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 31013e4f-1537-44f0-9991-2df169e409ad
Baseline: 2bbefc8
Comparison: 2544a2d
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

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.

Declared stable experiments that are now erratic

An experiment is erratic (i.e., not stable) if its coefficient of variation is at least 0.10.

perf experiment goal Δ mean % Δ mean % CI confidence
otel_to_otel_logs ingress throughput +0.11 [-0.67, +0.89] 18.15%

Declared erratic experiments that are now stable

An experiment is stable (i.e., not erratic) if its coefficient of variation is less than 0.10.

perf experiment goal Δ mean % Δ mean % CI confidence
file_tree memory utilization +0.22 [+0.12, +0.33] 99.96%
idle memory utilization +0.15 [+0.12, +0.18] 100.00%

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI confidence
process_agent_standard_check_with_stats memory utilization +0.55 [+0.51, +0.59] 100.00%
file_tree memory utilization +0.22 [+0.12, +0.33] 99.96%
idle memory utilization +0.15 [+0.12, +0.18] 100.00%
process_agent_real_time_mode memory utilization +0.11 [+0.08, +0.14] 100.00%
otel_to_otel_logs ingress throughput +0.11 [-0.67, +0.89] 18.15%
dogstatsd_string_interner_8MiB_100k ingress throughput +0.00 [-0.00, +0.00] 0.31%
dogstatsd_string_interner_64MiB_100 ingress throughput +0.00 [-0.04, +0.04] 0.00%
uds_dogstatsd_to_api ingress throughput +0.00 [-0.04, +0.04] 0.00%
dogstatsd_string_interner_64MiB_1k ingress throughput +0.00 [-0.04, +0.04] 0.00%
dogstatsd_string_interner_8MiB_10k ingress throughput +0.00 [-0.04, +0.04] 0.00%
dogstatsd_string_interner_8MiB_100 ingress throughput +0.00 [-0.04, +0.04] 0.00%
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.06, +0.06] 0.00%
dogstatsd_string_interner_128MiB_100 ingress throughput +0.00 [-0.05, +0.05] 0.00%
dogstatsd_string_interner_8MiB_1k ingress throughput -0.00 [-0.04, +0.04] 0.00%
dogstatsd_string_interner_8MiB_50k ingress throughput -0.00 [-0.04, +0.04] 0.00%
dogstatsd_string_interner_128MiB_1k ingress throughput -0.00 [-0.05, +0.05] 0.00%
trace_agent_json ingress throughput -0.02 [-0.04, +0.01] 71.21%
trace_agent_msgpack ingress throughput -0.03 [-0.05, -0.02] 99.78%
tcp_syslog_to_blackhole ingress throughput -0.06 [-0.12, +0.00] 89.52%
process_agent_standard_check memory utilization -0.12 [-0.17, -0.08] 100.00%
file_to_blackhole % cpu utilization -1.31 [-7.86, +5.25] 25.65%

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

@purple4reina purple4reina merged commit 04b6582 into main Dec 18, 2023
175 of 177 checks passed
@purple4reina purple4reina deleted the rey.abolofia/sns-attr-field branch December 18, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog [deprecated] qa/skip-qa - use other qa/ labels [DEPRECATED] Please use qa/done or qa/no-code-change to skip creating a QA card qa/done QA done before merge and regressions are covered by tests team/serverless
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants