Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions javascript/sentry-conventions/src/op.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions model/description/messaging.json
Original file line number Diff line number Diff line change
@@ -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"],
Comment thread
cleptric marked this conversation as resolved.
"templates": ["{{messaging.destination.name}}"],
"examples": ["order-events"]
}
]
}
30 changes: 30 additions & 0 deletions model/op/messaging.json
Original file line number Diff line number Diff line change
@@ -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."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queue ops lack name model

Medium Severity

This change registers queue.publish, queue.create, queue.receive, queue.process, and queue.settle in the op and description models, but model/name/messaging.json still omits those ops. Span name inference only applies to ops listed in name conventions, so spans using the new queue operations will not get the intended messaging.destination.name / Queue naming described in the PR.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d1c3f36. Configure here.

}
]
}
22 changes: 22 additions & 0 deletions rust/src/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading