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