question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Public API ignore transaction option

See original GitHub issue

Using Spring Boot, all @Scheduled methods are recorded. I have a method that fires regularly and I want to ignore it. An option to ignore should be added, like @IgnoreTransaction.

Even if I get the transaction using ElasticApm.currentTransaction() there is no way to cancel it.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:22 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
eyalkorencommented, Jan 19, 2022

And I really want to avoid not ending a transaction/span, as this can cause memory leaks from what I have read in other discussions.

No risk for memory leaks, unless you accumulate hard references to them and never release. The leak we are referring to is when spans/transactions are recycled and used after, but in new versions this can’t happen as any span/transaction touched by the API is not recycled.

BTW, the messaging transactions may be ended quite quickly after the message is submitted to the queue, but you can still create async child spans from them and they will have the proper parent-child relations. I hope you find the way to do what you need. Start by eliminating your custom transaction creation. Good luck!

1reaction
eyalkorencommented, Sep 18, 2019

I agree that an API to ignore a transaction could be useful…

Regardless, our scheduling tracing looks for classes only in the defined application_packages - maybe you can make use of that if the transactions you want to ignore are in a specific package.

In case you don’t want such transactions at all, you can also disable the scheduled instrumentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignore specific transactions - New Relic Documentation
Ignoring transactions involves changing your application's source code and recompiling your application in all cases unless you use an XML instrumentation file.
Read more >
Ignore Transaction - Sabre Dev Studio
The Ignore Transaction (IgnoreTransactionLLSRQ) service is used to ignore a transaction.
Read more >
Ignore TransactionScope for specific query - Stack Overflow
If you wrap your log call inside of another transaction scope with the suppress option enabled, transaction scope will not be used. public...
Read more >
API – Customer Transaction Warnings - LoanPro Help
There are two ways to deal with transactional warnings—you can correct your data, or you can set your request to ignore the warnings....
Read more >
Using Transactions in Quarkus
@Transactional(NEVER) : if a transaction was started, raises an exception ; otherwise works with no transaction. REQUIRED or NOT_SUPPORTED are probably the most ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found