We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
thread_id
1 parent ffeeba8 commit 87a33e6Copy full SHA for 87a33e6
profiling/src/profiling/mod.rs
@@ -1011,7 +1011,7 @@ impl Profiler {
1011
fn prepare_sample_message(
1012
frames: Vec<ZendFrame>,
1013
samples: SampleValues,
1014
- #[cfg(php_has_fibers)] mut labels: Vec<Label>,
+ #[cfg(any(php_has_fibers, php_zts))] mut labels: Vec<Label>,
1015
#[cfg(not(php_has_fibers))] labels: Vec<Label>,
1016
locals: &RequestLocals,
1017
timestamp: i64,
@@ -1081,6 +1081,12 @@ impl Profiler {
1081
}
1082
1083
1084
+ #[cfg(php_zts)]
1085
+ labels.push(Label {
1086
+ key: "thread id",
1087
+ value: LabelValue::Num(unsafe { libc::pthread_self() as i64 }, "id".into()),
1088
+ });
1089
+
1090
let tags = TAGS.with(|cell| Arc::clone(&cell.borrow()));
1091
1092
SampleMessage {
0 commit comments