Skip to content

Conversation

lrafeei
Copy link
Contributor

@lrafeei lrafeei commented Sep 12, 2025

This PR removes Cross Application Tracing (CAT) from the agent

@lrafeei lrafeei changed the base branch from main to develop-11.0.0 September 12, 2025 02:16
@mergify mergify bot added the merge-conflicts Merge conflicts detected. label Sep 12, 2025
Copy link

github-actions bot commented Sep 12, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 6 0 0 0.87s
✅ MARKDOWN markdownlint 7 0 0 0 1.02s
✅ MARKDOWN markdown-link-check 7 0 0 19.24s
✅ PYTHON ruff 931 0 0 0 1.02s
✅ PYTHON ruff-format 931 0 0 0 0.36s
✅ YAML prettier 13 0 0 0 1.41s
✅ YAML v8r 13 0 0 4.83s
✅ YAML yamllint 13 0 0 0.6s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

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

codecov-commenter commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 83.07692% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.49%. Comparing base (312a322) to head (5f57d60).

Files with missing lines Patch % Lines
newrelic/hooks/framework_aiohttp.py 64.28% 5 Missing ⚠️
newrelic/hooks/framework_sanic.py 16.66% 4 Missing and 1 partial ⚠️
newrelic/hooks/framework_tornado.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1489      +/-   ##
==========================================
- Coverage   81.59%   81.49%   -0.10%     
==========================================
  Files         206      206              
  Lines       23689    23457     -232     
  Branches     3753     3708      -45     
==========================================
- Hits        19328    19117     -211     
+ Misses       3100     3088      -12     
+ Partials     1261     1252       -9     

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

@mergify mergify bot removed the merge-conflicts Merge conflicts detected. label Sep 12, 2025
@mergify mergify bot removed the tests-failing Tests failing in CI. label Sep 12, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label Sep 13, 2025
@lrafeei lrafeei marked this pull request as ready for review September 15, 2025 16:18
@lrafeei lrafeei requested a review from a team as a code owner September 15, 2025 16:18
Copy link
Contributor

@hmstepanek hmstepanek left a comment

Choose a reason for hiding this comment

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

Posting a partial review. I'll review the rest later.

headers.pop(MessageTrace.cat_id_key, None)
headers.pop(MessageTrace.cat_transaction_key, None)
headers.pop(MessageTrace.cat_distributed_trace_key, None)
headers.pop(MessageTrace.distributed_trace_key, None)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
headers.pop(MessageTrace.distributed_trace_key, None)
headers.pop("newrelic", None)

user_headers.pop(MessageTrace.cat_id_key, None)
user_headers.pop(MessageTrace.cat_transaction_key, None)
user_headers.pop(MessageTrace.cat_distributed_trace_key, None)
user_headers.pop(MessageTrace.distributed_trace_key, None)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
user_headers.pop(MessageTrace.distributed_trace_key, None)
user_headers.pop("newrelic", None)

class HeaderMixin:
synthetics_key = "X-NewRelic-Synthetics"
synthetics_info_key = "X-NewRelic-Synthetics-Info"
distributed_trace_key = "newrelic"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
distributed_trace_key = "newrelic"

_process_setting(section, "debug.connect_span_stream_in_developer_mode", "getboolean", None)
_process_setting(section, "debug.otlp_content_encoding", "get", None)
_process_setting(section, "cross_application_tracer.enabled", "getboolean", None)
# _process_setting(section, "cross_application_tracer.enabled", "getboolean", None)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# _process_setting(section, "cross_application_tracer.enabled", "getboolean", None)

intrinsics["error.expected"] = error.expected
intrinsics["transactionName"] = self.path
intrinsics["spanId"] = error.span_id

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
intrinsics["nr.transactionGuid"] = self.guid

try:
dt_headers = MessageTrace.generate_request_headers(transaction)
if dt_headers:
headers.update(dict(dt_headers))
Copy link
Contributor

Choose a reason for hiding this comment

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

Start reviewing again at this file.

@mergify mergify bot added the merge-conflicts Merge conflicts detected. label Sep 22, 2025
Base automatically changed from develop-11.0.0 to main September 22, 2025 22:53
@mergify mergify bot removed the merge-conflicts Merge conflicts detected. label Sep 22, 2025
@mergify mergify bot removed the tests-failing Tests failing in CI. label Sep 22, 2025
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.

4 participants