You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The version of the Elastic.Apm nuget package used is 1.26
Environment
Operating system and version:
Azure Functions .NET Framework/Core name and version (e.g. .NET 4.6.2, NET Core 3.1.100) :
.Net Core 8 Application Target Framework(s) (e.g. net462, netcoreapp3.1):
dotnet-isolated
Describe the bug
It's not possible to set the service name with the discover default service name (Artifact name). It's always overwrite by the Azure Functions name.
To Reproduce
Steps to reproduce the behavior:
Deploy an Azure Function with the APM Agent like described in the documentation
Then call your function trigger (for exemple an HttpTrigger)
Then check the Service Name into the APM page
This Service Name will be the Azure Functions name and not the Artifact name
Expected behavior
With the ELASTIC_APM_SERVICE_NAME environment variable, we can update this Service Name but never with the Artifact Name. To have the same namming convention that the .Net Applications (into the APM page), i expecte to have the Artifact Name.
The text was updated successfully, but these errors were encountered:
Hi, @rfavreau. I'm sorry for not getting back to you sooner. I've been focusing on the Azure Functions instrumentation this week and noticed this issue.
The current behaviour is by design. When ELASTIC_APM_SERVICE_NAME is not configured, it prefers using the Function App name read from WEBSITE_SITE_NAME in Azure. When running locally, you can set that via the local.settings.json. There is a bug right now that I'll address to ensure that when it is null in local development, we handle it, probably by falling back to the discovered service name.
The expectation is that generally, you should explicitly set ELASTIC_APM_SERVICE_NAME in Azure if you want a name different from the name of the Function App the function lives under. Is that possible in your case?
I see you opened a PR to add a new config. I don't think that achieves what you intended, and I'm also reluctant to add another configuration option specifically for this scenario. ELASTIC_APM_SERVICE_NAME should be sufficient to control the service name explicitly.
APM Agent version
The version of the
Elastic.Apm
nuget package used is 1.26Environment
Operating system and version:
Azure Functions
.NET Framework/Core name and version (e.g. .NET 4.6.2, NET Core 3.1.100) :
.Net Core 8
Application Target Framework(s) (e.g. net462, netcoreapp3.1):
dotnet-isolated
Describe the bug
It's not possible to set the service name with the discover default service name (Artifact name). It's always overwrite by the Azure Functions name.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
With the
ELASTIC_APM_SERVICE_NAME
environment variable, we can update this Service Name but never with the Artifact Name. To have the same namming convention that the .Net Applications (into the APM page), i expecte to have the Artifact Name.The text was updated successfully, but these errors were encountered: