0
votes

I have an azure function that uses a custom library, which in its turn uses service.model to call a WSAP, and i want to add some specific custom properties regarding this call.

enter image description here

I have used a custom TelemetryInitializer which i injected in the startup in order to add the custom properties (e.g. depedencyRequestMessageContent).

So i would like to have some extra information added in the custom properties that are not available inside my DependencyTelemetry HTTP request such as method and session id that was used.

Can i add this properties somehow before doing this call and have access to them in my custom TelemetryInitializer?

1

1 Answers

0
votes

In your custom TelemetryInitializer, you can write code to check each dependency request, to see if you can get these information. If you can get them, just add them as custom properties.

Another way is that you can write a middle-ware, in the middle-ware, write code to fetch these information, then pass them into application insights telemetry data.