Skip to content

Conversation

@hmstepanek
Copy link
Contributor

@hmstepanek hmstepanek commented Oct 2, 2025

Overview

This adds support for the concept of partial granularity distributed traces. There are 3 types:

  • reduced
  • essential
  • compact

Add support for the following new configuration options:

distributed_tracing
   sampler
       adaptive_sampling_target
       full_granularity
           enabled
           remote_parent_sampled
           remote_parent_not_sampled
       partial_granularity
           enabled
           type
           remote_parent_sampled
           remote_parent_not_sampled

@hmstepanek hmstepanek requested a review from a team as a code owner October 2, 2025 17:59
@github-actions
Copy link

github-actions bot commented Oct 2, 2025

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.91s
✅ MARKDOWN markdownlint 7 0 0 0 1.35s
❌ PYTHON ruff 948 0 1 0 1.05s
✅ PYTHON ruff-format 948 1 0 0 0.37s
✅ YAML prettier 15 0 0 0 1.61s
✅ YAML v8r 15 0 0 5.56s
✅ YAML yamllint 15 0 0 0.71s

Detailed Issues

❌ PYTHON / ruff - 1 error
::error title=Ruff (F821),file=newrelic/core/config.py,line=1410,col=5,endLine=1410,endColumn=62::newrelic/core/config.py:1410:5: F821 Undefined name `simplify_distributed_tracing_sampler_granularity_settings`

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security

@mergify mergify bot added the tests-failing Tests failing in CI. label Oct 2, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 18.57143% with 114 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop-hybrid-core-tracing@08dbcaf). Learn more about missing BASE report.

Files with missing lines Patch % Lines
newrelic/core/node_mixin.py 6.00% 47 Missing ⚠️
newrelic/config.py 3.57% 27 Missing ⚠️
newrelic/api/transaction.py 0.00% 19 Missing ⚠️
newrelic/core/data_collector.py 0.00% 7 Missing ⚠️
newrelic/core/config.py 82.35% 2 Missing and 1 partial ⚠️
newrelic/core/agent.py 50.00% 2 Missing ⚠️
newrelic/core/transaction_node.py 0.00% 2 Missing ⚠️
newrelic/hooks/database_aiomysql.py 0.00% 2 Missing ⚠️
newrelic/core/database_node.py 50.00% 1 Missing ⚠️
newrelic/core/external_node.py 50.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@                      Coverage Diff                       @@
##             develop-hybrid-core-tracing    #1532   +/-   ##
==============================================================
  Coverage                               ?   31.75%           
==============================================================
  Files                                  ?      207           
  Lines                                  ?    24068           
  Branches                               ?     3817           
==============================================================
  Hits                                   ?     7643           
  Misses                                 ?    15871           
  Partials                               ?      554           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from 831fa32 to ca79220 Compare October 7, 2025 00:07
@hmstepanek hmstepanek marked this pull request as draft October 7, 2025 00:08
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch 6 times, most recently from 303468c to 27573b4 Compare October 10, 2025 22:26
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from 7282263 to b59cc63 Compare October 21, 2025 17:21
@hmstepanek hmstepanek changed the base branch from main to develop-hybrid-core-tracing October 21, 2025 17:36
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch 3 times, most recently from 4c9dd32 to b962aba Compare October 22, 2025 07:13
@hmstepanek hmstepanek marked this pull request as ready for review October 22, 2025 07:19
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch 2 times, most recently from 0262e1a to 81943d0 Compare October 22, 2025 08:25
@hmstepanek hmstepanek force-pushed the develop-hybrid-core-tracing branch from e3f2de1 to 01b71d0 Compare October 22, 2025 17:32
@mergify mergify bot added the merge-conflicts Merge conflicts detected. label Oct 22, 2025
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from ddd7851 to d3152cb Compare October 22, 2025 17:35
@mergify mergify bot removed the merge-conflicts Merge conflicts detected. label Oct 22, 2025
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from d3152cb to eaa838d Compare October 22, 2025 21:02
@hmstepanek hmstepanek force-pushed the develop-hybrid-core-tracing branch from 01b71d0 to 48c4420 Compare October 22, 2025 22:40
@mergify mergify bot added the merge-conflicts Merge conflicts detected. label Oct 22, 2025
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from eaa838d to 849db5c Compare October 22, 2025 22:44
@mergify mergify bot removed the merge-conflicts Merge conflicts detected. label Oct 22, 2025
@lrafeei lrafeei self-requested a review October 23, 2025 19:22
@mergify mergify bot added the merge-conflicts Merge conflicts detected. label Oct 23, 2025
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from 93685c7 to 6ea8705 Compare October 24, 2025 00:17
@mergify mergify bot removed the merge-conflicts Merge conflicts detected. label Oct 24, 2025
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from 79a37d6 to f96dced Compare October 24, 2025 00:23
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from f96dced to 669f51e Compare October 24, 2025 00:48
hmstepanek and others added 6 commits October 27, 2025 16:48
* fix(aiomysql): avoid wrapping pooled connections multiple times

* Move and rewrite regression test

* Tweak implementation of fix

---------

Co-authored-by: Tim Pansino <[email protected]>
Bumps the github_actions group with 4 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/download-artifact](https://github.com/actions/download-artifact), [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/upload-artifact` from 4.6.2 to 5.0.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@ea165f8...330a01c)

Updates `actions/download-artifact` from 5.0.0 to 6.0.0
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@634f93c...018cc2c)

Updates `astral-sh/setup-uv` from 7.1.1 to 7.1.2
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@2ddd2b9...8585678)

Updates `github/codeql-action` from 4.30.9 to 4.31.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@16140ae...4e94bd1)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github_actions
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github_actions
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github_actions
- dependency-name: github/codeql-action
  dependency-version: 4.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github_actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Timothy Pansino <[email protected]>
@hmstepanek hmstepanek force-pushed the partial-granularity-type-support branch from f29653a to edbfd79 Compare October 27, 2025 23:49
@hmstepanek hmstepanek requested a review from lrafeei October 28, 2025 22:30

application_settings.attribute_filter = AttributeFilter(flatten_settings(application_settings))

simplify_distributed_tracing_sampler_granularity_settings(application_settings)
Copy link
Contributor

Choose a reason for hiding this comment

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

I just realized that simplify_distributed_tracing_sampler_granularity_settings() should either

  1. be moved before the attribute_filter application, but right after apply_server_side_settings()
  2. be removed all together and put the logic from that function in apply_server_side_settings() (maybe after the custom_insights_events.max_attribute_value override?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests-failing Tests failing in CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants