1
+ // Licensed to the .NET Foundation under one or more agreements.
2
+ // The .NET Foundation licenses this file to you under the MIT license.
3
+ // See the LICENSE file in the project root for more information.
4
+
5
+ namespace DevProxy . Abstractions . OpenTelemetry ;
6
+
7
+ public static class SemanticConvention
8
+ {
9
+ // GenAI General
10
+ public const string GEN_AI_ENDPOINT = "gen_ai.endpoint" ;
11
+ public const string GEN_AI_SYSTEM = "gen_ai.system" ;
12
+ public const string GEN_AI_ENVIRONMENT = "gen_ai.environment" ;
13
+ public const string GEN_AI_APPLICATION_NAME = "gen_ai.application_name" ;
14
+ public const string GEN_AI_OPERATION = "gen_ai.type" ;
15
+ public const string GEN_AI_OPERATION_NAME = "gen_ai.operation.name" ;
16
+ public const string GEN_AI_HUB_OWNER = "gen_ai.hub.owner" ;
17
+ public const string GEN_AI_HUB_REPO = "gen_ai.hub.repo" ;
18
+ public const string GEN_AI_RETRIEVAL_SOURCE = "gen_ai.retrieval.source" ;
19
+ public const string GEN_AI_REQUESTS = "gen_ai.total.requests" ;
20
+
21
+ // GenAI Request
22
+ public const string GEN_AI_REQUEST_MODEL = "gen_ai.request.model" ;
23
+ public const string GEN_AI_REQUEST_TEMPERATURE = "gen_ai.request.temperature" ;
24
+ public const string GEN_AI_REQUEST_TOP_P = "gen_ai.request.top_p" ;
25
+ public const string GEN_AI_REQUEST_TOP_K = "gen_ai.request.top_k" ;
26
+ public const string GEN_AI_REQUEST_MAX_TOKENS = "gen_ai.request.max_tokens" ;
27
+ public const string GEN_AI_REQUEST_IS_STREAM = "gen_ai.request.is_stream" ;
28
+ public const string GEN_AI_REQUEST_USER = "gen_ai.request.user" ;
29
+ public const string GEN_AI_REQUEST_SEED = "gen_ai.request.seed" ;
30
+ public const string GEN_AI_REQUEST_FREQUENCY_PENALTY = "gen_ai.request.frequency_penalty" ;
31
+ public const string GEN_AI_REQUEST_PRESENCE_PENALTY = "gen_ai.request.presence_penalty" ;
32
+ public const string GEN_AI_REQUEST_ENCODING_FORMATS = "gen_ai.request.embedding_format" ;
33
+ public const string GEN_AI_REQUEST_EMBEDDING_DIMENSION = "gen_ai.request.embedding_dimension" ;
34
+ public const string GEN_AI_REQUEST_TOOL_CHOICE = "gen_ai.request.tool_choice" ;
35
+ public const string GEN_AI_REQUEST_AUDIO_VOICE = "gen_ai.request.audio_voice" ;
36
+ public const string GEN_AI_REQUEST_AUDIO_RESPONSE_FORMAT = "gen_ai.request.audio_response_format" ;
37
+ public const string GEN_AI_REQUEST_AUDIO_SPEED = "gen_ai.request.audio_speed" ;
38
+ public const string GEN_AI_REQUEST_FINETUNE_STATUS = "gen_ai.request.fine_tune_status" ;
39
+ public const string GEN_AI_REQUEST_FINETUNE_MODEL_SUFFIX = "gen_ai.request.fine_tune_model_suffix" ;
40
+ public const string GEN_AI_REQUEST_FINETUNE_MODEL_EPOCHS = "gen_ai.request.fine_tune_n_epochs" ;
41
+ public const string GEN_AI_REQUEST_FINETUNE_MODEL_LRM = "gen_ai.request.learning_rate_multiplier" ;
42
+ public const string GEN_AI_REQUEST_FINETUNE_BATCH_SIZE = "gen_ai.request.fine_tune_batch_size" ;
43
+ public const string GEN_AI_REQUEST_VALIDATION_FILE = "gen_ai.request.validation_file" ;
44
+ public const string GEN_AI_REQUEST_TRAINING_FILE = "gen_ai.request.training_file" ;
45
+ public const string GEN_AI_REQUEST_IMAGE_SIZE = "gen_ai.request.image_size" ;
46
+ public const string GEN_AI_REQUEST_IMAGE_QUALITY = "gen_ai.request.image_quality" ;
47
+ public const string GEN_AI_REQUEST_IMAGE_STYLE = "gen_ai.request.image_style" ;
48
+
49
+ // GenAI Usage
50
+ public const string GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens" ;
51
+ public const string GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens" ;
52
+ // OpenLIT
53
+ public const string GEN_AI_USAGE_TOTAL_TOKENS = "gen_ai.usage.total_tokens" ;
54
+ public const string GEN_AI_USAGE_COST = "gen_ai.usage.cost" ;
55
+ public const string GEN_AI_USAGE_TOTAL_COST = "gen_ai.usage.total_cost" ;
56
+
57
+ // GenAI Response
58
+ public const string GEN_AI_RESPONSE_ID = "gen_ai.response.id" ;
59
+ public const string GEN_AI_RESPONSE_MODEL = "gen_ai.response.model" ;
60
+ public const string GEN_AI_RESPONSE_FINISH_REASON = "gen_ai.response.finish_reason" ;
61
+ public const string GEN_AI_RESPONSE_IMAGE = "gen_ai.response.image" ;
62
+ public const string GEN_AI_RESPONSE_IMAGE_SIZE = "gen_ai.request.image_size" ;
63
+ public const string GEN_AI_RESPONSE_IMAGE_QUALITY = "gen_ai.request.image_quality" ;
64
+ public const string GEN_AI_RESPONSE_IMAGE_STYLE = "gen_ai.request.image_style" ;
65
+
66
+ // GenAI Content
67
+ public const string GEN_AI_CONTENT_PROMPT = "gen_ai.content.prompt" ;
68
+ public const string GEN_AI_CONTENT_COMPLETION = "gen_ai.completion" ;
69
+ public const string GEN_AI_CONTENT_REVISED_PROMPT = "gen_ai.content.revised_prompt" ;
70
+
71
+ // Operation Types
72
+ public const string GEN_AI_OPERATION_TYPE_CHAT = "chat" ;
73
+ public const string GEN_AI_OPERATION_TYPE_EMBEDDING = "embedding" ;
74
+ public const string GEN_AI_OPERATION_TYPE_IMAGE = "image" ;
75
+ public const string GEN_AI_OPERATION_TYPE_AUDIO = "audio" ;
76
+ public const string GEN_AI_OPERATION_TYPE_FINETUNING = "fine_tuning" ;
77
+ public const string GEN_AI_OPERATION_TYPE_VECTORDB = "vectordb" ;
78
+ public const string GEN_AI_OPERATION_TYPE_FRAMEWORK = "framework" ;
79
+
80
+ // Metrics
81
+ public const string GEN_AI_METRIC_CLIENT_TOKEN_USAGE = "gen_ai.client.token.usage" ;
82
+ public const string GEN_AI_TOKEN_TYPE = "gen_ai.token.type" ;
83
+ public const string GEN_AI_TOKEN_TYPE_INPUT = "input" ;
84
+ public const string GEN_AI_TOKEN_TYPE_OUTPUT = "output" ;
85
+ public const string GEN_AI_METRIC_CLIENT_OPERATION_DURATION = "gen_ai.client.operation.duration" ;
86
+ }
0 commit comments