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