Reputation: 1170
I have an app service (.NET 4.6.2) which sends custom telemetry Trace entries to App Insights. These Trace entries contain custom properties which help us filter the log to specific ID's.
However, when filtering the App Insights log by ID, we lose visibility to Dependency calls since the Dependency call does not contain the same custom property as the Trace.
Is there a way to add custom properties to Dependency calls?
Upvotes: 3
Views: 3185
Reputation: 3196
TelemetryInitializers is the correct way of adding any additional custom property to any telemetry type - Traces/Dependencies/Requests etc. https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#add-properties-itelemetryinitializer
Also if you are using default config, Dependencies/Traces made within the context of a Request will be automatically correlated together for you with same 'operation_id'.
Upvotes: 1