10 references to GetTagItem
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3129Assert.Equal("true", Activity.Current.GetTagItem("http.long_running"));
Microsoft.Extensions.AI.Integration.Tests (9)
ChatClientIntegrationTests.cs (6)
192var totalInputTokens = activities.Sum(a => (int?)a.GetTagItem("gen_ai.response.input_tokens")!); 193var totalOutputTokens = activities.Sum(a => (int?)a.GetTagItem("gen_ai.response.output_tokens")!); 623Assert.StartsWith("http", (string)activity.GetTagItem("server.address")!); 624Assert.Equal(chatClient.Metadata.ProviderUri?.Port, (int)activity.GetTagItem("server.port")!); 627Assert.NotEqual(0, (int)activity.GetTagItem("gen_ai.response.input_tokens")!); 628Assert.NotEqual(0, (int)activity.GetTagItem("gen_ai.response.output_tokens")!);
EmbeddingGeneratorIntegrationTests.cs (3)
124Assert.StartsWith("http", (string)activity.GetTagItem("server.address")!); 125Assert.Equal(embeddingGenerator.Metadata.ProviderUri?.Port, (int)activity.GetTagItem("server.port")!); 128Assert.NotEqual(0, (int)activity.GetTagItem("gen_ai.response.input_tokens")!);