Embeddings\OpenTelemetryEmbeddingGenerator.cs (23)
66OpenTelemetryConsts.GenAI.Client.TokenUsage.Name,
68OpenTelemetryConsts.GenAI.Client.TokenUsage.Description,
69advice: new() { HistogramBucketBoundaries = OpenTelemetryConsts.GenAI.Client.TokenUsage.ExplicitBucketBoundaries });
72OpenTelemetryConsts.GenAI.Client.OperationDuration.Name,
74OpenTelemetryConsts.GenAI.Client.OperationDuration.Description,
75advice: new() { HistogramBucketBoundaries = OpenTelemetryConsts.GenAI.Client.OperationDuration.ExplicitBucketBoundaries });
132string.IsNullOrWhiteSpace(modelId) ? OpenTelemetryConsts.GenAI.Embeddings : $"{OpenTelemetryConsts.GenAI.Embeddings} {modelId}",
136new(OpenTelemetryConsts.GenAI.Operation.Name, OpenTelemetryConsts.GenAI.Embeddings),
137new(OpenTelemetryConsts.GenAI.Request.Model, modelId),
138new(OpenTelemetryConsts.GenAI.SystemName, _modelProvider),
152_ = activity.AddTag(OpenTelemetryConsts.GenAI.Request.EmbeddingDimensions, dimensions);
166OpenTelemetryConsts.GenAI.Request.PerProvider(_system, JsonNamingPolicy.SnakeCaseLower.ConvertName(prop.Key)),
211tags.Add(OpenTelemetryConsts.GenAI.Token.Type, "input");
228_ = activity.AddTag(OpenTelemetryConsts.GenAI.Response.InputTokens, inputTokens);
233_ = activity.AddTag(OpenTelemetryConsts.GenAI.Response.Model, responseModelId);
245OpenTelemetryConsts.GenAI.Response.PerProvider(_system, JsonNamingPolicy.SnakeCaseLower.ConvertName(prop.Key)),
254tags.Add(OpenTelemetryConsts.GenAI.Operation.Name, OpenTelemetryConsts.GenAI.Embeddings);
258tags.Add(OpenTelemetryConsts.GenAI.Request.Model, requestModelId);
261tags.Add(OpenTelemetryConsts.GenAI.SystemName, _modelProvider);
272tags.Add(OpenTelemetryConsts.GenAI.Response.Model, responseModelId);