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

[ASCII-949] Migrate log component to new file hierarchy #21178

Merged
merged 9 commits into from
Dec 8, 2023

Conversation

ogaca-dd
Copy link
Contributor

What does this PR do?

This PR migrates the log component to the new file hierarchy. Most of the change are code moved or package renaming.

For a full review, it is recommend to review commit per commit.

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 if the qa/skip-qa label is not 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.

@ogaca-dd ogaca-dd 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 labels Nov 29, 2023
@ogaca-dd ogaca-dd added this to the 7.51.0 milestone Nov 29, 2023
@ogaca-dd ogaca-dd requested review from a team as code owners November 29, 2023 14:20
@ogaca-dd ogaca-dd changed the title Migrate log component to new file hierarchy [ASCII-949] Migrate log component to new file hierarchy Nov 29, 2023
Copy link

cit-pr-commenter bot commented Nov 29, 2023

Go Package Import Differences

Baseline: be37946
Comparison: 64fd185

binaryosarchchange
agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
agentwindowsamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
agentwindows386
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
agentdarwinamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
agentdarwinarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
iot-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
iot-agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
heroku-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
cluster-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
cluster-agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
cluster-agent-cloudfoundrylinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
cluster-agent-cloudfoundrylinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
dogstatsdlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
dogstatsdlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
process-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
process-agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
process-agentwindowsamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
process-agentdarwinamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
process-agentdarwinarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
heroku-process-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
security-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
security-agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
serverlesslinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
serverlesslinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
system-probelinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
system-probelinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
system-probewindowsamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
trace-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
trace-agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
trace-agentwindowsamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
trace-agentwindows386
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
trace-agentdarwinamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
trace-agentdarwinarm64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl
heroku-trace-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/comp/core/log/logimpl

@pr-commenter
Copy link

pr-commenter bot commented Nov 30, 2023

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 8fdfff14-b835-4ad1-9ff6-ce3bb1a34bdd
Baseline: be37946
Comparison: 64fd185
Total CPUs: 7

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

  • ✅ denotes better comparison variant performance
  • ❌ denotes worse comparison variant performance

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

No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%.

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.46 [-1.17, +0.25] 71.41%

Experiments with missing or malformed data

  • idle

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

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI confidence
tcp_syslog_to_blackhole ingress throughput +0.38 [+0.32, +0.43] 100.00%
file_tree egress throughput +0.15 [-1.65, +1.95] 10.77%
dogstatsd_string_interner_8MiB_100k ingress throughput +0.00 [-0.00, +0.01] 11.54%
dogstatsd_string_interner_128MiB_1k ingress throughput +0.00 [-0.00, +0.00] 0.00%
uds_dogstatsd_to_api ingress throughput +0.00 [-0.00, +0.00] 0.00%
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.00, +0.00] 0.00%
dogstatsd_string_interner_8MiB_10k ingress throughput +0.00 [-0.00, +0.00] 0.00%
dogstatsd_string_interner_8MiB_50k ingress throughput +0.00 [-0.00, +0.00] 0.00%
dogstatsd_string_interner_8MiB_1k ingress throughput +0.00 [-0.00, +0.00] 0.00%
dogstatsd_string_interner_64MiB_100 ingress throughput +0.00 [-0.00, +0.00] 0.00%
trace_agent_json ingress throughput +0.00 [-0.01, +0.01] 0.00%
trace_agent_msgpack ingress throughput +0.00 [-0.00, +0.00] 0.00%
dogstatsd_string_interner_8MiB_100 ingress throughput +0.00 [-0.00, +0.00] 0.00%
dogstatsd_string_interner_128MiB_100 ingress throughput +0.00 [-0.00, +0.00] 0.00%
dogstatsd_string_interner_64MiB_1k ingress throughput +0.00 [-0.00, +0.00] 0.00%
file_to_blackhole egress throughput -0.19 [-6.34, +5.97] 4.01%
otel_to_otel_logs ingress throughput -0.46 [-1.17, +0.25] 71.41%

Copy link
Member

@brycekahle brycekahle left a comment

Choose a reason for hiding this comment

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

👍 for ebpf-platform files

Copy link
Contributor

@dplepage-dd dplepage-dd left a comment

Choose a reason for hiding this comment

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

LGTM for network devices monitoring.

Copy link
Member

@L3n41c L3n41c left a comment

Choose a reason for hiding this comment

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

👍🏻 For files owned by @DataDog/container-integrations.

@ogaca-dd ogaca-dd requested a review from a team as a code owner December 1, 2023 10:40
@ogaca-dd ogaca-dd requested a review from songy23 December 1, 2023 10:40
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM for OTel

cc @liustanley

Copy link
Contributor

github-actions bot commented Dec 7, 2023

Serverless Benchmark Results

BenchmarkStartEndInvocation comparison between be37946 and 22696e5.

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                
                                      │   previous   │                current                │
                                      │    sec/op    │    sec/op      vs base                │
api-gateway-appsec.json                 159.1µ ±  2%    159.6µ ±  2%        ~ (p=0.436 n=10)
api-gateway-kong-appsec.json            105.3µ ±  2%    104.9µ ±  1%        ~ (p=0.796 n=10)
api-gateway-kong.json                   100.9µ ±  3%    101.2µ ±  2%        ~ (p=0.631 n=10)
api-gateway-non-proxy-async.json        157.2µ ±  2%    157.5µ ±  2%        ~ (p=0.912 n=10)
api-gateway-non-proxy.json              156.1µ ±  2%    157.9µ ±  2%        ~ (p=0.529 n=10)
api-gateway-websocket-connect.json      101.0µ ±  4%    101.7µ ±  4%        ~ (p=1.000 n=10)
api-gateway-websocket-default.json      84.67µ ±  4%    86.38µ ±  4%        ~ (p=0.165 n=10)
api-gateway-websocket-disconnect.json   83.82µ ±  4%    85.65µ ±  3%   +2.19% (p=0.046 n=10)
api-gateway.json                        183.5µ ±  4%    177.9µ ±  3%   -3.03% (p=0.035 n=10)
application-load-balancer.json          79.33µ ±  3%    80.08µ ±  4%        ~ (p=0.853 n=10)
cloudfront.json                         63.50µ ±  4%    64.22µ ±  5%        ~ (p=0.796 n=10)
cloudwatch-events.json                  49.26µ ±  4%    49.46µ ±  7%        ~ (p=0.481 n=10)
cloudwatch-logs.json                    67.15µ ±  4%    65.53µ ±  2%   -2.40% (p=0.007 n=10)
custom.json                             33.37µ ±  8%    31.81µ ±  3%        ~ (p=0.063 n=10)
dynamodb.json                           186.0µ ±  3%    174.8µ ±  5%   -6.00% (p=0.001 n=10)
empty.json                              32.79µ ± 10%    29.51µ ±  5%   -9.98% (p=0.000 n=10)
eventbridge-custom.json                 56.78µ ±  8%    52.30µ ±  2%   -7.88% (p=0.035 n=10)
http-api.json                           96.06µ ±  9%    89.66µ ±  4%   -6.66% (p=0.007 n=10)
kinesis-batch.json                      113.9µ ±  6%    104.9µ ±  5%   -7.92% (p=0.000 n=10)
kinesis.json                            82.05µ ±  9%    75.19µ ±  5%   -8.36% (p=0.000 n=10)
s3.json                                 98.59µ ± 11%    88.98µ ±  5%   -9.75% (p=0.002 n=10)
sns-batch.json                          153.5µ ± 11%    149.2µ ±  4%        ~ (p=0.123 n=10)
sns.json                                99.60µ ± 12%   101.29µ ±  5%        ~ (p=0.631 n=10)
snssqs.json                             166.4µ ± 10%    150.2µ ±  7%   -9.78% (p=0.023 n=10)
snssqs_no_dd_context.json               172.5µ ± 16%    140.5µ ± 10%  -18.53% (p=0.000 n=10)
sqs-aws-header.json                     96.25µ ± 14%    87.07µ ±  7%   -9.54% (p=0.009 n=10)
sqs-batch.json                          161.8µ ± 12%    156.9µ ±  6%        ~ (p=0.190 n=10)
sqs.json                                123.7µ ± 14%    104.4µ ±  9%  -15.65% (p=0.015 n=10)
sqs_no_dd_context.json                  104.8µ ± 18%    101.1µ ± 15%        ~ (p=0.280 n=10)
geomean                                 99.33µ          95.11µ         -4.25%

                                      │   previous    │               current                │
                                      │     B/op      │     B/op       vs base               │
api-gateway-appsec.json                 47.23Ki ±  2%   47.18Ki ±  2%       ~ (p=0.929 n=10)
api-gateway-kong-appsec.json            30.99Ki ± 10%   30.99Ki ± 13%       ~ (p=0.781 n=10)
api-gateway-kong.json                   28.31Ki ± 22%   28.31Ki ± 22%       ~ (p=0.565 n=10)
api-gateway-non-proxy-async.json        54.96Ki ±  0%   54.96Ki ±  0%       ~ (p=0.698 n=10)
api-gateway-non-proxy.json              53.52Ki ±  0%   53.52Ki ±  0%       ~ (p=0.423 n=10)
api-gateway-websocket-connect.json      31.15Ki ±  0%   31.15Ki ±  0%       ~ (p=0.424 n=10)
api-gateway-websocket-default.json      25.05Ki ± 44%   25.05Ki ± 42%       ~ (p=0.109 n=10)
api-gateway-websocket-disconnect.json   24.60Ki ±  0%   24.60Ki ±  0%       ~ (p=0.304 n=10)
api-gateway.json                        59.23Ki ±  0%   59.24Ki ±  0%       ~ (p=0.109 n=10)
application-load-balancer.json          24.78Ki ±  0%   24.78Ki ±  0%       ~ (p=0.489 n=10)
cloudfront.json                         18.59Ki ±  0%   18.60Ki ±  0%       ~ (p=0.421 n=10)
cloudwatch-events.json                  12.60Ki ±  0%   12.60Ki ±  0%       ~ (p=0.752 n=10)
cloudwatch-logs.json                    54.57Ki ±  0%   54.57Ki ±  0%       ~ (p=0.340 n=10)
custom.json                             9.709Ki ±  0%   9.709Ki ±  0%       ~ (p=0.891 n=10)
dynamodb.json                           52.30Ki ±  0%   52.30Ki ±  0%       ~ (p=0.643 n=10)
empty.json                              9.162Ki ±  0%   9.161Ki ±  0%       ~ (p=0.246 n=10)
eventbridge-custom.json                 13.78Ki ±  0%   13.78Ki ±  0%       ~ (p=0.222 n=10)
http-api.json                           24.92Ki ±  0%   24.92Ki ±  0%       ~ (p=0.590 n=10)
kinesis-batch.json                      28.71Ki ±  0%   28.71Ki ±  0%       ~ (p=0.236 n=10)
kinesis.json                            18.70Ki ±  0%   18.69Ki ±  0%       ~ (p=0.063 n=10)
s3.json                                 21.89Ki ±  0%   21.88Ki ±  0%       ~ (p=0.065 n=10)
sns-batch.json                          42.63Ki ±  0%   42.64Ki ±  0%       ~ (p=0.698 n=10)
sns.json                                25.71Ki ±  0%   25.71Ki ±  0%       ~ (p=0.839 n=10)
snssqs.json                             44.89Ki ±  0%   44.89Ki ±  0%       ~ (p=0.643 n=10)
snssqs_no_dd_context.json               38.08Ki ±  0%   38.08Ki ±  0%       ~ (p=0.781 n=10)
sqs-aws-header.json                     19.64Ki ±  0%   19.64Ki ±  0%       ~ (p=0.781 n=10)
sqs-batch.json                          43.71Ki ±  0%   43.71Ki ±  0%       ~ (p=0.753 n=10)
sqs.json                                26.70Ki ±  0%   26.70Ki ±  0%       ~ (p=0.987 n=10)
sqs_no_dd_context.json                  21.00Ki ±  0%   21.00Ki ±  0%       ~ (p=0.563 n=10)
geomean                                 27.79Ki         27.79Ki        -0.00%

                                      │  previous  │               current               │
                                      │ allocs/op  │ allocs/op   vs base                 │
api-gateway-appsec.json                 597.0 ± 0%   596.5 ± 0%       ~ (p=0.141 n=10)
api-gateway-kong-appsec.json            495.0 ± 0%   495.5 ± 0%       ~ (p=1.000 n=10)
api-gateway-kong.json                   473.0 ± 0%   473.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-non-proxy-async.json        679.0 ± 0%   679.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-non-proxy.json              670.0 ± 0%   670.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-connect.json      436.0 ± 0%   436.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-websocket-default.json      347.0 ± 0%   347.0 ± 0%       ~ (p=0.087 n=10)
api-gateway-websocket-disconnect.json   338.0 ± 0%   338.0 ± 0%       ~ (p=1.000 n=10)
api-gateway.json                        772.0 ± 0%   773.0 ± 0%       ~ (p=0.370 n=10)
application-load-balancer.json          337.0 ± 0%   337.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudfront.json                         246.0 ± 0%   246.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudwatch-events.json                  227.0 ± 0%   227.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudwatch-logs.json                    225.0 ± 0%   225.0 ± 0%       ~ (p=1.000 n=10) ¹
custom.json                             172.0 ± 0%   172.0 ± 0%       ~ (p=1.000 n=10) ¹
dynamodb.json                           597.0 ± 0%   597.0 ± 0%       ~ (p=1.000 n=10)
empty.json                              161.0 ± 0%   161.0 ± 0%       ~ (p=1.000 n=10) ¹
eventbridge-custom.json                 242.0 ± 0%   242.0 ± 0%       ~ (p=1.000 n=10) ¹
http-api.json                           385.0 ± 0%   384.0 ± 0%       ~ (p=0.170 n=10)
kinesis-batch.json                      309.0 ± 0%   309.0 ± 0%       ~ (p=0.211 n=10)
kinesis.json                            250.0 ± 0%   250.0 ± 0%       ~ (p=1.000 n=10) ¹
s3.json                                 306.0 ± 0%   306.0 ± 0%       ~ (p=1.000 n=10) ¹
sns-batch.json                          363.0 ± 0%   363.0 ± 0%       ~ (p=1.000 n=10)
sns.json                                282.0 ± 0%   282.0 ± 0%       ~ (p=1.000 n=10)
snssqs.json                             337.5 ± 0%   337.0 ± 0%       ~ (p=0.650 n=10)
snssqs_no_dd_context.json               299.0 ± 0%   298.0 ± 0%       ~ (p=0.370 n=10)
sqs-aws-header.json                     244.0 ± 0%   244.0 ± 0%       ~ (p=1.000 n=10) ¹
sqs-batch.json                          405.0 ± 0%   405.0 ± 0%       ~ (p=1.000 n=10)
sqs.json                                305.0 ± 0%   305.0 ± 0%       ~ (p=1.000 n=10)
sqs_no_dd_context.json                  281.0 ± 0%   281.0 ± 0%       ~ (p=1.000 n=10)
geomean                                 343.2        343.1       -0.02%
¹ all samples are equal

@ogaca-dd
Copy link
Contributor Author

ogaca-dd commented Dec 8, 2023

/merge

@dd-devflow
Copy link

dd-devflow bot commented Dec 8, 2023

🚂 MergeQueue

Pull request added to the queue.

There are 2 builds ahead! (estimated merge in less than 45m)

you can cancel this operation by commenting your pull request with /merge -c!

@dd-devflow
Copy link

dd-devflow bot commented Dec 8, 2023

❌ MergeQueue

Tests failed on this commit 8ff00fe

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

Details

checks are failing:

  • trace on arm64

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

@ogaca-dd ogaca-dd merged commit 7535b8d into main Dec 8, 2023
152 of 155 checks passed
@ogaca-dd ogaca-dd deleted the olivierg/migrate-component-to-new-file-hierarchy branch December 8, 2023 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.