Open markwallace-microsoft opened 1 month ago
@TaoChenOSU can you take a look at this? Can we add the ability to add custom Tag to our telemetry hooks to support this and other use cases.
This is doable. We need the following sub-features to satisfy this requirement:
ChatCompletionService
, TextGenerationService
, etc. This has been implemented.The question comes down to how we would like to give a kernel instance an identifier or allow users to tag custom data to a kernel.
Depending on your setup, there is another option that doesn't require us to make changes to the Kernel source code. This approach involves creating unique resourceBuilder
s for your sessions: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/Demos/TelemetryWithAppInsights/Program.cs#L43. The service name of the resource will be automatically associated to the measurements created by the MeterProvider
associated with the resource. In Application Insights, it will be the cloud_RoleName
property:
I will draft a short ADR for the first option proposed above.
Discussed in https://github.com/microsoft/semantic-kernel/discussions/7583