// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. namespace Microsoft.Teams.Core.Diagnostics; /// /// Names of the and /// emitted by Microsoft.Teams.Core. /// /// /// Consumers register these names with their OpenTelemetry tracer and meter providers so that the bot /// pipeline spans (turn, middleware, auth.outbound, conversation_client) and metrics /// (teams.activities.received, teams.turn.duration, teams.handler.errors, /// teams.middleware.duration, teams.outbound.calls, teams.outbound.errors) flow to /// configured exporters. Higher-level layers publish their own sources (for example, /// Microsoft.Teams.Apps.Diagnostics.TeamsBotApplicationTelemetry); register them all to capture /// the full bot pipeline. /// /// builder.Services.AddOpenTelemetry() /// .WithTracing(t => t.AddSource(CoreTelemetryNames.ActivitySourceName)) /// .WithMetrics(m => m.AddMeter(CoreTelemetryNames.MeterName)); /// /// public static class CoreTelemetryNames { /// /// Name of the that emits Core pipeline spans. /// public const string ActivitySourceName = "Microsoft.Teams.Core"; /// /// Name of the that emits Core pipeline metrics. /// public const string MeterName = "Microsoft.Teams.Core"; }