Azure-functions-host: Application Insights -- add custom dimensions to 'requests' telemetry items generated by the host

Created on 3 Apr 2018  路  9Comments  路  Source: Azure/azure-functions-host

Hi,

I'm really missing the ability to decorate each request with custom dimensions.
I'm using the native functions integration with AppInsights, and I use ILogger -- I wouldn't want to install the AppInsights nuget and do all the initializations myself.

Optimal solution for me is to have a Dictionary as an optional input in the Function's signature.

Is this by any chance possible today?
If not, can you consider this as a new feature/improvement?

Many thanks !
Jonathan

application-insights

Most helpful comment

Activity.Current.Tag(...) seems to work and translates into a custom property on the App Insights side. Would be good to have confirmation this is a supported way of working. Similarly, Activity.Current.AddBagage equally seems to work for custom tracking data which you want to pass onto any dependencies (and dependencies of those... all the way down)l. This is compatible with at least Service Bus and .NET Core Http.

All 9 comments

I am exactly looking for such feature. Thanx Johnib for posting 馃憤

I have read that this is coming, or already here?, like a few other improvements to App Insights integration that have gone in recently. (Just searching for the source I saw a month or two back.)

@jeffhollan Please have (whoever recently worked on app insights / functions integration) respond to this issue? I suspect it may be now "Done", but I can't remember where I read it.

Can someone please let us know if we can use ILogger's LogInformation method to log CustomeDimensions in Application insights.

@mayank1495 you cannuse that method and they will go through to app insights as traces.

And that's fine but if we could add attributes directly to requests (as customdimensions) they would be much more easily discoverable. Presumably also reduces our app insights bills if we send fewer objects.

I'm really missing the ability to decorate each request with custom dimensions.

@johnib @madhu2a I found this old comment from @lmolkova ... does it work?

https://github.com/Azure/azure-webjobs-sdk/pull/1965#issuecomment-430364439

@ahmedelnably in case he has an answer as well

Activity.Current.Tag(...) seems to work and translates into a custom property on the App Insights side. Would be good to have confirmation this is a supported way of working. Similarly, Activity.Current.AddBagage equally seems to work for custom tracking data which you want to pass onto any dependencies (and dependencies of those... all the way down)l. This is compatible with at least Service Bus and .NET Core Http.

@brettsam, this issue fell through the cracks. Can you comment?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ladeak picture ladeak  路  3Comments

paulbatum picture paulbatum  路  4Comments

christopheranderson picture christopheranderson  路  4Comments

mathewc picture mathewc  路  3Comments

silencev picture silencev  路  3Comments