Skip to content

Micronaut fixes#2792

Open
dhilpipre wants to merge 6 commits intomainfrom
micronaut-fixes
Open

Micronaut fixes#2792
dhilpipre wants to merge 6 commits intomainfrom
micronaut-fixes

Conversation

@dhilpipre
Copy link
Copy Markdown
Collaborator

Fixes problems related to https://new-relic.atlassian.net/browse/NR-523865

Fixed problems related to excessive number of unexpired async tokens.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.66%. Comparing base (4f2b6be) to head (9c6e19c).
⚠️ Report is 217 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2792      +/-   ##
============================================
+ Coverage     69.95%   70.66%   +0.70%     
- Complexity    10534    10622      +88     
============================================
  Files           872      881       +9     
  Lines         43009    42913      -96     
  Branches       6589     6486     -103     
============================================
+ Hits          30087    30324     +237     
+ Misses        10012     9670     -342     
- Partials       2910     2919       +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.


StringBuilder sb = new StringBuilder();
sb.append(methodName);
sb.append(" - ");
Copy link
Copy Markdown
Contributor

@sharvath-newrelic sharvath-newrelic Apr 9, 2026

Choose a reason for hiding this comment

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

This change ended up breaking a few AITs (which was easy to reconcile), is there a precedent for this formatting modification?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yeah, it turned out that there was an inconsistency in transaction naming. depending on the flow some transactions would get method name at the end and some at the beginning. This one was changed to be the same as the other transaction. We can go either way, I just think it should be consistent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed. If this is following a standard transaction convention then this change should be fine.

sb.append(" (").append(methodName).append(") ");
NewRelic.getAgent().getTransaction().setTransactionName(TransactionNamePriority.FRAMEWORK_HIGH, true, "MicronautController", sb.toString());
String txnName = sb.toString().replace("//", "/");
NewRelic.getAgent().getTransaction().setTransactionName(TransactionNamePriority.FRAMEWORK_LOW , false, "MicronautController", txnName);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why has the transaction name priority been downgraded?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this code was overriding a previously set that was better suited name to describe the transaction. At a minimum the override flag needed to be changed to get rid of the override. Perhaps the downgrade isn't truly needed. Probably changed it to ensure it didn't override

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Understood. Was just curious about the rationale. I don't believe the downgrade is a deal breaker, and I would defer to your judgment here.

@sharvath-newrelic
Copy link
Copy Markdown
Contributor

sharvath-newrelic commented Apr 9, 2026

I noticed two new HTTP client modules were added (micronaut-http-client-3.5.0 and micronaut-http-client-4.0). These are valuable additions, but perhaps worthy of a separate PR that's not fix focused.

@sharvath-newrelic
Copy link
Copy Markdown
Contributor

sharvath-newrelic commented Apr 9, 2026

It's worth noting that building/running a agent JAR off of this branch results in passing Micronaut draft AITs, whereas they were failing prior.

@dhilpipre
Copy link
Copy Markdown
Collaborator Author

@sharvath-newrelic
removed unused import of Token
removed the two new modules and will create a new PR for them.
let me know how you think we should proceed on the transaction naming comments

@dhilpipre
Copy link
Copy Markdown
Collaborator Author

moved new Http Client modules to PR: #2834

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants