Embeddings\OpenTelemetryEmbeddingGenerator.cs (21)
63OpenTelemetryConsts.GenAI.Client.TokenUsage.Name,
65OpenTelemetryConsts.GenAI.Client.TokenUsage.Description,
66advice: new() { HistogramBucketBoundaries = OpenTelemetryConsts.GenAI.Client.TokenUsage.ExplicitBucketBoundaries });
69OpenTelemetryConsts.GenAI.Client.OperationDuration.Name,
71OpenTelemetryConsts.GenAI.Client.OperationDuration.Description,
72advice: new() { HistogramBucketBoundaries = OpenTelemetryConsts.GenAI.Client.OperationDuration.ExplicitBucketBoundaries });
129string.IsNullOrWhiteSpace(modelId) ? OpenTelemetryConsts.GenAI.Embed : $"{OpenTelemetryConsts.GenAI.Embed} {modelId}",
133new(OpenTelemetryConsts.GenAI.Operation.Name, OpenTelemetryConsts.GenAI.Embed),
134new(OpenTelemetryConsts.GenAI.Request.Model, modelId),
135new(OpenTelemetryConsts.GenAI.SystemName, _modelProvider),
149_ = activity.AddTag(OpenTelemetryConsts.GenAI.Request.EmbeddingDimensions, dimensions);
191tags.Add(OpenTelemetryConsts.GenAI.Token.Type, "input");
208_ = activity.AddTag(OpenTelemetryConsts.GenAI.Response.InputTokens, inputTokens);
213_ = activity.AddTag(OpenTelemetryConsts.GenAI.Response.Model, responseModelId);
220tags.Add(OpenTelemetryConsts.GenAI.Operation.Name, OpenTelemetryConsts.GenAI.Embed);
224tags.Add(OpenTelemetryConsts.GenAI.Request.Model, requestModelId);
227tags.Add(OpenTelemetryConsts.GenAI.SystemName, _modelProvider);
238tags.Add(OpenTelemetryConsts.GenAI.Response.Model, responseModelId);