Skip to content

Conversation

@bizob2828
Copy link
Member

  • chore: wrapped up config based transformation rules for servers
  • chore: finished consumer rules
  • chore: client db rule spelling fix: director -> directory #1
  • chore: built out db 1.24 rules need to do 1.17
  • chore: wrapped up db 1.17 rules, wrapped up http client rules, need to do rpc client and fallback
  • chore: wrapped up all the transformation rules, need to handle errors
  • refactor: cleaned up code, starting removing unused code
  • chore: moved all bespoke logic to config
  • chore: finished fixing tests
  • docs: Added json schema for transformation rules

Description

This PR attempts to remove all static logic around synthesis of segments, transactions and time slice metrics. The intention is long term we would not keep a copy of rules in our agent but instead consume on connect.

Related Issues

Closes #3092

@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 99.58678% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.58%. Comparing base (98007f6) to head (73f1463).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
lib/otel/exception-mapping.js 92.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3125      +/-   ##
==========================================
- Coverage   97.64%   97.58%   -0.07%     
==========================================
  Files         336      332       -4     
  Lines       50601    50289     -312     
==========================================
- Hits        49409    49073     -336     
- Misses       1192     1216      +24     
Flag Coverage Δ
integration-tests-cjs-18.x 73.83% <60.53%> (+0.06%) ⬆️
integration-tests-cjs-20.x 73.82% <60.53%> (+0.06%) ⬆️
integration-tests-cjs-22.x 73.86% <60.53%> (+0.06%) ⬆️
integration-tests-esm-18.x 49.64% <23.55%> (-0.14%) ⬇️
integration-tests-esm-20.x 49.65% <23.55%> (-0.14%) ⬇️
integration-tests-esm-22.x 49.71% <23.55%> (-0.14%) ⬇️
unit-tests-18.x 88.80% <64.66%> (-0.28%) ⬇️
unit-tests-20.x 88.80% <64.66%> (-0.28%) ⬇️
unit-tests-22.x 88.81% <64.66%> (-0.28%) ⬇️
versioned-tests-18.x 80.00% <97.52%> (-0.35%) ⬇️
versioned-tests-20.x 80.01% <97.52%> (-0.35%) ⬇️
versioned-tests-22.x 80.02% <97.52%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +128 to +130
if (this.#reconciler.isHostnameKey(key) === true) {
value = this.#reconciler.resolveHost(value)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The intention of the reconciler was to expose a simple interface for reconciling attributes. To that end, the isHostnameKey and resolveHost were private methods used internally. It seems that they have been exposed for this singular conditional.

Do we need to refactor the reconciler to handle this case?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to refactor the transformation rules to just run as mappers within the reconciler but it got very messy. So now it processes the attributes defined in transformation rules and assigns them as skip in the reconciler. I also see an issue with the required keys as new conventions are released a key may not be in the array to format the hostname accordingly. I'm open to ideas but that's why I exposed this on the reconciler

@bizob2828 bizob2828 merged commit ad116d2 into newrelic:main Jun 2, 2025
24 of 25 checks passed
@bizob2828 bizob2828 deleted the config-based-transformation-rules branch June 2, 2025 16:21
@github-project-automation github-project-automation bot moved this from Needs PR Review to Done: Issues recently completed in Node.js Engineering Board Jun 2, 2025
@github-actions github-actions bot mentioned this pull request Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done: Issues recently completed

Development

Successfully merging this pull request may close these issues.

[spike] Configuration based transformation rules for Otel bridge

3 participants