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

Linux Kudu not accessible when .NET agent presents. #616

Closed
vuqtran88 opened this issue Jun 24, 2021 · 3 comments · Fixed by #618
Closed

Linux Kudu not accessible when .NET agent presents. #616

vuqtran88 opened this issue Jun 24, 2021 · 3 comments · Fixed by #618
Labels
bug Something isn't working

Comments

@vuqtran88
Copy link
Contributor

vuqtran88 commented Jun 24, 2021

Description
When installing the latest agent on an app specifically targeting .NET 5 on linux azure, Kudu is no longer accessible. When removing the agent, kudu works again. It appears that Kudu was instrumented by the agent and it is unclear why the agent broke Kudu.

This only happens in linux azure. It didn't happen on Windows azure, because the profiler was hardcoded to not instrument the .Net Framework version of Kudu.

This is how the profiler is currently detecting Kudu so that it can ignore Kudu.

bool isKudu = NewRelic::Profiler::Strings::ContainsCaseInsensitive(commandLine, _X("Kudu.Services.Web.dll"));
. This detection would fail when Kudu is invoked with this command $: /opt/Kudu/Kudu.Services.Web.
I suspect Microsoft changed how they invoke Kudu which made our detection no longer works.

A fix would be updating the profiler to detect the kudu process in linux and don't do anything.

We may consider a feature where we could specify name of apps that the agent should not instrument.

Expected Behavior
Kudu shouldn't break.

@vuqtran88 vuqtran88 added the bug Something isn't working label Jun 24, 2021
@vuqtran88 vuqtran88 changed the title Linux Kudu not accessible when .NET agent present. Linux Kudu not accessible when .NET agent presents. Jun 24, 2021
@heatherzurek
Copy link

A fix was added for no longer instrumenting the Kudu process in .NET agent version 8.26, although this was before the .NET 5 release.

Fixes issue for Azure App Service environments running on Linux that caused both the application and its Kudu process to be instrumented by the agent. The Kudu process is no longer instrumented.

@vuqtran88
Copy link
Contributor Author

vuqtran88 commented Jun 24, 2021

A fix was added for no longer instrumenting the Kudu process in .NET agent version 8.26, although this was before the .NET 5 release.

Fixes issue for Azure App Service environments running on Linux that caused both the application and its Kudu process to be instrumented by the agent. The Kudu process is no longer instrumented.

This is how the profiler is currently detecting Kudu

bool isKudu = NewRelic::Profiler::Strings::ContainsCaseInsensitive(commandLine, _X("Kudu.Services.Web.dll"));
.Whatever the fix mentioned, it didn't fix the case when Kudu is invoked with this command $: /opt/Kudu/Kudu.Services.Web.

I suspect Microsoft changed how they invoke Kudu which made our detection no longer works.

@tehbio
Copy link
Contributor

tehbio commented Jun 25, 2021

Quick fix for this here:

bool isKudu = NewRelic::Profiler::Strings::ContainsCaseInsensitive(commandLine, _X("Kudu.Services.Web"));

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

Successfully merging a pull request may close this issue.

4 participants