Skip to content

Commit 5d50710

Browse files
committed
regenerate src/semconv.ts with scripts/gen-semconv-ts.js tool
This just re-orders and adds the block comments from the semantic-conventions package.
1 parent 4308ee1 commit 5d50710

File tree

1 file changed

+71
-18
lines changed

1 file changed

+71
-18
lines changed

packages/instrumentation-aws-sdk/src/semconv.ts

Lines changed: 71 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
2121
*/
2222

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+
2332
/**
2433
* The name of the operation being performed.
2534
*
@@ -139,40 +148,84 @@ export const ATTR_GEN_AI_USAGE_INPUT_TOKENS =
139148
export const ATTR_GEN_AI_USAGE_OUTPUT_TOKENS =
140149
'gen_ai.usage.output_tokens' as const;
141150

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+
142197
/**
143198
* 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`.
144203
*/
145204
export const GEN_AI_OPERATION_NAME_VALUE_CHAT = 'chat' as const;
146205

147206
/**
148207
* 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`.
149212
*/
150213
export const GEN_AI_SYSTEM_VALUE_AWS_BEDROCK = 'aws.bedrock' as const;
151214

152215
/**
153216
* 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`.
154221
*/
155222
export const GEN_AI_TOKEN_TYPE_VALUE_INPUT = 'input' as const;
156223

157224
/**
158225
* 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`.
159230
*/
160231
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

Comments
 (0)