userver: userver/tracing/tags.hpp Source File
Loading...
Searching...
No Matches
tags.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/tracing/tags.hpp
4/// @brief Standard OpenTracing semantic tag name constants
5
6#include <string>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace tracing {
11
12// The following tags are described in greater detail at the following url:
13// https://github.com/opentracing/specification/blob/master/semantic_conventions.md
14//
15// Here we define standard names for tags that can be added to spans by the
16// instrumentation code. The actual tracing systems are not required to
17// retain these as tags in the stored spans if they have other means of
18// representing the same data. For example, the SPAN_KIND='server' can be
19// inferred from a Zipkin span by the presence of ss/sr annotations.
20
21extern const std::string kType;
22extern const std::string kSpanKind;
23extern const std::string kSpanKindServer;
24extern const std::string kSpanKindClient;
25extern const std::string kSpanKindInternal;
26extern const std::string kHttpUrl;
27extern const std::string kUrlFull;
28extern const std::string kHttpUrlTemplate;
29extern const std::string kHttpMetaType;
30extern const std::string kHttpMethod;
31extern const std::string kHttpRequestMethod;
32extern const std::string kHttpRoute;
33extern const std::string kHttpStatusCode;
34extern const std::string kHttpResponseStatusCode;
35extern const std::string kAttempts;
36extern const std::string kMaxAttempts;
37extern const std::string kTimeoutMs;
38extern const std::string kErrorFlag;
39extern const std::string kErrorMessage;
40
41extern const std::string kRpcSystem;
42extern const std::string kRpcService;
43extern const std::string kRpcMethod;
44extern const std::string kGrpcCode;
45
46extern const std::string kDatabaseType;
47extern const std::string kDatabaseMongoType;
48extern const std::string kDatabasePostgresType;
49extern const std::string kDatabaseRedisType;
50
51extern const std::string kDatabaseCollection;
52extern const std::string kDatabaseInstance;
53extern const std::string kDatabaseStatement;
54extern const std::string kDatabaseStatementName;
55extern const std::string kDatabaseStatementDescription;
56
57extern const std::string kPeerAddress;
58extern const std::string kServerAddress;
59
60extern const std::string kUserAgent;
61
62} // namespace tracing
63
64USERVER_NAMESPACE_END