UNPKG

4.78 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3/** SPAN_KIND hints at relationship between spans, e.g. client/server */
4exports.SPAN_KIND = 'span.kind';
5/** Marks a span representing the client-side of an RPC or other remote call */
6exports.SPAN_KIND_RPC_CLIENT = 'client';
7/** Marks a span representing the server-side of an RPC or other remote call */
8exports.SPAN_KIND_RPC_SERVER = 'server';
9/** Marks a span representing the producing-side within a messaging system or other remote call */
10exports.SPAN_KIND_MESSAGING_PRODUCER = 'producer';
11/** Marks a span representing the consuming-side within a messaging system or other remote call */
12exports.SPAN_KIND_MESSAGING_CONSUMER = 'consumer';
13/**
14 * ERROR (boolean) true if and only if the application considers the operation
15 * represented by the Span to have failed
16 */
17exports.ERROR = 'error';
18/**
19 * COMPONENT (string) ia s low-cardinality identifier of the module, library,
20 * or package that is generating a span.
21 */
22exports.COMPONENT = 'component';
23/**
24 * SAMPLING_PRIORITY (number) determines the priority of sampling this Span.
25 * If greater than 0, a hint to the Tracer to do its best to capture the trace.
26 * If 0, a hint to the trace to not-capture the trace. If absent, the Tracer
27 * should use its default sampling mechanism.
28 */
29exports.SAMPLING_PRIORITY = 'sampling.priority';
30// ---------------------------------------------------------------------------
31// PEER_* tags can be emitted by either client-side of server-side to describe
32// the other side/service in a peer-to-peer communications, like an RPC call.
33// ---------------------------------------------------------------------------
34/**
35 * PEER_SERVICE (string) Remote service name (for some unspecified
36 * definition of "service"). E.g., "elasticsearch", "a_custom_microservice", "memcache"
37 */
38exports.PEER_SERVICE = 'peer.service';
39/** PEER_HOSTNAME (string) Remote hostname. E.g., "opentracing.io", "internal.dns.name" */
40exports.PEER_HOSTNAME = 'peer.hostname';
41/**
42 * PEER_ADDRESS (string) Remote "address", suitable for use in a
43 * networking client library. This may be a "ip:port", a bare
44 * "hostname", a FQDN, or even a JDBC substring like "mysql://prod-db:3306"
45 */
46exports.PEER_ADDRESS = 'peer.address';
47/**
48 * PEER_HOST_IPV4 (number) Remote IPv4 address as a .-separated tuple.
49 * E.g., "127.0.0.1"
50 */
51exports.PEER_HOST_IPV4 = 'peer.ipv4';
52// PEER_HOST_IPV6 (string) Remote IPv6 address as a string of
53// colon-separated 4-char hex tuples. E.g., "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
54exports.PEER_HOST_IPV6 = 'peer.ipv6';
55// PEER_PORT (number) Remote port. E.g., 80
56exports.PEER_PORT = 'peer.port';
57// ---------------------------------------------------------------------------
58// HTTP tags
59// ---------------------------------------------------------------------------
60/**
61 * HTTP_URL (string) URL of the request being handled in this segment of the
62 * trace, in standard URI format. E.g., "https://domain.net/path/to?resource=here"
63 */
64exports.HTTP_URL = 'http.url';
65/**
66 * HTTP_METHOD (string) HTTP method of the request for the associated Span. E.g.,
67 * "GET", "POST"
68 */
69exports.HTTP_METHOD = 'http.method';
70/**
71 * HTTP_STATUS_CODE (number) HTTP response status code for the associated Span.
72 * E.g., 200, 503, 404
73 */
74exports.HTTP_STATUS_CODE = 'http.status_code';
75// -------------------------------------------------------------------------
76// Messaging tags
77// -------------------------------------------------------------------------
78/**
79 * MESSAGE_BUS_DESTINATION (string) An address at which messages can be exchanged.
80 * E.g. A Kafka record has an associated "topic name" that can be extracted
81 * by the instrumented producer or consumer and stored using this tag.
82 */
83exports.MESSAGE_BUS_DESTINATION = 'message_bus.destination';
84// --------------------------------------------------------------------------
85// Database tags
86// --------------------------------------------------------------------------
87/**
88 * DB_INSTANCE (string) Database instance name. E.g., In java, if the
89 * jdbc.url="jdbc:mysql://127.0.0.1:3306/customers", the instance name is "customers".
90 */
91exports.DB_INSTANCE = 'db.instance';
92/**
93 * DB_STATEMENT (string) A database statement for the given database type.
94 * E.g., for db.type="SQL", "SELECT * FROM wuser_table";
95 * for db.type="redis", "SET mykey 'WuValue'".
96 */
97exports.DB_STATEMENT = 'db.statement';
98/**
99 * DB_TYPE (string) Database type. For any SQL database, "sql". For others,
100 * the lower-case database category, e.g. "cassandra", "hbase", or "redis".
101 */
102exports.DB_TYPE = 'db.type';
103/**
104 * DB_USER (string) Username for accessing database. E.g., "readonly_user"
105 * or "reporting_user"
106 */
107exports.DB_USER = 'db.user';
108//# sourceMappingURL=tags.js.map
\No newline at end of file