prosody 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/ext/prosody/src/bridge/callback.rs +2 -2
- data/ext/prosody/src/client/config.rs +2 -1
- data/ext/prosody/src/handler/mod.rs +12 -6
- data/ext/prosody/src/scheduler/cancellation.rs +2 -2
- data/lib/prosody/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 860e51b041d404b7b12b4cd15fd7bd7b29c96b1c45fe7b302d6300ab534a6995
|
|
4
|
+
data.tar.gz: afa8af17fdb47106755a92b1fb577f207e2c4775dcab673e6e4e0c88c5203c30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a80186ed25d2dfddcc6693ac7e8e4d27dca16d99dfa40462f3188012803f8b07cfbadaece2dc9b65c8a66bb8794111d5720eaf8b280b55ece0b460719b8352e2
|
|
7
|
+
data.tar.gz: 81f46464005e4aaa87e0a3f5712e8a988f850eaa72380864b30e87b334011727c98da847f78abc73d25f83556f51aac1429d456ad30a7aa37dd6eea247b356ec
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.3](https://github.com/prosody-events/prosody-rb/compare/prosody/v0.1.2...prosody/v0.1.3) (2026-04-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **tracing:** set error status on on_message and on_timer spans ([#14](https://github.com/prosody-events/prosody-rb/issues/14)) ([849c021](https://github.com/prosody-events/prosody-rb/commit/849c0212b88d1069fc728ab38e9e05d79408c093))
|
|
9
|
+
|
|
3
10
|
## [0.1.2](https://github.com/prosody-events/prosody-rb/compare/prosody/v0.1.1...prosody/v0.1.2) (2026-04-20)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -26,8 +26,8 @@ impl AsyncCallback {
|
|
|
26
26
|
/// # Arguments
|
|
27
27
|
///
|
|
28
28
|
/// * `queue` - A Ruby Queue object that will receive values from Rust
|
|
29
|
-
/// * `bridge` - The bridge used to defer cleanup of the wrapped queue
|
|
30
|
-
///
|
|
29
|
+
/// * `bridge` - The bridge used to defer cleanup of the wrapped queue value
|
|
30
|
+
/// onto the Ruby thread when the callback is dropped
|
|
31
31
|
pub fn from_queue(queue: Value, bridge: Bridge) -> Self {
|
|
32
32
|
Self {
|
|
33
33
|
queue: ThreadSafeValue::new(queue, bridge),
|
|
@@ -175,7 +175,8 @@ pub struct NativeConfiguration {
|
|
|
175
175
|
/// Cache size for defer middleware.
|
|
176
176
|
defer_cache_size: Option<u32>,
|
|
177
177
|
|
|
178
|
-
/// Maximum number of deferred store entries kept in the write-through cache
|
|
178
|
+
/// Maximum number of deferred store entries kept in the write-through cache
|
|
179
|
+
/// per Cassandra defer store.
|
|
179
180
|
defer_store_cache_size: Option<u32>,
|
|
180
181
|
|
|
181
182
|
/// Timeout for Kafka seek operations (in seconds).
|
|
@@ -21,6 +21,7 @@ use futures::pin_mut;
|
|
|
21
21
|
use magnus::value::ReprValue;
|
|
22
22
|
use magnus::{Error, Ruby, Value};
|
|
23
23
|
use opentelemetry::propagation::TextMapCompositePropagator;
|
|
24
|
+
use opentelemetry::trace::Status;
|
|
24
25
|
use prosody::consumer::event_context::EventContext;
|
|
25
26
|
use prosody::consumer::message::ConsumerMessage;
|
|
26
27
|
use prosody::consumer::middleware::FallibleHandler;
|
|
@@ -33,6 +34,7 @@ use std::sync::Arc;
|
|
|
33
34
|
use thiserror::Error;
|
|
34
35
|
use tokio::select;
|
|
35
36
|
use tracing::{Instrument, info_span};
|
|
37
|
+
use tracing_opentelemetry::OpenTelemetrySpanExt;
|
|
36
38
|
|
|
37
39
|
mod context;
|
|
38
40
|
mod message;
|
|
@@ -179,11 +181,13 @@ impl FallibleHandler for RubyHandler {
|
|
|
179
181
|
// Wait for either task completion or shutdown signal
|
|
180
182
|
select! {
|
|
181
183
|
result = &mut result_future => {
|
|
182
|
-
result?;
|
|
184
|
+
result.inspect_err(|e| cloned_span.set_status(Status::error(e.to_string())))?;
|
|
183
185
|
}
|
|
184
186
|
() = cancel_future => {
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
+
// A cancel() failure is a genuine bridge error; mark the span.
|
|
188
|
+
// The subsequent result_future error is expected cancellation, not a handler bug.
|
|
189
|
+
task_handle.cancellation_token.cancel(&self.bridge).await
|
|
190
|
+
.inspect_err(|e| cloned_span.set_status(Status::error(e.to_string())))?;
|
|
187
191
|
result_future.await?;
|
|
188
192
|
}
|
|
189
193
|
}
|
|
@@ -262,11 +266,13 @@ impl FallibleHandler for RubyHandler {
|
|
|
262
266
|
// Wait for either task completion or shutdown signal
|
|
263
267
|
select! {
|
|
264
268
|
result = &mut result_future => {
|
|
265
|
-
result?;
|
|
269
|
+
result.inspect_err(|e| cloned_span.set_status(Status::error(e.to_string())))?;
|
|
266
270
|
}
|
|
267
271
|
() = cancel_future => {
|
|
268
|
-
//
|
|
269
|
-
|
|
272
|
+
// A cancel() failure is a genuine bridge error; mark the span.
|
|
273
|
+
// The subsequent result_future error is expected cancellation, not a handler bug.
|
|
274
|
+
task_handle.cancellation_token.cancel(&self.bridge).await
|
|
275
|
+
.inspect_err(|e| cloned_span.set_status(Status::error(e.to_string())))?;
|
|
270
276
|
result_future.await?;
|
|
271
277
|
}
|
|
272
278
|
}
|
|
@@ -26,8 +26,8 @@ impl CancellationToken {
|
|
|
26
26
|
/// # Arguments
|
|
27
27
|
///
|
|
28
28
|
/// * `token` - A Ruby value that responds to the `cancel` method
|
|
29
|
-
/// * `bridge` - The bridge used to defer cleanup of the wrapped token
|
|
30
|
-
///
|
|
29
|
+
/// * `bridge` - The bridge used to defer cleanup of the wrapped token value
|
|
30
|
+
/// onto the Ruby thread when the token is dropped
|
|
31
31
|
pub fn new(token: Value, bridge: Bridge) -> Self {
|
|
32
32
|
Self {
|
|
33
33
|
token: ThreadSafeValue::new(token, bridge),
|
data/lib/prosody/version.rb
CHANGED