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

System.NullReferenceException New Relic agent 10.19.x with MassTransit #2096

Closed
Laurence-yau opened this issue Nov 23, 2023 · 3 comments
Closed
Labels
bug Something isn't working community To tag external issues and PRs

Comments

@Laurence-yau
Copy link

Laurence-yau commented Nov 23, 2023

Description
We are getting a runtime NullReferenceException with our application. The error only occurs with the newest 10.19.x agent. It works fine with 10.17.x. This is due to the new MT auto instrumentation. We use MT but not all messages use the MT envelope.

See the partial stack trace below.

System.NullReferenceException: Object reference not set to an instance of an object. at NewRelic.Providers.Wrapper.MassTransit.MassTransitHelpers.GetQueueData(Uri sourceAddress) at NewRelic.Providers.Wrapper.MassTransit.NewRelicFilter.Send(ConsumeContext context, IPipe`1 next) at MassTransit.Middleware.TeeFilter`1.<>c__DisplayClass5_0.<<Send>g__SendAsync|1>d.MoveNext() in /codebuild/output/src3994/src/s3/00/src/MassTransit/Middleware/TeeFilter.cs:line 40 --- End of stack trace from previous location --- at MassTransit.Middleware.OutputPipeFilter`2.SendToOutput(IPipe`1 next, TOutput pipeContext) in /codebuild/output/src3994/src/s3/00/src/MassTransit/Middleware/OutputPipeFilter.cs:line 76 at MassTransit.Middleware.OutputPipeFilter`2.SendToOutput(IPipe`1 next, TOutput pipeContext) in /codebuild/output/src3994/src/s3/00/src/MassTransit/Middleware/OutputPipeFilter.cs:line 108 at MassTransit.Middleware.DynamicFilter`1.<>c__DisplayClass10_0.<<Send>g__SendAsync|0>d.MoveNext() in /codebuild/output/src3994/src/s3/00/src/MassTransit/Middleware/DynamicFilter.cs:line 89 --- End of stack trace from previous location ---

Expected Behavior
Essentially mass transit can support processing messages of different formats other than mass transit envelope. New relic should not assume it is of that format. In which case it means that sourceAddress in context could be null but the code assumes otherwise.

image

Your Environment
.NET Core 6
New Relic Agent 10.19.x
Ubuntu 20.04
Mass Transit
AWS SQS/SNS

@Laurence-yau Laurence-yau added the bug Something isn't working label Nov 23, 2023
@workato-integration
Copy link

@github-actions github-actions bot added the community To tag external issues and PRs label Nov 23, 2023
@chynesNR
Copy link
Member

Hi @Laurence-yau -- thank you for your bug report. We have identified the problem and have merged a fix here: #2060

We aim to have a release with this fix available this week.

@workato-integration
Copy link

Work has been completed on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community To tag external issues and PRs
Projects
None yet
Development

No branches or pull requests

2 participants