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

fix(runtime_metrics): avoid tracking multiple service names #12460

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mabdinur
Copy link
Contributor

Description

  • Currently runtime metrics are tagged with every service name detected in a process. This is incorrect. Runtime metrics should only be tagged with global service names, global env, global version, global tracer tags, and platform tags.
  • Also ensures runtime metric tracer tags are set everytime runtime metrics are flushed. This ensure runtime metrics are always sent with up to date values (and not just values set at start up or when service names are updated).

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

CODEOWNERS have been resolved as:

releasenotes/notes/runtime-metrics-avoid-multiple-service-names-6895255636b5dfc7.yaml  @DataDog/apm-python
ddtrace/_trace/tracer.py                                                @DataDog/apm-sdk-api-python
ddtrace/internal/runtime/runtime_metrics.py                             @DataDog/apm-core-python
ddtrace/internal/runtime/tag_collectors.py                              @DataDog/apm-core-python
tests/tracer/runtime/test_runtime_metrics.py                            @DataDog/apm-sdk-api-python
tests/tracer/runtime/test_tag_collectors.py                             @DataDog/apm-sdk-api-python
tests/tracer/test_tracer.py                                             @DataDog/apm-sdk-api-python

@datadog-dd-trace-py-rkomorn
Copy link

Datadog Report

Branch report: munir/runtime-metrics-only-track-global-service-names
Commit report: 68ded36
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1184 Skipped, 1m 50.7s Total Time

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 45 lines in your changes missing coverage. Please review.

Project coverage is 12.53%. Comparing base (8cdb084) to head (68ded36).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tests/tracer/runtime/test_runtime_metrics.py 0.00% 27 Missing ⚠️
ddtrace/internal/runtime/runtime_metrics.py 0.00% 12 Missing ⚠️
ddtrace/internal/runtime/tag_collectors.py 0.00% 5 Missing ⚠️
tests/tracer/runtime/test_tag_collectors.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12460      +/-   ##
==========================================
- Coverage   12.53%   12.53%   -0.01%     
==========================================
  Files        1389     1389              
  Lines      136465   136444      -21     
==========================================
- Hits        17106    17101       -5     
+ Misses     119359   119343      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pr-commenter
Copy link

pr-commenter bot commented Feb 21, 2025

Benchmarks

Benchmark execution time: 2025-02-21 14:03:53

Comparing candidate commit 68ded36 in PR branch munir/runtime-metrics-only-track-global-service-names with baseline commit 7011d3c in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 418 metrics, 2 unstable metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants