chalk-remote-call-python 1.8.0__tar.gz → 1.8.1__tar.gz
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.
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/PKG-INFO +1 -1
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/src/metrics.rs +28 -17
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/src/self_consumer.rs +11 -10
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/src/server.rs +1 -1
- chalk_remote_call_python-1.8.1/chalk_remote_call/_version.py +1 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call_python.egg-info/PKG-INFO +1 -1
- chalk_remote_call_python-1.8.0/chalk_remote_call/_version.py +0 -1
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/MANIFEST.in +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/README.md +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/Cargo.lock +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/Cargo.toml +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-proto/Cargo.toml +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.auth.v1.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.common.v1.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.runtime.v1.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.runtime.v1.tonic.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/chalk.utils.v1.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/gen/descriptor.bin +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-proto/src/lib.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/Cargo.toml +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/src/async_service.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/src/coalesce.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/src/lib.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/src/python_bridge.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/chalk-remote-call-server/src/service.rs +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/rust-toolchain.toml +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/__main__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/auth/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/auth/v1/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/auth/v1/permissions_pb2.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/auth/v1/permissions_pb2_grpc.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/common/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/common/v1/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/common/v1/chalk_error_pb2.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/common/v1/chalk_error_pb2_grpc.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/runtime/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/runtime/v1/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/runtime/v1/remote_python_call_pb2.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/runtime/v1/remote_python_call_pb2_grpc.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/utils/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/utils/v1/__init__.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/utils/v1/encoding_pb2.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/utils/v1/encoding_pb2_grpc.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/utils/v1/field_change_pb2.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/utils/v1/field_change_pb2_grpc.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/utils/v1/sensitive_pb2.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/chalk/utils/v1/sensitive_pb2_grpc.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_native.pyi +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/arrow_utils.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/cli.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/handler_loader.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/input_transform.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/server.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/servicer.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/tracing.py +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call_python.egg-info/SOURCES.txt +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call_python.egg-info/dependency_links.txt +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call_python.egg-info/entry_points.txt +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call_python.egg-info/requires.txt +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call_python.egg-info/top_level.txt +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/pyproject.toml +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/setup.cfg +0 -0
- {chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//! Metrics emission for the self-consuming shim, mirroring the catalog
|
|
2
2
|
//! consumer / fnq-server: build a `chalk_metrics` publishing pipeline at startup
|
|
3
|
-
//! and emit
|
|
3
|
+
//! and emit per-call dequeue + processing-latency metrics.
|
|
4
4
|
//!
|
|
5
5
|
//! The External Function "Function Calls Dequeued" chart reads TimescaleDB
|
|
6
6
|
//! `metrics1`, which is fed only by the chalk_metrics PubSub bus (statsd goes to
|
|
@@ -42,9 +42,7 @@ pub async fn init_pipeline() -> Option<Arc<dyn MetricsPipeline>> {
|
|
|
42
42
|
|
|
43
43
|
let publishers: Vec<Arc<dyn BusPublisher>> = build_bus_publisher().await.into_iter().collect();
|
|
44
44
|
if publishers.is_empty() {
|
|
45
|
-
warn!(
|
|
46
|
-
"no metrics bus publisher configured; FunctionCallDequeued will not reach the dashboard"
|
|
47
|
-
);
|
|
45
|
+
warn!("no metrics bus publisher configured; function call metrics will not reach the dashboard");
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
let metrics_pipeline: Arc<dyn MetricsPipeline> =
|
|
@@ -106,24 +104,37 @@ async fn build_bus_publisher() -> Option<Arc<dyn BusPublisher>> {
|
|
|
106
104
|
}
|
|
107
105
|
}
|
|
108
106
|
|
|
109
|
-
/// Emit
|
|
110
|
-
///
|
|
111
|
-
///
|
|
112
|
-
///
|
|
113
|
-
|
|
107
|
+
/// Emit completed-call metrics tagged with function name and success/failure.
|
|
108
|
+
///
|
|
109
|
+
/// `FunctionCallProcessingLatency` is defined as a sketch in metrics.cue, which
|
|
110
|
+
/// is emitted through the histogram API in chalk_metrics. The shim does not
|
|
111
|
+
/// carry the scaling-group revision tag used by the legacy catalog consumer;
|
|
112
|
+
/// the dashboard filters by function name.
|
|
113
|
+
pub fn record_completed_call(
|
|
114
|
+
pipeline: &Arc<dyn MetricsPipeline>,
|
|
115
|
+
function_name: &str,
|
|
116
|
+
success: bool,
|
|
117
|
+
elapsed: Duration,
|
|
118
|
+
) {
|
|
114
119
|
let status = if success {
|
|
115
120
|
MetricStatus::Success
|
|
116
121
|
} else {
|
|
117
122
|
MetricStatus::Failure
|
|
118
123
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
],
|
|
126
|
-
) {
|
|
124
|
+
let tags = vec![
|
|
125
|
+
TagValue::FunctionName(FunctionName(function_name.to_string())),
|
|
126
|
+
TagValue::Status(status.clone()),
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
if let Err(e) = pipeline.count(WellKnownMetricName::FunctionCallDequeued, 1.0, tags.clone()) {
|
|
127
130
|
warn!(error = %e, function = %function_name, "failed to emit FunctionCallDequeued metric");
|
|
128
131
|
}
|
|
132
|
+
|
|
133
|
+
if let Err(e) = pipeline.histogram(
|
|
134
|
+
WellKnownMetricName::FunctionCallProcessingLatency,
|
|
135
|
+
elapsed.as_secs_f64() * 1000.0,
|
|
136
|
+
tags,
|
|
137
|
+
) {
|
|
138
|
+
warn!(error = %e, function = %function_name, "failed to emit FunctionCallProcessingLatency metric");
|
|
139
|
+
}
|
|
129
140
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
use std::panic::AssertUnwindSafe;
|
|
32
32
|
use std::sync::{Arc, Mutex};
|
|
33
|
-
use std::time::Duration;
|
|
33
|
+
use std::time::{Duration, Instant};
|
|
34
34
|
|
|
35
35
|
use chalk_queue::semaphore::renew_many;
|
|
36
36
|
use chalk_queue::stream_writer;
|
|
@@ -404,6 +404,7 @@ async fn coalesced_execute_and_write(
|
|
|
404
404
|
let ipc_bytes = work.call.feather_bytes()?;
|
|
405
405
|
let function_name = work.call.name.clone();
|
|
406
406
|
let metadata = work.metadata.otel_headers.clone();
|
|
407
|
+
let started = Instant::now();
|
|
407
408
|
|
|
408
409
|
let _ = queue.update_status(call_uuid, "running").await;
|
|
409
410
|
info!(call_id = %work.call_id, function = %function_name, "running coalesced queued call");
|
|
@@ -425,11 +426,11 @@ async fn coalesced_execute_and_write(
|
|
|
425
426
|
|
|
426
427
|
let response = rx.recv().await;
|
|
427
428
|
|
|
428
|
-
// Record
|
|
429
|
-
//
|
|
429
|
+
// Record metrics once the batch has produced this caller's result, before
|
|
430
|
+
// stream writes below — parity with the streaming path.
|
|
430
431
|
let success = matches!(response, Some(Ok(_)));
|
|
431
432
|
if let Some(p) = metrics_pipeline {
|
|
432
|
-
crate::metrics::
|
|
433
|
+
crate::metrics::record_completed_call(p, &function_name, success, started.elapsed());
|
|
433
434
|
}
|
|
434
435
|
|
|
435
436
|
match response {
|
|
@@ -487,6 +488,7 @@ async fn execute_and_write(
|
|
|
487
488
|
let ipc_bytes = work.call.feather_bytes()?;
|
|
488
489
|
let function_name = work.call.name.clone();
|
|
489
490
|
let metadata = work.metadata.otel_headers.clone();
|
|
491
|
+
let started = Instant::now();
|
|
490
492
|
|
|
491
493
|
let _ = queue.update_status(call_uuid, "running").await;
|
|
492
494
|
info!(call_id = %work.call_id, function = %function_name, "running queued call");
|
|
@@ -501,7 +503,7 @@ async fn execute_and_write(
|
|
|
501
503
|
let buffer = ChunkBuffer::new().into_shared();
|
|
502
504
|
let handler_fut = handler.call_into_buffer(
|
|
503
505
|
ipc_bytes,
|
|
504
|
-
function_name,
|
|
506
|
+
function_name.clone(),
|
|
505
507
|
metadata,
|
|
506
508
|
PEER.to_string(),
|
|
507
509
|
buffer.clone(),
|
|
@@ -537,12 +539,11 @@ async fn execute_and_write(
|
|
|
537
539
|
}
|
|
538
540
|
};
|
|
539
541
|
|
|
540
|
-
// Emit
|
|
541
|
-
//
|
|
542
|
-
//
|
|
543
|
-
// the catalog consumer's per-call emission.
|
|
542
|
+
// Emit metrics as soon as execution finishes, before result-stream writes,
|
|
543
|
+
// so every executed call is recorded regardless of downstream Redis write
|
|
544
|
+
// failure. Mirrors the catalog consumer's per-call emission.
|
|
544
545
|
if let Some(p) = metrics_pipeline {
|
|
545
|
-
crate::metrics::
|
|
546
|
+
crate::metrics::record_completed_call(p, &function_name, result.is_ok(), started.elapsed());
|
|
546
547
|
}
|
|
547
548
|
|
|
548
549
|
// Flush whatever the handler produced after the loop exits (on the fast path
|
|
@@ -71,7 +71,7 @@ pub async fn run_server(
|
|
|
71
71
|
#[cfg(target_os = "linux")]
|
|
72
72
|
if let Some(cfg) = crate::self_consumer::SelfConsumerConfig::from_env() {
|
|
73
73
|
// Build the chalk_metrics pipeline once (mirrors the fnq-server/cc
|
|
74
|
-
// main init) so the self-consumer can emit
|
|
74
|
+
// main init) so the self-consumer can emit function-call metrics.
|
|
75
75
|
let pipeline = crate::metrics::init_pipeline().await;
|
|
76
76
|
let consumer_handler = python_handler.clone();
|
|
77
77
|
let consumer_coalescing = coalescing_queue.clone();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.8.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.8.0"
|
|
File without changes
|
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/Cargo.lock
RENAMED
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk-remote-call-rs/Cargo.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/__init__.py
RENAMED
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/__main__.py
RENAMED
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_gen/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/_native.pyi
RENAMED
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/arrow_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/server.py
RENAMED
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/servicer.py
RENAMED
|
File without changes
|
{chalk_remote_call_python-1.8.0 → chalk_remote_call_python-1.8.1}/chalk_remote_call/tracing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|