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

Support local development and execution of Azure Functions when using the Core Tools #2218

Open
stevejgordon opened this issue Nov 9, 2023 · 0 comments
Labels
agent-dotnet enhancement New feature or request

Comments

@stevejgordon
Copy link
Contributor

Currently, when the ApmMiddleware from Elastic.Apm.Azure.Functions is registered, traces will fail at APM server, if running the code using the Core Tools locally. This occurs because we expect to read various values used to populate the metadata from environment variables and these are not present in a developer environment.

A workaround is to include the following variables in the local.settings.json file to simulate those we require.

"FUNCTIONS_EXTENSION_VERSION": "Local",
"WEBSITE_OWNER_NAME": "SUB+RESOURCEGROUP-REGION",
"WEBSITE_SITE_NAME": "Local",
"REGION_NAME": "Region",
"WEBSITE_RESOURCE_GROUP": "Resource Group"

We should investigate introducing a fallback for simulating the metadata service runtime name when running locally. Ideally, we would find a heuristic to detect this scenario.

@stevejgordon stevejgordon added the enhancement New feature or request label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-dotnet enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant