-
Notifications
You must be signed in to change notification settings - Fork 55
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
(Memory Leak) Strange behavior in MetricNameService.RenameTransaction #337
Comments
@tiagodaraujo: Thank you for bringing this to our attention. You are correct, based on an initial reading, this logic does not make much sense. At the very least, the name of the |
@tiagodaraujo See the linked pull request. Again, thanks for bringing this issue to our attention. This turns out to be obsolete code that should have been removed when the associated functionality was removed. |
Hi @nr-ahemsath, thanks for address this issue quickly. Does the next release have an estimated date? |
We should be ready to do a release sometime next week. |
Hi @nr-ahemsath, |
@tiagodaraujo Did you also update the agent to version 8.35.0? The relevant code changes were in the agent, not in the API. (The API assembly contains stub methods which get rewritten at runtime by the agent.) |
Oh, didn't know. I will try to upgrade the agent on the server. Thank you. |
During a memory leak analysis, I found a list of transactions stored on the
MetricNameService
. The list stored in the_transactionNames
instance field, increases progressively, even using the SetTransactionName for grouping or IgnoreTransaction API call.Description
MetricNameService
stores a list of unique transactions in the instance field_transactionNames
, here.The method
IsMetricNameAllowed
stored the transaction but never use the list and return alwaystrue
.It seems a strange behavior because the
IsMetricNameAllowed
result is used in the methodRenameTransaction
.Why do you need an
if
in your code, if the operation is alwaystrue
? here.Expected Behavior
I expect for a web request that I call your API methods, NewRelic.SetTransactionName or NewRelic.IgnoreTransaction, the MetricNameService doesn't store the transaction. e.g.
WebRequest: /product/product-seo-description-123.aspx
Call API: NewRelic.SetTransactionName(null, "Product-Detail-Page")
Records:
WebTransaction/ASP/product/product-seo-description-123.aspx
WebTransaction/MVC/Product/Index/{id}
WebTransaction/Custom/Product-Detail-Page
I expect:
WebTransaction/Custom/Product-Detail-Page
WebRequest: /static/image.png
Call API: NewRelic.IgnoreTransaction()
Records:
WebTransaction/ASP/static/image.png
I expect:
No transaction records.
Note: In the NewRelic dashboard, Transactions view, all seems right and shows the expected results. Ignored transactions are not showed and custom transactions are shown as expected.
Troubleshooting or NR Diag results
I don't have a log to be shared here, but I already shared other information internally with the NewRelic support team member.
Steps to Reproduce
Just do some traffic and you can see the duplicated transaction names on the
MetricServiceName
. I extracted a memory dump to have access to the object stored.Your Environment
I using the NewRelic agent 8.34 version in a ASP.NET Core application hosted by a Windows Server with IIS.
Additional context
snippet API calls: https://gist.github.com/tiagodaraujo/c3d9ac425019b26b29c66e7f01015470
The text was updated successfully, but these errors were encountered: