-
Notifications
You must be signed in to change notification settings - Fork 53
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
Access Telemetry Client to add customDimensions for App Insights #960
Comments
/cc @RohitRanjanMS |
After conferring with Rohit about this, it turns out that this is not possible. Request telemetry is sent using an application insights telemetry client on the host, not the worker, and it is not possible for function code to interact with the host's telemetry client. There is an issue open on the host right now, here that may add the functionality described here, but it is not certain how/if we will address it. |
I was also interested in having this possibility in Azure PowerShell functions. I have managed to come so far, but the only thing I'm missing is how to prevent having duplicate log entries when initializing a new application insights telemetry client on my own beside the one used by the host.
Initially I thought it was because my logger was also processing the host log messages or the other way around, and that was the reason why I was seeing duplicate log entries, but after adding the above custom dependency telemetry I notice the same behavior was still happening. I added my own dependency telemetry processor because I was only interested in keeping track of some SQL bulk import activities I was executing using Invoke-Sqlcmd. App Insights traces: Durable Activity monitoring pane: Kind regards, Juni |
Question. Is it possible to access and add customDimensions / properties to the existing telemetry client within the function app? Specifically for a request. I'm able to do so only when creating a new client and invoking trackRequest, like so:
But of course the function app already logs a request anyway, and I'd like to add to that.
The text was updated successfully, but these errors were encountered: