Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Chunk endcoding is broken when Microsoft.AspNetCore.Diagnostics.Abstractions is missing


#1

We have noticed that RavenDB server doesn’t work in conjunction with new relic .net agent.

I’ve create simple application which demonstrates an issue:

Please configure your New Relic agent using 4 ENV properties:
CORECLR_ENABLE_PROFILING=1
CORECLR_NEWRELIC_HOME=c:\temp\newrelic-agent
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
CORECLR_PROFILER_PATH=C:\temp\newrelic-agent\NewRelic.Profiler.dll

Please try to run this application. It should work fine.

Then remove dependency from csproj file:
<PackageReference Include=“Microsoft.AspNetCore.Diagnostics.Abstractions” Version=“2.1.1”/>

and run server, it doesn’t work.

Chrome compains with: databases:1 GET net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)

When I use telnet we can see that final chunk is missing. (0\r\n\r\n).

Source issue: http://issues.hibernatingrhinos.com/issue/RavenDB-12236


#2

Hi @marcin4,

RavenDB is not one of the datastores that is supported by the .NET agent:

https://docs.newrelic.com/docs/agents/net-agent/getting-started/compatibility-requirements-net-core-agent#database

What this means is we are unable to dedicate developer resources to resolving any conflicts the agent might have when using this database. I’ve opened a ticket so I could file a feature request on your behalf to provide support for this database. I would also strongly encourage you to head over to our Feature Ideas section and post a request to support this database:

https://discuss.newrelic.com/c/feature-ideas/feature-ideas-net-agent

Doing this will allow others in the community to vote on the request. Our product managers review all of these requests. While we can’t guarantee when or if this feature will be implemented, we take customer requests very seriously and use them to prioritize which features we implement next.

In the meantime, another community member may have encountered this previously and have a workaround. I’ll keep a watch on this to see if a solution is offered.


#3

I wouldn’t bother about RavenDB support for now. The bad thing is that your product requires library (Microsoft.AspNetCore.Diagnostics.Abstractions) to work or it breaks completely. So you make assumption in code on something that might not be always available. Please have a look at sample github project. It doesn’t use RavenDB at all. It uses kestrel.

For me the current fix would be:
If Microsoft.AspNetCore.Diagnostics.Abstractions is not available on path, then don’t try to instrument this application as it will break anyway. It is better solution than, saying: I can’t install new relic globally as it will break my kestel based apps.


#4

Hi @marcin4,

I see what you’re saying. Yes, this seems like it might be a more serious issue based on the dependency. However, I just noticed the version was set to 2.1.1. I would suggest reviewing the release notes for v8.4.880.0 of the agent:

https://docs.newrelic.com/docs/release-notes/agent-release-notes/net-release-notes/net-agent-848800

There was a bug in the .NET Core libraries that prevented our agent from working correctly with earlier versions of 2.1. We require the use of the .NET CoreCLR v2.1.3 or newer. It’s possible the issue you’re seeing may be resolved by updating the version of .NET Core installed on the system. If it is not, we first need to make sure you’re running the latest version of the agent (v8.9.130.0 right now), then see if it is still reproducible. Should that be the case, we can file this with our developers.


#5

will recheck that in spare moment.


#6

Hey @marcin4 - did you get some time to check up on the version of the agent, and the version of .Net Core installed as @kyle recommended??


#7

I can confirm it works using NewRelic.Agent.Core.dll in version: 8.11.157.0 and it doesn’t work using: 8.8.83.0


#8

Hey @marcin4 - Sounds like you got this working now with 8.11.157.0, is that right?