|
17 | 17 | use std::fmt::{Display, Formatter}; |
18 | 18 | use std::sync::{LazyLock, OnceLock}; |
19 | 19 |
|
20 | | -use opentelemetry::{InstrumentationScope, KeyValue, Value, global, metrics}; |
21 | | -use tokio::time::Instant; |
22 | 20 | use crate::action_messages::ActionStage; |
23 | | -use crate::metrics_utils::Counter; |
| 21 | +use opentelemetry::{global, metrics, InstrumentationScope, KeyValue, Value}; |
24 | 22 |
|
25 | 23 | /// Callback type for observable gauges that report queued action counts. |
26 | 24 | /// The callback receives an `Observer` that should be used to record values with attributes. |
@@ -67,9 +65,7 @@ pub const EXECUTION_STAGE: &str = "execution_stage"; |
67 | 65 | pub const EXECUTION_RESULT: &str = "execution_result"; |
68 | 66 | pub const EXECUTION_INSTANCE: &str = "execution_instance"; |
69 | 67 | pub const EXECUTION_PRIORITY: &str = "execution_priority"; |
70 | | -pub const EXECUTION_WORKER_ID: &str = "execution_worker_id"; |
71 | 68 | pub const EXECUTION_EXIT_CODE: &str = "execution_exit_code"; |
72 | | -pub const EXECUTION_ACTION_DIGEST: &str = "execution_action_digest"; |
73 | 69 |
|
74 | 70 | /// Cache operation types for metrics classification. |
75 | 71 | #[derive(Debug, Clone, Copy)] |
@@ -690,15 +686,10 @@ pub struct ExecutionMetrics { |
690 | 686 | #[must_use] |
691 | 687 | pub fn make_execution_attributes( |
692 | 688 | instance_name: &str, |
693 | | - worker_id: Option<&str>, |
694 | 689 | priority: Option<i32>, |
695 | 690 | ) -> Vec<KeyValue> { |
696 | 691 | let mut attrs = vec![KeyValue::new(EXECUTION_INSTANCE, instance_name.to_string())]; |
697 | 692 |
|
698 | | - if let Some(worker_id) = worker_id { |
699 | | - attrs.push(KeyValue::new(EXECUTION_WORKER_ID, worker_id.to_string())); |
700 | | - } |
701 | | - |
702 | 693 | if let Some(priority) = priority { |
703 | 694 | attrs.push(KeyValue::new(EXECUTION_PRIORITY, i64::from(priority))); |
704 | 695 | } |
|
0 commit comments