Skip to content

fix(otel/metrics): add otel. prefix to host and some kafka metrics in the Converged Agent #28228

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

Merged
merged 8 commits into from
Aug 9, 2024

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Aug 5, 2024

What does this PR do?

Updates opentelemetry-mappings-go metrics configurations to include the WithOTelPrefix option. This option will append otel. prefix to all system.*, proccess.*, and a subet of kafka.* metrics received via OTLP.

Motivation

This change will resolve conflicts between opentelemetry and datadog metrics names.

Additional Notes

The converged agent is unreleased. This change does not require a release note.

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

@mabdinur mabdinur changed the title use withprefix fix(otel/metrics): add otel. prefix to host and some kafka metrics Aug 5, 2024
@mabdinur mabdinur force-pushed the munir/use-with-otel-renaming-to-otel branch from 122ede1 to a66cda4 Compare August 5, 2024 22:55
@github-actions github-actions bot added the team/opentelemetry OpenTelemetry team label Aug 5, 2024
@mabdinur mabdinur force-pushed the munir/use-with-otel-renaming-to-otel branch from a66cda4 to d364cd9 Compare August 6, 2024 13:01
@mabdinur mabdinur force-pushed the munir/use-with-otel-renaming-to-otel branch from 406f5db to 7a7f8d6 Compare August 6, 2024 23:36
@mabdinur mabdinur requested a review from songy23 August 6, 2024 23:40
@pr-commenter
Copy link

pr-commenter bot commented Aug 7, 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=41254375 --os-family=ubuntu

Note: This applies to commit 90dfa98

@pr-commenter
Copy link

pr-commenter bot commented Aug 7, 2024

Regression Detector

Regression Detector Results

Run ID: fe7e9b10-179c-4312-b68f-cc8d5e36377f Metrics dashboard Target profiles

Baseline: 1a835ad
Comparison: 90dfa98

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
otel_to_otel_logs ingress throughput +0.59 [-0.22, +1.41] Logs
idle memory utilization +0.29 [+0.25, +0.32] 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
basic_py_check % cpu utilization -0.92 [-3.60, +1.77] Logs
file_tree memory utilization -1.21 [-1.30, -1.13] Logs
pycheck_1000_100byte_tags % cpu utilization -1.25 [-5.99, +3.50] Logs
uds_dogstatsd_to_api_cpu % cpu utilization -2.23 [-3.10, -1.35] Logs
tcp_syslog_to_blackhole ingress throughput -6.59 [-18.98, +5.80] 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".

@mabdinur mabdinur marked this pull request as ready for review August 7, 2024 14:27
@mabdinur mabdinur requested review from a team as code owners August 7, 2024 14:27
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.

Can you do a quick sanity check from your branch to see if this works e2e?

  1. inv otel-agent.build
  2. cd bin/otel-agent
  3. ./otel-agent --config config.yaml
  4. Go to DD and verify host metrics are sent with otel. prefix. E.g. otel.system.cpu.load_average.15m

Use this as config.yaml :

receivers:
  hostmetrics:
    scrapers:
      load:
      memory:

exporters:
  datadog:
    api:
      key: ${env:DD_API_KEY}

service:
  pipelines:
    metrics/sys:
      receivers: [hostmetrics]
      exporters: [datadog]

@songy23
Copy link
Member

songy23 commented Aug 7, 2024

cc @dineshg13

@mabdinur
Copy link
Contributor Author

mabdinur commented Aug 7, 2024

4. tel.system.cpu.load_average.15m

I ran the converged agent locally and am I able to see the otel.* prefix on metrics.

Screenshot 2024-08-07 at 2 15 12 PM

@songy23 songy23 added changelog/no-changelog qa/done QA done before merge and regressions are covered by tests labels Aug 7, 2024
@mabdinur mabdinur removed the qa/done QA done before merge and regressions are covered by tests label Aug 7, 2024
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

@songy23 songy23 removed the request for review from a team August 7, 2024 18:45
@mabdinur mabdinur changed the title fix(otel/metrics): add otel. prefix to host and some kafka metrics fix(otel/metrics): add otel. prefix to host and some kafka metrics in tjr covagent Aug 8, 2024
@mabdinur mabdinur changed the title fix(otel/metrics): add otel. prefix to host and some kafka metrics in tjr covagent fix(otel/metrics): add otel. prefix to host and some kafka metrics in the coveraged agent Aug 8, 2024
@mabdinur mabdinur changed the title fix(otel/metrics): add otel. prefix to host and some kafka metrics in the coveraged agent fix(otel/metrics): add otel. prefix to host and some kafka metrics in the Converged Agent Aug 8, 2024
@songy23
Copy link
Member

songy23 commented Aug 8, 2024

Looks like you need inv tidy

@songy23 songy23 added this to the 7.57.0 milestone Aug 9, 2024
@songy23
Copy link
Member

songy23 commented Aug 9, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Aug 9, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 21m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit ec0ce63 into main Aug 9, 2024
218 checks passed
@dd-mergequeue dd-mergequeue bot deleted the munir/use-with-otel-renaming-to-otel branch August 9, 2024 13:49
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.

3 participants