We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3c4a5b commit c6c4d38Copy full SHA for c6c4d38
1 file changed
src/lro/src/internal/tracing.rs
@@ -105,11 +105,18 @@ macro_rules! record_polling_attributes {
105
($span:expr) => {
106
#[cfg(google_cloud_unstable_tracing)]
107
{
108
- if let Ok(attempt) = $crate::POLL_ATTEMPT_COUNT.try_with(|c| *c) {
109
- $span.record("gcp.longrunning.poll_attempt_count", attempt);
110
- $span.record("gcp.longrunning.done", false);
+ if let Some(recorder) = $crate::LroRecorder::current() {
+ if let Some(attempt) = recorder.attempt_count() {
+ let span = &$span;
111
+ span.record("gcp.longrunning.poll_attempt_count", attempt);
112
+ span.record("gcp.longrunning.done", false);
113
+ }
114
}
115
116
+ #[cfg(not(google_cloud_unstable_tracing))]
117
+ {
118
+ let _ = &$span;
119
120
};
121
122
0 commit comments