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

APM instrumentation for a class should preempt CSEC’s to avoid NoOpTransactions #1853

Closed
lovesh-ap opened this issue Apr 16, 2024 · 2 comments
Assignees
Labels
3 Story Point Estimate feature request Suggestion for a new product enhancement or change scala

Comments

@lovesh-ap
Copy link
Contributor

Encountered challenges while trying to instrument the http4s-ember-server for intercepting incoming requests. CSEC's current approach involves instrumenting the same method that the APM agent targets. org.http4s.ember.server.EmberServerBuilder.withHttpApp(Kleisli<F, Request<F>, Response<F>> httpApp)

However, we’re experiencing an issue where the CSEC instrumentation appears to be superseding that of the APM’s. This occurs because the APM’s createScalaTxnTracer() method, responsible for starting transactions, is called after the CSEC code executes. Consequently, CSEC encounters a NoOpTransaction scenario. This behavior has been substantiated by the findings in the APM logs.
Starting a transaction within CSEC isn’t a viable option either; based on our previous discussions, this action might lead to failures in Automated Integration Tests (AITs).

Feature Description

The APM instrumentation for the same class/package should preempt CSEC’s to avoid these complications.
Alternatively, might there be a different mechanism we could employ to initiate the transaction, one which would guarantee its precedence in the execution order, as opposed to relying on the createScalaTxnTracer() method? which should not affect any of our current users or AITs.

@lovesh-ap lovesh-ap added the feature request Suggestion for a new product enhancement or change label Apr 16, 2024
@workato-integration
Copy link

@kford-newrelic kford-newrelic added estimate Issue needing estimation scala labels Apr 17, 2024
@kford-newrelic kford-newrelic added 3 Story Point Estimate and removed estimate Issue needing estimation labels Apr 24, 2024
@obenkenobi obenkenobi self-assigned this Jun 27, 2024
@obenkenobi obenkenobi moved this from Triage to In Sprint in Java Engineering Board Jun 27, 2024
@obenkenobi obenkenobi moved this from In Sprint to Needs Review in Java Engineering Board Jul 10, 2024
@obenkenobi
Copy link
Contributor

@lovesh-ap I sent a PR to the csec agent's http4s branch that resolved the NoOp transaction issue. Setting the instrumentation priority to -1 resolved the issue.

@github-project-automation github-project-automation bot moved this from Needs Review to Code Complete/Done in Java Engineering Board Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 Story Point Estimate feature request Suggestion for a new product enhancement or change scala
Projects
Archived in project
Development

No branches or pull requests

3 participants