@@ -263,37 +263,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
263263} // namespace google
264264
265265#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_OPENTELEMETRY_H
266-
267- bool TracingEnabled (Options const & options);
268-
269- // / Wraps the sleeper in a span, if tracing is enabled.
270- template <typename Rep, typename Period>
271- std::function<void (std::chrono::duration<Rep, Period>)> MakeTracedSleeper(
272- Options const & options,
273- std::function<void (std::chrono::duration<Rep, Period>)> sleeper,
274- std::string const & name) {
275- if (TracingEnabled (options)) {
276- return [name, sleeper = std::move (sleeper)](
277- std::chrono::duration<Rep, Period> d) {
278- // A sleep of 0 is not an interesting event worth tracing.
279- if (d == std::chrono::duration<Rep, Period>::zero ()) return sleeper (d);
280- auto span = MakeSpan (name);
281- sleeper (d);
282- span->End ();
283- };
284- }
285- (void )options;
286- (void )name;
287- return sleeper;
288- }
289-
290- // / Adds an attribute to the active span, if tracing is enabled.
291- void AddSpanAttribute (Options const & options, std::string const & key,
292- std::string const & value);
293-
294- } // namespace internal
295- GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
296- } // namespace cloud
297- } // namespace google
298-
299- #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_OPENTELEMETRY_H
0 commit comments