|
20 | 20 | * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv |
21 | 21 | */ |
22 | 22 |
|
| 23 | +/** |
| 24 | + * The ARN of the AWS SNS Topic. An Amazon SNS [topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) is a logical access point that acts as a communication channel. |
| 25 | + * |
| 26 | + * @example arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE |
| 27 | + * |
| 28 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 29 | + */ |
| 30 | +export const ATTR_AWS_SNS_TOPIC_ARN = 'aws.sns.topic.arn' as const; |
| 31 | + |
23 | 32 | /** |
24 | 33 | * The name of the operation being performed. |
25 | 34 | * |
@@ -139,40 +148,84 @@ export const ATTR_GEN_AI_USAGE_INPUT_TOKENS = |
139 | 148 | export const ATTR_GEN_AI_USAGE_OUTPUT_TOKENS = |
140 | 149 | 'gen_ai.usage.output_tokens' as const; |
141 | 150 |
|
| 151 | +/** |
| 152 | + * The number of messages sent, received, or processed in the scope of the batching operation. |
| 153 | + * |
| 154 | + * @example 0 |
| 155 | + * @example 1 |
| 156 | + * @example 2 |
| 157 | + * |
| 158 | + * @note Instrumentations **SHOULD NOT** set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations **SHOULD** use `messaging.batch.message_count` for batching APIs and **SHOULD NOT** use it for single-message APIs. |
| 159 | + * |
| 160 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 161 | + */ |
| 162 | +export const ATTR_MESSAGING_BATCH_MESSAGE_COUNT = |
| 163 | + 'messaging.batch.message_count' as const; |
| 164 | + |
| 165 | +/** |
| 166 | + * The message destination name |
| 167 | + * |
| 168 | + * @example MyQueue |
| 169 | + * @example MyTopic |
| 170 | + * |
| 171 | + * @note Destination name **SHOULD** uniquely identify a specific queue, topic or other entity within the broker. If |
| 172 | + * the broker doesn't have such notion, the destination name **SHOULD** uniquely identify the broker. |
| 173 | + * |
| 174 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 175 | + */ |
| 176 | +export const ATTR_MESSAGING_DESTINATION_NAME = |
| 177 | + 'messaging.destination.name' as const; |
| 178 | + |
| 179 | +/** |
| 180 | + * A value used by the messaging system as an identifier for the message, represented as a string. |
| 181 | + * |
| 182 | + * @example "452a7c7c7c7048c2f887f61572b18fc2" |
| 183 | + * |
| 184 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 185 | + */ |
| 186 | +export const ATTR_MESSAGING_MESSAGE_ID = 'messaging.message.id' as const; |
| 187 | + |
| 188 | +/** |
| 189 | + * A string identifying the type of the messaging operation. |
| 190 | + * |
| 191 | + * @note If a custom value is used, it **MUST** be of low cardinality. |
| 192 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 193 | + */ |
| 194 | +export const ATTR_MESSAGING_OPERATION_TYPE = |
| 195 | + 'messaging.operation.type' as const; |
| 196 | + |
142 | 197 | /** |
143 | 198 | * Enum value "chat" for attribute {@link ATTR_GEN_AI_OPERATION_NAME}. |
| 199 | + * |
| 200 | + * Chat completion operation such as [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat) |
| 201 | + * |
| 202 | + * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
144 | 203 | */ |
145 | 204 | export const GEN_AI_OPERATION_NAME_VALUE_CHAT = 'chat' as const; |
146 | 205 |
|
147 | 206 | /** |
148 | 207 | * Enum value "aws.bedrock" for attribute {@link ATTR_GEN_AI_SYSTEM}. |
| 208 | + * |
| 209 | + * AWS Bedrock |
| 210 | + * |
| 211 | + * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
149 | 212 | */ |
150 | 213 | export const GEN_AI_SYSTEM_VALUE_AWS_BEDROCK = 'aws.bedrock' as const; |
151 | 214 |
|
152 | 215 | /** |
153 | 216 | * Enum value "input" for attribute {@link ATTR_GEN_AI_TOKEN_TYPE}. |
| 217 | + * |
| 218 | + * Input tokens (prompt, input, etc.) |
| 219 | + * |
| 220 | + * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
154 | 221 | */ |
155 | 222 | export const GEN_AI_TOKEN_TYPE_VALUE_INPUT = 'input' as const; |
156 | 223 |
|
157 | 224 | /** |
158 | 225 | * Enum value "output" for attribute {@link ATTR_GEN_AI_TOKEN_TYPE}. |
| 226 | + * |
| 227 | + * Output tokens (completion, response, etc.) |
| 228 | + * |
| 229 | + * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
159 | 230 | */ |
160 | 231 | export const GEN_AI_TOKEN_TYPE_VALUE_OUTPUT = 'output' as const; |
161 | | - |
162 | | -export const ATTR_MESSAGING_BATCH_MESSAGE_COUNT = |
163 | | - 'messaging.batch.message_count' as const; |
164 | | -export const ATTR_MESSAGING_DESTINATION_NAME = |
165 | | - 'messaging.destination.name' as const; |
166 | | -export const ATTR_MESSAGING_MESSAGE_ID = 'messaging.message.id' as const; |
167 | | -export const ATTR_MESSAGING_OPERATION_TYPE = |
168 | | - 'messaging.operation.type' as const; |
169 | | - |
170 | | -/** |
171 | | - * Originally from '@opentelemetry/semantic-conventions/incubating' |
172 | | - * https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/aws.md#amazon-sns-attributes |
173 | | - * The ARN of the AWS SNS Topic. An Amazon SNS [topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) |
174 | | - * is a logical access point that acts as a communication channel. |
175 | | - * @example arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE |
176 | | - * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
177 | | - */ |
178 | | -export const ATTR_AWS_SNS_TOPIC_ARN = 'aws.sns.topic.arn' as const; |
|
0 commit comments