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

Removal of CompletableFuture/Completion.tryFire method instrumentation causes loss of token linking #1150

Closed
kford-newrelic opened this issue Feb 6, 2023 · 4 comments
Labels
apr-jun qtr Represents proposed work item for the Apr-Jun quarter

Comments

@kford-newrelic
Copy link
Contributor

kford-newrelic commented Feb 6, 2023

Description

A customer was upgrading from the 7.4.3 agent to the 7.11.1 version. While doing this upgrade, they noticed that their transaction time - which used to be measured in milliseconds - was now returning microsecond response times. Transaction traces with the new agent also appears to have fewer segments being created.

Example

The current thinking is that the removal of instrumentation support for the CompletableFuture/Completion.tryFire() method may be the root of the problem, since the transaction is essentially being lost. Example code fragment:

// code placeholder
@Trace(dispatcher = true)
private PipelineExecutionContext createDefaultExecutionContext(InboundExecutionContext inboundExecutionContext, DefaultMessage message) {
...
NewRelicIteratingPipelineExecutionContext pipelineExecutionContext = pipeline.createPipelineExecutionContext(
When constructing the NewRelicIteratingPipelineExecutionContext we grab the NR token like this:
public class NewRelicIteratingPipelineExecutionContext extends IteratingPipelineExecutionContext {
private final Token newRelicToken = NewRelic.getAgent().getTransaction().getToken();
At the end of the traction we do this:
@Override
public void complete() {
try {
super.complete();
}
finally {
newRelicToken.linkAndExpire();
}
} 
@workato-integration
Copy link

workato-integration bot commented Feb 6, 2023

@kford-newrelic kford-newrelic added estimate Issue needing estimation apr-jun qtr Represents proposed work item for the Apr-Jun quarter labels Jan 16, 2024
@kford-newrelic
Copy link
Contributor Author

Reviewing...

@kford-newrelic
Copy link
Contributor Author

Original customer went dark but #1140 may have addressed this issue. Need to retest and confirm/deny.

@kford-newrelic kford-newrelic removed the estimate Issue needing estimation label Feb 15, 2024
@kford-newrelic
Copy link
Contributor Author

Closing this issue as resolved. Will attempt to reach the customer reporting the issue to confirm. Will re-open if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apr-jun qtr Represents proposed work item for the Apr-Jun quarter
Projects
None yet
Development

No branches or pull requests

1 participant