[AI Custom Telemetry] Avoid requirement of BYO telemetry client (external logger) in function code
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
VS Preview 15.3 Azure compiled functions
In the Wiki it discusses the ability to [send custom telemetry](https://github.com/Azure/Azure-Functions/wiki/App-Insights-(Preview)#custom-telemetry). This requires a developer for every function to have to define base telemetry client data (ie, Context.Operation.Id, ParentId, etc) to manually 'sync' the output to AI - which needs to stay in sync with changes on the [webjobs application insight component](https://github.com/Azure/azure-webjobs-sdk/tree/dev/src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights). It is also important that the developer knows the 'how' the properties are mapped. (I think this should be the responsibility of the Logging.ApplicationInsights component).
Can we look at some way in a function of being able to place the following onto 'something' so that the webjobs application insight component can pick these up ??:
- Events (string)
- Metrics (string, data...)
- Dependencies (**only ones a developer explicitly codes within the function run method, maybe with a function that wraps around and runs the call?**)
Best to keep the same signatures as application insights on the TelemetryClient, but a WebJobs controlled interface/class, etc.
Dependency tracking (for binding outputs) can be ignored from that list as that is covered by automatically picking them up here
Azure/azure-webjobs-sdk#1208 and correlation needs a common in sync TelemetryClient discussed here Azure/Azure-Functions#245
It would mean that if we moved to allow the loggers as an extension element referenced here Azure/azure-webjobs-sdk-script#1668 then anyone can write any external output logging implementation utilizing a common 'internal to webjobs' signature approach to outputting metrics from within a function.
Because they then travel to the Logging.XYZ it is up to that component how to translate the webjobs 'metrics, events' etc into the appropriate form.
Thus, allowing the reuse of the lower WebJobs Application Insight TelemetryClient and meaning we don't need to remember as a developer to keep the the id's in sync.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.