How to add metadata to traces in Azure functions
Open
area: documentation
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
I have an Azure function(.NET core 2.0) that runs on each PR in an ADO repo. I would like to add the PR-ID as metadata to each trace logged by the Azure function. (I am viewing the logs using the traces table in the Azure application insights instance)
The Azure function logs traces via:
```
public static async Task Run([HttpTrigger(AuthorizationLevel.Function, "post", Route = null)]HttpRequestMessage req, ILogger log, ExecutionContext context)
{
logger.LogInformation("Trace Message");
}
```
How can I add additional metadata to each trace?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.