vector icon indicating copy to clipboard operation
vector copied to clipboard

chore(core): Add helper function to add a semantic meaning to an event metadata

Open bruceg opened this issue 9 months ago • 2 comments

I noticed the pattern referenced in the comments while reviewing some new code, and wanted to add a helper to simplify using that pattern in future code. While doing so, I realized that, since the field may be immediately replaced by the same value, we could play games with unwrapping the Arc instead of cloning it to improve efficiency.

bruceg avatar May 06 '24 21:05 bruceg

Datadog Report

Branch report: bruceg/add-schema-meaning-helper Commit report: 967b189 Test service: vector

:white_check_mark: 0 Failed, 7 Passed, 0 Skipped, 25.38s Wall Time

As a side note, this article about unwind describes why we can't just replace the schema slot in the metadata and have to resort to the uninit data shenanigans.

bruceg avatar May 09 '24 14:05 bruceg

Datadog Report

Branch report: bruceg/add-schema-meaning-helper Commit report: 986c14c Test service: vector

:white_check_mark: 0 Failed, 7 Passed, 0 Skipped, 25.51s Total Time

Regression Detector Results

Run ID: 03aedd37-df0f-4b6b-8122-7a452610804d Metrics dashboard

Baseline: fd35e1c54c33e297cdfd48ecfeae344947f303fb Comparison: cae6a88c6cd067386785d9e727920d61dbe9faaa

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.

Experiments ignored for regressions

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

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +7.05 [-0.45, +14.55]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +7.05 [-0.45, +14.55]
datadog_agent_remap_datadog_logs_acks ingress throughput +4.92 [+4.68, +5.17]
fluent_elasticsearch ingress throughput +1.75 [+1.26, +2.24]
otlp_http_to_blackhole ingress throughput +1.43 [+1.26, +1.60]
http_text_to_http_json ingress throughput +1.17 [+1.03, +1.30]
syslog_regex_logs2metric_ddmetrics ingress throughput +0.95 [+0.78, +1.12]
otlp_grpc_to_blackhole ingress throughput +0.76 [+0.63, +0.88]
datadog_agent_remap_datadog_logs ingress throughput +0.65 [+0.51, +0.79]
http_to_http_acks ingress throughput +0.44 [-0.89, +1.77]
syslog_splunk_hec_logs ingress throughput +0.34 [+0.23, +0.44]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput +0.30 [+0.19, +0.40]
http_to_s3 ingress throughput +0.25 [-0.02, +0.52]
socket_to_socket_blackhole ingress throughput +0.20 [+0.14, +0.27]
splunk_hec_to_splunk_hec_logs_acks ingress throughput +0.00 [-0.11, +0.11]
splunk_hec_to_splunk_hec_logs_noack ingress throughput -0.00 [-0.11, +0.10]
splunk_hec_indexer_ack_blackhole ingress throughput -0.01 [-0.09, +0.07]
http_to_http_json ingress throughput -0.04 [-0.12, +0.03]
syslog_loki ingress throughput -0.07 [-0.17, +0.03]
datadog_agent_remap_blackhole ingress throughput -0.11 [-0.21, -0.00]
http_to_http_noack ingress throughput -0.15 [-0.26, -0.03]
splunk_hec_route_s3 ingress throughput -0.23 [-0.55, +0.10]
syslog_log2metric_splunk_hec_metrics ingress throughput -0.37 [-0.50, -0.25]
http_elasticsearch ingress throughput -0.42 [-0.60, -0.23]
syslog_log2metric_humio_metrics ingress throughput -0.62 [-0.74, -0.50]
datadog_agent_remap_blackhole_acks ingress throughput -0.81 [-0.90, -0.71]
syslog_humio_logs ingress throughput -2.66 [-2.80, -2.52]

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

github-actions[bot] avatar Jul 20 '24 08:07 github-actions[bot]

Regression Detector Results

Run ID: ad5d40f1-9ad4-4c3f-abe0-10eccfd957a0 Metrics dashboard

Baseline: b2aea48a374259fd289f3ee3bc9a23eb0446b025 Comparison: 46f8b0bdb91a8e83034e10a851d51f4e295c2d85

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.

Experiments ignored for regressions

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

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput -1.75 [-7.87, +4.37]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
socket_to_socket_blackhole ingress throughput +2.82 [+2.75, +2.88]
otlp_http_to_blackhole ingress throughput +1.05 [+0.87, +1.24]
http_to_s3 ingress throughput +0.94 [+0.66, +1.22]
otlp_grpc_to_blackhole ingress throughput +0.25 [+0.12, +0.38]
syslog_log2metric_humio_metrics ingress throughput +0.15 [+0.01, +0.30]
syslog_log2metric_splunk_hec_metrics ingress throughput +0.08 [-0.04, +0.21]
splunk_hec_indexer_ack_blackhole ingress throughput +0.01 [-0.07, +0.09]
splunk_hec_to_splunk_hec_logs_acks ingress throughput -0.00 [-0.12, +0.11]
splunk_hec_to_splunk_hec_logs_noack ingress throughput -0.01 [-0.12, +0.10]
http_text_to_http_json ingress throughput -0.04 [-0.17, +0.09]
http_to_http_json ingress throughput -0.05 [-0.14, +0.04]
http_to_http_noack ingress throughput -0.08 [-0.20, +0.04]
datadog_agent_remap_datadog_logs_acks ingress throughput -0.13 [-0.31, +0.06]
fluent_elasticsearch ingress throughput -0.15 [-0.65, +0.34]
http_elasticsearch ingress throughput -0.36 [-0.58, -0.14]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput -0.39 [-0.48, -0.29]
datadog_agent_remap_blackhole ingress throughput -0.58 [-0.71, -0.45]
datadog_agent_remap_datadog_logs ingress throughput -0.81 [-1.09, -0.53]
datadog_agent_remap_blackhole_acks ingress throughput -0.96 [-1.09, -0.83]
syslog_regex_logs2metric_ddmetrics ingress throughput -1.48 [-1.64, -1.32]
syslog_loki ingress throughput -1.52 [-1.62, -1.41]
file_to_blackhole egress throughput -1.75 [-7.87, +4.37]
syslog_humio_logs ingress throughput -2.13 [-2.27, -1.99]
splunk_hec_route_s3 ingress throughput -2.52 [-2.86, -2.18]
syslog_splunk_hec_logs ingress throughput -3.04 [-3.12, -2.95]
http_to_http_acks ingress throughput -3.10 [-4.40, -1.80]

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

github-actions[bot] avatar Jul 22 '24 15:07 github-actions[bot]

Regression Detector Results

Run ID: 94421ce3-4d2f-4bb8-99c4-f04d87feb109 Metrics dashboard

Baseline: cd6069795de7d735b366b52862b4d639a68223b8 Comparison: 67a5e4682138721575b22369cf5ba629cd86ce55

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.

Experiments ignored for regressions

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

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +28.63 [+20.59, +36.67]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +28.63 [+20.59, +36.67]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput +2.26 [+2.14, +2.38]
syslog_humio_logs ingress throughput +1.83 [+1.67, +1.99]
datadog_agent_remap_blackhole ingress throughput +1.72 [+1.60, +1.83]
syslog_loki ingress throughput +1.10 [+1.01, +1.19]
http_to_http_acks ingress throughput +0.91 [-0.41, +2.23]
otlp_grpc_to_blackhole ingress throughput +0.67 [+0.54, +0.79]
http_elasticsearch ingress throughput +0.56 [+0.35, +0.77]
splunk_hec_to_splunk_hec_logs_acks ingress throughput -0.00 [-0.11, +0.10]
splunk_hec_indexer_ack_blackhole ingress throughput -0.00 [-0.08, +0.08]
splunk_hec_to_splunk_hec_logs_noack ingress throughput -0.03 [-0.14, +0.07]
http_to_s3 ingress throughput -0.09 [-0.37, +0.19]
http_to_http_noack ingress throughput -0.15 [-0.26, -0.04]
http_to_http_json ingress throughput -0.15 [-0.23, -0.08]
otlp_http_to_blackhole ingress throughput -0.22 [-0.42, -0.01]
datadog_agent_remap_datadog_logs_acks ingress throughput -0.43 [-0.60, -0.26]
syslog_splunk_hec_logs ingress throughput -0.66 [-0.81, -0.51]
datadog_agent_remap_blackhole_acks ingress throughput -0.74 [-0.85, -0.63]
syslog_log2metric_splunk_hec_metrics ingress throughput -1.05 [-1.19, -0.92]
datadog_agent_remap_datadog_logs ingress throughput -1.16 [-1.40, -0.92]
http_text_to_http_json ingress throughput -1.21 [-1.33, -1.09]
syslog_log2metric_humio_metrics ingress throughput -1.41 [-1.54, -1.27]
fluent_elasticsearch ingress throughput -1.48 [-1.98, -0.98]
splunk_hec_route_s3 ingress throughput -2.43 [-2.74, -2.11]
socket_to_socket_blackhole ingress throughput -2.62 [-2.72, -2.52]
syslog_regex_logs2metric_ddmetrics ingress throughput -4.04 [-4.21, -3.86]

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

github-actions[bot] avatar Jul 22 '24 16:07 github-actions[bot]