diff --git a/javascript/sentry-conventions/src/op.ts b/javascript/sentry-conventions/src/op.ts index a8c63f72..e1b764fc 100644 --- a/javascript/sentry-conventions/src/op.ts +++ b/javascript/sentry-conventions/src/op.ts @@ -145,6 +145,41 @@ export const GENERAL_MARK_SPAN_OP = 'mark'; */ export const GENERAL_FUNCTION_SPAN_OP = 'function'; +// Path: model/op/messaging.json +// Name: messaging + +// Description: Messaging related spans represent operations on topics in streaming data systems and queues, such as producing and consuming messages in Kafka, RabbitMQ. + +/** + * A general queue operation. + */ +export const MESSAGING_QUEUE_SPAN_OP = 'queue'; + +/** + * Publishing a message to a queue. + */ +export const MESSAGING_QUEUE_PUBLISH_SPAN_OP = 'queue.publish'; + +/** + * Creating a queue or a message for later publishing. + */ +export const MESSAGING_QUEUE_CREATE_SPAN_OP = 'queue.create'; + +/** + * Receiving a message from a queue. + */ +export const MESSAGING_QUEUE_RECEIVE_SPAN_OP = 'queue.receive'; + +/** + * Processing a message from a queue. + */ +export const MESSAGING_QUEUE_PROCESS_SPAN_OP = 'queue.process'; + +/** + * Settling a message, e.g. acknowledging or rejecting it. + */ +export const MESSAGING_QUEUE_SETTLE_SPAN_OP = 'queue.settle'; + // Path: model/op/mobile.json // Name: mobile diff --git a/model/description/messaging.json b/model/description/messaging.json new file mode 100644 index 00000000..29059213 --- /dev/null +++ b/model/description/messaging.json @@ -0,0 +1,12 @@ +{ + "brief": "Queue", + "operations": [ + { + "name": "Queue", + "brief": "Operations that represent working with message queues, including publishing, receiving, processing, and settling messages.", + "ops": ["queue", "queue.publish", "queue.create", "queue.receive", "queue.process", "queue.settle"], + "templates": ["{{messaging.destination.name}}"], + "examples": ["order-events"] + } + ] +} diff --git a/model/op/messaging.json b/model/op/messaging.json new file mode 100644 index 00000000..d2d8c1ca --- /dev/null +++ b/model/op/messaging.json @@ -0,0 +1,30 @@ +{ + "name": "messaging", + "description": "Messaging related spans represent operations on topics in streaming data systems and queues, such as producing and consuming messages in Kafka, RabbitMQ.", + "fields": [ + { + "name": "queue", + "description": "A general queue operation." + }, + { + "name": "queue.publish", + "description": "Publishing a message to a queue." + }, + { + "name": "queue.create", + "description": "Creating a queue or a message for later publishing." + }, + { + "name": "queue.receive", + "description": "Receiving a message from a queue." + }, + { + "name": "queue.process", + "description": "Processing a message from a queue." + }, + { + "name": "queue.settle", + "description": "Settling a message, e.g. acknowledging or rejecting it." + } + ] +} diff --git a/rust/src/op.rs b/rust/src/op.rs index 89db85e1..7ae22d59 100644 --- a/rust/src/op.rs +++ b/rust/src/op.rs @@ -118,6 +118,28 @@ pub const GENERAL_MARK_SPAN_OP: &str = "mark"; /// The time it took for a set of instructions to execute pub const GENERAL_FUNCTION_SPAN_OP: &str = "function"; +// Path: model/op/messaging.json +// Name: messaging + +// Description: Messaging related spans represent operations on topics in streaming data systems and queues, such as producing and consuming messages in Kafka, RabbitMQ. +/// A general queue operation. +pub const MESSAGING_QUEUE_SPAN_OP: &str = "queue"; + +/// Publishing a message to a queue. +pub const MESSAGING_QUEUE_PUBLISH_SPAN_OP: &str = "queue.publish"; + +/// Creating a queue or a message for later publishing. +pub const MESSAGING_QUEUE_CREATE_SPAN_OP: &str = "queue.create"; + +/// Receiving a message from a queue. +pub const MESSAGING_QUEUE_RECEIVE_SPAN_OP: &str = "queue.receive"; + +/// Processing a message from a queue. +pub const MESSAGING_QUEUE_PROCESS_SPAN_OP: &str = "queue.process"; + +/// Settling a message, e.g. acknowledging or rejecting it. +pub const MESSAGING_QUEUE_SETTLE_SPAN_OP: &str = "queue.settle"; + // Path: model/op/mobile.json // Name: mobile