-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathMessagingIncubatingAttributes.java
More file actions
479 lines (395 loc) · 17.9 KB
/
MessagingIncubatingAttributes.java
File metadata and controls
479 lines (395 loc) · 17.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.semconv.incubating;
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
import static io.opentelemetry.api.common.AttributeKey.longKey;
import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
import static io.opentelemetry.api.common.AttributeKey.stringKey;
import io.opentelemetry.api.common.AttributeKey;
import java.util.List;
// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
@SuppressWarnings("unused")
public final class MessagingIncubatingAttributes {
/**
* The number of messages sent, received, or processed in the scope of the batching operation.
*
* <p>Notes:
*
* <p>Instrumentations SHOULD NOT set {@code 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 {@code messaging.batch.message_count}
* for batching APIs and SHOULD NOT use it for single-message APIs.
*/
public static final AttributeKey<Long> MESSAGING_BATCH_MESSAGE_COUNT =
longKey("messaging.batch.message_count");
/** A unique identifier for the client that consumes or produces a message. */
public static final AttributeKey<String> MESSAGING_CLIENT_ID = stringKey("messaging.client.id");
/**
* The name of the consumer group with which a consumer is associated.
*
* <p>Notes:
*
* <p>Semantic conventions for individual messaging systems SHOULD document whether {@code
* messaging.consumer.group.name} is applicable and what it means in the context of that system.
*/
public static final AttributeKey<String> MESSAGING_CONSUMER_GROUP_NAME =
stringKey("messaging.consumer.group.name");
/**
* A boolean that is true if the message destination is anonymous (could be unnamed or have
* auto-generated name).
*/
public static final AttributeKey<Boolean> MESSAGING_DESTINATION_ANONYMOUS =
booleanKey("messaging.destination.anonymous");
/**
* The message destination name
*
* <p>Notes:
*
* <p>Destination name SHOULD uniquely identify a specific queue, topic or other entity within the
* broker. If the broker doesn't have such notion, the destination name SHOULD uniquely identify
* the broker.
*/
public static final AttributeKey<String> MESSAGING_DESTINATION_NAME =
stringKey("messaging.destination.name");
/**
* The identifier of the partition messages are sent to or received from, unique within the {@code
* messaging.destination.name}.
*/
public static final AttributeKey<String> MESSAGING_DESTINATION_PARTITION_ID =
stringKey("messaging.destination.partition.id");
/**
* The name of the destination subscription from which a message is consumed.
*
* <p>Notes:
*
* <p>Semantic conventions for individual messaging systems SHOULD document whether {@code
* messaging.destination.subscription.name} is applicable and what it means in the context of that
* system.
*/
public static final AttributeKey<String> MESSAGING_DESTINATION_SUBSCRIPTION_NAME =
stringKey("messaging.destination.subscription.name");
/**
* Low cardinality representation of the messaging destination name
*
* <p>Notes:
*
* <p>Destination names could be constructed from templates. An example would be a destination
* name involving a user name or product id. Although the destination name in this case is of high
* cardinality, the underlying template is of low cardinality and can be effectively used for
* grouping and aggregation.
*/
public static final AttributeKey<String> MESSAGING_DESTINATION_TEMPLATE =
stringKey("messaging.destination.template");
/**
* A boolean that is true if the message destination is temporary and might not exist anymore
* after messages are processed.
*/
public static final AttributeKey<Boolean> MESSAGING_DESTINATION_TEMPORARY =
booleanKey("messaging.destination.temporary");
/**
* Deprecated, no replacement at this time.
*
* @deprecated Removed. No replacement at this time.
*/
@Deprecated
public static final AttributeKey<Boolean> MESSAGING_DESTINATION_PUBLISH_ANONYMOUS =
booleanKey("messaging.destination_publish.anonymous");
/**
* Deprecated, no replacement at this time.
*
* @deprecated Removed. No replacement at this time.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_DESTINATION_PUBLISH_NAME =
stringKey("messaging.destination_publish.name");
/**
* Deprecated, use {@code messaging.consumer.group.name} instead.
*
* @deprecated Replaced by {@code messaging.consumer.group.name}.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_EVENTHUBS_CONSUMER_GROUP =
stringKey("messaging.eventhubs.consumer.group");
/** The UTC epoch seconds at which the message has been accepted and stored in the entity. */
public static final AttributeKey<Long> MESSAGING_EVENTHUBS_MESSAGE_ENQUEUED_TIME =
longKey("messaging.eventhubs.message.enqueued_time");
/** The ack deadline in seconds set for the modify ack deadline request. */
public static final AttributeKey<Long> MESSAGING_GCP_PUBSUB_MESSAGE_ACK_DEADLINE =
longKey("messaging.gcp_pubsub.message.ack_deadline");
/** The ack id for a given message. */
public static final AttributeKey<String> MESSAGING_GCP_PUBSUB_MESSAGE_ACK_ID =
stringKey("messaging.gcp_pubsub.message.ack_id");
/** The delivery attempt for a given message. */
public static final AttributeKey<Long> MESSAGING_GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT =
longKey("messaging.gcp_pubsub.message.delivery_attempt");
/**
* The ordering key for a given message. If the attribute is not present, the message does not
* have an ordering key.
*/
public static final AttributeKey<String> MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY =
stringKey("messaging.gcp_pubsub.message.ordering_key");
/**
* Deprecated, use {@code messaging.consumer.group.name} instead.
*
* @deprecated Replaced by {@code messaging.consumer.group.name}.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_KAFKA_CONSUMER_GROUP =
stringKey("messaging.kafka.consumer.group");
/**
* Deprecated, use {@code messaging.destination.partition.id} instead.
*
* @deprecated Replaced by {@code messaging.destination.partition.id}.
*/
@Deprecated
public static final AttributeKey<Long> MESSAGING_KAFKA_DESTINATION_PARTITION =
longKey("messaging.kafka.destination.partition");
/**
* Message keys in Kafka are used for grouping alike messages to ensure they're processed on the
* same partition. They differ from {@code messaging.message.id} in that they're not unique. If
* the key is {@code null}, the attribute MUST NOT be set.
*
* <p>Notes:
*
* <p>If the key type is not string, it's string representation has to be supplied for the
* attribute. If the key has no unambiguous, canonical string form, don't include its value.
*/
public static final AttributeKey<String> MESSAGING_KAFKA_MESSAGE_KEY =
stringKey("messaging.kafka.message.key");
/**
* Deprecated, use {@code messaging.kafka.offset} instead.
*
* @deprecated Replaced by {@code messaging.kafka.offset}.
*/
@Deprecated
public static final AttributeKey<Long> MESSAGING_KAFKA_MESSAGE_OFFSET =
longKey("messaging.kafka.message.offset");
/** A boolean that is true if the message is a tombstone. */
public static final AttributeKey<Boolean> MESSAGING_KAFKA_MESSAGE_TOMBSTONE =
booleanKey("messaging.kafka.message.tombstone");
/** The offset of a record in the corresponding Kafka partition. */
public static final AttributeKey<Long> MESSAGING_KAFKA_OFFSET = longKey("messaging.kafka.offset");
/**
* The size of the message body in bytes.
*
* <p>Notes:
*
* <p>This can refer to both the compressed or uncompressed body size. If both sizes are known,
* the uncompressed body size should be used.
*/
public static final AttributeKey<Long> MESSAGING_MESSAGE_BODY_SIZE =
longKey("messaging.message.body.size");
/**
* The conversation ID identifying the conversation to which the message belongs, represented as a
* string. Sometimes called "Correlation ID".
*/
public static final AttributeKey<String> MESSAGING_MESSAGE_CONVERSATION_ID =
stringKey("messaging.message.conversation_id");
/**
* The size of the message body and metadata in bytes.
*
* <p>Notes:
*
* <p>This can refer to both the compressed or uncompressed size. If both sizes are known, the
* uncompressed size should be used.
*/
public static final AttributeKey<Long> MESSAGING_MESSAGE_ENVELOPE_SIZE =
longKey("messaging.message.envelope.size");
/**
* A value used by the messaging system as an identifier for the message, represented as a string.
*/
public static final AttributeKey<String> MESSAGING_MESSAGE_ID = stringKey("messaging.message.id");
/**
* Deprecated, use {@code messaging.operation.type} instead.
*
* @deprecated Replaced by {@code messaging.operation.type}.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_OPERATION = stringKey("messaging.operation");
/** The system-specific name of the messaging operation. */
public static final AttributeKey<String> MESSAGING_OPERATION_NAME =
stringKey("messaging.operation.name");
/**
* A string identifying the type of the messaging operation.
*
* <p>Notes:
*
* <p>If a custom value is used, it MUST be of low cardinality.
*/
public static final AttributeKey<String> MESSAGING_OPERATION_TYPE =
stringKey("messaging.operation.type");
/** RabbitMQ message routing key. */
public static final AttributeKey<String> MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY =
stringKey("messaging.rabbitmq.destination.routing_key");
/** RabbitMQ message delivery tag */
public static final AttributeKey<Long> MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG =
longKey("messaging.rabbitmq.message.delivery_tag");
/**
* Deprecated, use {@code messaging.consumer.group.name} instead.
*
* @deprecated Replaced by {@code messaging.consumer.group.name} on the consumer spans. No
* replacement for producer spans.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_ROCKETMQ_CLIENT_GROUP =
stringKey("messaging.rocketmq.client_group");
/** Model of message consumption. This only applies to consumer spans. */
public static final AttributeKey<String> MESSAGING_ROCKETMQ_CONSUMPTION_MODEL =
stringKey("messaging.rocketmq.consumption_model");
/** The delay time level for delay message, which determines the message delay time. */
public static final AttributeKey<Long> MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL =
longKey("messaging.rocketmq.message.delay_time_level");
/**
* The timestamp in milliseconds that the delay message is expected to be delivered to consumer.
*/
public static final AttributeKey<Long> MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP =
longKey("messaging.rocketmq.message.delivery_timestamp");
/**
* It is essential for FIFO message. Messages that belong to the same message group are always
* processed one by one within the same consumer group.
*/
public static final AttributeKey<String> MESSAGING_ROCKETMQ_MESSAGE_GROUP =
stringKey("messaging.rocketmq.message.group");
/** Key(s) of message, another way to mark message besides message id. */
public static final AttributeKey<List<String>> MESSAGING_ROCKETMQ_MESSAGE_KEYS =
stringArrayKey("messaging.rocketmq.message.keys");
/** The secondary classifier of message besides topic. */
public static final AttributeKey<String> MESSAGING_ROCKETMQ_MESSAGE_TAG =
stringKey("messaging.rocketmq.message.tag");
/** Type of message. */
public static final AttributeKey<String> MESSAGING_ROCKETMQ_MESSAGE_TYPE =
stringKey("messaging.rocketmq.message.type");
/** Namespace of RocketMQ resources, resources in different namespaces are individual. */
public static final AttributeKey<String> MESSAGING_ROCKETMQ_NAMESPACE =
stringKey("messaging.rocketmq.namespace");
/**
* Deprecated, use {@code messaging.destination.subscription.name} instead.
*
* @deprecated Replaced by {@code messaging.destination.subscription.name}.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME =
stringKey("messaging.servicebus.destination.subscription_name");
/**
* Describes the <a
* href="https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock">settlement
* type</a>.
*/
public static final AttributeKey<String> MESSAGING_SERVICEBUS_DISPOSITION_STATUS =
stringKey("messaging.servicebus.disposition_status");
/** Number of deliveries that have been attempted for this message. */
public static final AttributeKey<Long> MESSAGING_SERVICEBUS_MESSAGE_DELIVERY_COUNT =
longKey("messaging.servicebus.message.delivery_count");
/** The UTC epoch seconds at which the message has been accepted and stored in the entity. */
public static final AttributeKey<Long> MESSAGING_SERVICEBUS_MESSAGE_ENQUEUED_TIME =
longKey("messaging.servicebus.message.enqueued_time");
/**
* The messaging system as identified by the client instrumentation.
*
* <p>Notes:
*
* <p>The actual messaging system may differ from the one known by the client. For example, when
* using Kafka client libraries to communicate with Azure Event Hubs, the {@code messaging.system}
* is set to {@code kafka} based on the instrumentation's best knowledge.
*/
public static final AttributeKey<String> MESSAGING_SYSTEM = stringKey("messaging.system");
// Enum definitions
/** Values for {@link #MESSAGING_OPERATION_TYPE}. */
public static final class MessagingOperationTypeIncubatingValues {
/**
* A message is created. "Create" spans always refer to a single message and are used to provide
* a unique creation context for messages in batch sending scenarios.
*/
public static final String CREATE = "create";
/**
* One or more messages are provided for sending to an intermediary. If a single message is
* sent, the context of the "Send" span can be used as the creation context and no "Create" span
* needs to be created.
*/
public static final String SEND = "send";
/**
* One or more messages are requested by a consumer. This operation refers to pull-based
* scenarios, where consumers explicitly call methods of messaging SDKs to receive messages.
*/
public static final String RECEIVE = "receive";
/** One or more messages are processed by a consumer. */
public static final String PROCESS = "process";
/** One or more messages are settled. */
public static final String SETTLE = "settle";
/**
* Deprecated. Use {@code process} instead.
*
* @deprecated Replaced by {@code process}.
*/
@Deprecated public static final String DELIVER = "deliver";
/**
* Deprecated. Use {@code send} instead.
*
* @deprecated Replaced by {@code send}.
*/
@Deprecated public static final String PUBLISH = "publish";
private MessagingOperationTypeIncubatingValues() {}
}
/** Values for {@link #MESSAGING_ROCKETMQ_CONSUMPTION_MODEL}. */
public static final class MessagingRocketmqConsumptionModelIncubatingValues {
/** Clustering consumption model */
public static final String CLUSTERING = "clustering";
/** Broadcasting consumption model */
public static final String BROADCASTING = "broadcasting";
private MessagingRocketmqConsumptionModelIncubatingValues() {}
}
/** Values for {@link #MESSAGING_ROCKETMQ_MESSAGE_TYPE}. */
public static final class MessagingRocketmqMessageTypeIncubatingValues {
/** Normal message */
public static final String NORMAL = "normal";
/** FIFO message */
public static final String FIFO = "fifo";
/** Delay message */
public static final String DELAY = "delay";
/** Transaction message */
public static final String TRANSACTION = "transaction";
private MessagingRocketmqMessageTypeIncubatingValues() {}
}
/** Values for {@link #MESSAGING_SERVICEBUS_DISPOSITION_STATUS}. */
public static final class MessagingServicebusDispositionStatusIncubatingValues {
/** Message is completed */
public static final String COMPLETE = "complete";
/** Message is abandoned */
public static final String ABANDON = "abandon";
/** Message is sent to dead letter queue */
public static final String DEAD_LETTER = "dead_letter";
/** Message is deferred */
public static final String DEFER = "defer";
private MessagingServicebusDispositionStatusIncubatingValues() {}
}
/** Values for {@link #MESSAGING_SYSTEM}. */
public static final class MessagingSystemIncubatingValues {
/** Apache ActiveMQ */
public static final String ACTIVEMQ = "activemq";
/** Amazon Simple Queue Service (SQS) */
public static final String AWS_SQS = "aws_sqs";
/** Azure Event Grid */
public static final String EVENTGRID = "eventgrid";
/** Azure Event Hubs */
public static final String EVENTHUBS = "eventhubs";
/** Azure Service Bus */
public static final String SERVICEBUS = "servicebus";
/** Google Cloud Pub/Sub */
public static final String GCP_PUBSUB = "gcp_pubsub";
/** Java Message Service */
public static final String JMS = "jms";
/** Apache Kafka */
public static final String KAFKA = "kafka";
/** RabbitMQ */
public static final String RABBITMQ = "rabbitmq";
/** Apache RocketMQ */
public static final String ROCKETMQ = "rocketmq";
/** Apache Pulsar */
public static final String PULSAR = "pulsar";
private MessagingSystemIncubatingValues() {}
}
private MessagingIncubatingAttributes() {}
}