]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_tracer.h
bump version to 18.2.2-pve1
[ceph.git] / 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
3 #pragma once
4 #include "common/tracer.h"
5
6 #include "rgw_common.h"
7
8 namespace tracing {
9 namespace rgw {
10
11 const auto OP = "op";
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 ";
20
21 extern tracing::Tracer tracer;
22
23 } // namespace rgw
24 } // namespace tracing
25
26 static inline void extract_span_context(const rgw::sal::Attrs& attr, jspan_context& span_ctx) {
27 auto trace_iter = attr.find(RGW_ATTR_TRACE);
28 if (trace_iter != attr.end()) {
29 try {
30 auto trace_bl_iter = trace_iter->second.cbegin();
31 tracing::decode(span_ctx, trace_bl_iter);
32 } catch (buffer::error& err) {}
33 }
34 }