]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_tracer.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #include "common/tracer.h"
6 #include "rgw_common.h"
12 const auto BUCKET_NAME
= "bucket_name";
13 const auto USER_ID
= "user_id";
14 const auto OBJECT_NAME
= "object_name";
15 const auto RETURN
= "return";
16 const auto UPLOAD_ID
= "upload_id";
17 const auto TYPE
= "type";
18 const auto REQUEST
= "request";
19 const auto MULTIPART
= "multipart_upload ";
22 extern thread_local
tracing::Tracer tracer
;
24 extern tracing::Tracer tracer
;
28 } // namespace tracing
30 static inline void extract_span_context(const rgw::sal::Attrs
& attr
, jspan_context
& span_ctx
) {
31 auto trace_iter
= attr
.find(RGW_ATTR_TRACE
);
32 if (trace_iter
!= attr
.end()) {
34 auto trace_bl_iter
= trace_iter
->second
.cbegin();
35 tracing::decode(span_ctx
, trace_bl_iter
);
36 } catch (buffer::error
& err
) {}