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

Adding is_trace_root tag for APM Stats

Open simont1 opened this issue 1 year ago • 2 comments
trafficstars

What does this PR do?

This PR is to allow the apm-agent to send whether or not the stats come from a root trace and add this to APM Stats. Document for context: https://docs.google.com/document/d/1Ha4MxePXqcI2sMCxMfOQTaeuP7_YkkzRpxsve55aUd4/edit?usp=sharing

Motivation

Having the is_trace_root tag can help APM features to distinguish between APM stats that come from root spans vs. non-root spans.

Additional Notes

Possible Drawbacks / Trade-offs

Adding a tag will increase the cardinality of trace metrics

Describe how to test/QA your changes

When we see the new tag on our agent payloads, this PR here will be able to use them https://github.com/DataDog/dd-go/pull/126017

simont1 avatar Feb 29 '24 16:02 simont1

CLA assistant check
All committers have signed the CLA.

bits-bot avatar Feb 29 '24 16:02 bits-bot

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 864eeb51-4b29-42f8-ba92-310cbdd2d283 Baseline: c3e5646370e539a792e4b1ccc219f69156058c91 Comparison: 844c8dbbda5d3bf5707f88e6e794e67cb7d6e6a6

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 +3.20 [-3.41, +9.80]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +3.20 [-3.41, +9.80]
uds_dogstatsd_to_api_cpu % cpu utilization +0.53 [-0.88, +1.94]
otel_to_otel_logs ingress throughput +0.52 [-0.12, +1.15]
trace_agent_json ingress throughput +0.00 [-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.02 [-0.03, -0.01]
process_agent_standard_check_with_stats memory utilization -0.12 [-0.16, -0.07]
tcp_syslog_to_blackhole ingress throughput -0.12 [-0.18, -0.06]
file_tree memory utilization -0.15 [-0.25, -0.05]
process_agent_standard_check memory utilization -0.23 [-0.28, -0.18]
process_agent_real_time_mode memory utilization -0.63 [-0.67, -0.58]
idle memory utilization -0.88 [-0.93, -0.84]

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 Feb 29 '24 19:02 pr-commenter[bot]

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=30592004 --os-family=ubuntu

pr-commenter[bot] avatar Mar 21 '24 22:03 pr-commenter[bot]

Regression Detector

Regression Detector Results

Run ID: d8f06fb4-2637-485f-b38e-3d7e120fd49b Baseline: e6ec7d50e5bc4cf483e8e877ad24c4159d972996 Comparison: 49678bdfa1cc4d44e80a2b613eb31bc5fbb0ddd1

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
file_to_blackhole % cpu utilization -1.33 [-7.67, +5.01]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
pycheck_1000_100byte_tags % cpu utilization +1.27 [-3.67, +6.22]
idle memory utilization +0.72 [+0.66, +0.77]
tcp_syslog_to_blackhole ingress throughput +0.35 [+0.26, +0.45]
uds_dogstatsd_to_api_cpu % cpu utilization +0.28 [-2.48, +3.03]
tcp_dd_logs_filter_exclude ingress throughput +0.03 [-0.01, +0.06]
trace_agent_msgpack ingress throughput -0.01 [-0.02, -0.00]
uds_dogstatsd_to_api ingress throughput -0.02 [-0.22, +0.19]
trace_agent_json ingress throughput -0.03 [-0.06, +0.00]
otel_to_otel_logs ingress throughput -0.05 [-0.46, +0.37]
process_agent_real_time_mode memory utilization -0.07 [-0.11, -0.03]
process_agent_standard_check_with_stats memory utilization -0.35 [-0.39, -0.31]
process_agent_standard_check memory utilization -0.41 [-0.45, -0.36]
file_tree memory utilization -0.49 [-0.59, -0.39]
basic_py_check % cpu utilization -0.68 [-3.23, +1.87]
file_to_blackhole % cpu utilization -1.33 [-7.67, +5.01]

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 Mar 21 '24 22:03 pr-commenter[bot]

/merge

ajgajg1134 avatar Mar 22 '24 15:03 ajgajg1134

:steam_locomotive: MergeQueue

Pull request added to the queue.

This build is going to start soon! (estimated merge in less than 29m)

Use /merge -c to cancel this operation!

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