Skip to content

Commit 8eabd8a

Browse files
committed
Migration to weaver - work in progress
1 parent 6445819 commit 8eabd8a

File tree

90 files changed

+9904
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+9904
-116
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
3+
/*
4+
* Copyright The OpenTelemetry Authors
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/*
9+
* DO NOT EDIT, this is an Auto-generated file from:
10+
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
11+
*/
12+
13+
#pragma once
14+
15+
#include "opentelemetry/common/macros.h"
16+
#include "opentelemetry/version.h"
17+
18+
OPENTELEMETRY_BEGIN_NAMESPACE
19+
namespace semconv
20+
{
21+
namespace client
22+
{
23+
24+
/**
25+
* Client address - domain name if available without reverse DNS lookup; otherwise, IP address or
26+
* Unix domain socket name. Note: When observed from the server side, and when communicating through
27+
* an intermediary, @code client.address @endcode SHOULD represent the client address behind any
28+
* intermediaries, for example proxies, if it's available.
29+
*/
30+
static const char *kClientAddress = "client.address";
31+
32+
/**
33+
* Client port number.
34+
* Note: When observed from the server side, and when communicating through an intermediary, @code
35+
* client.port @endcode SHOULD represent the client port behind any intermediaries, for example
36+
* proxies, if it's available.
37+
*/
38+
static const char *kClientPort = "client.port";
39+
40+
} // namespace client
41+
} // namespace semconv
42+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
3+
/*
4+
* Copyright The OpenTelemetry Authors
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/*
9+
* DO NOT EDIT, this is an Auto-generated file from:
10+
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
11+
*/
12+
13+
#pragma once
14+
15+
#include "opentelemetry/common/macros.h"
16+
#include "opentelemetry/version.h"
17+
18+
OPENTELEMETRY_BEGIN_NAMESPACE
19+
namespace semconv
20+
{
21+
namespace error
22+
{
23+
24+
/**
25+
* Describes a class of error the operation ended with.
26+
* Note: The @code error.type @endcode SHOULD be predictable, and SHOULD have low cardinality.
27+
* <p>
28+
* When @code error.type @endcode is set to a type (e.g., an exception type), its
29+
* canonical class name identifying the type within the artifact SHOULD be used.
30+
* <p>
31+
* Instrumentations SHOULD document the list of errors they report.
32+
* <p>
33+
* The cardinality of @code error.type @endcode within one instrumentation library SHOULD be low.
34+
* Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
35+
* should be prepared for @code error.type @endcode to have high cardinality at query time when no
36+
* additional filters are applied.
37+
* <p>
38+
* If the operation has completed successfully, instrumentations SHOULD NOT set @code error.type
39+
* @endcode. <p> If a specific domain defines its own set of error identifiers (such as HTTP or gRPC
40+
* status codes), it's RECOMMENDED to: <p> <ul> <li>Use a domain-specific attribute</li> <li>Set
41+
* @code error.type @endcode to capture all errors, regardless of whether they are defined within
42+
* the domain-specific set or not.</li>
43+
* </ul>
44+
*/
45+
static const char *kErrorType = "error.type";
46+
47+
// DEBUG: {"brief": "Describes a class of error the operation ended with.\n", "examples":
48+
// ["timeout", "java.net.UnknownHostException", "server_certificate_invalid", "500"], "name":
49+
// "error.type", "note": "The `error.type` SHOULD be predictable, and SHOULD have low
50+
// cardinality.\n\nWhen `error.type` is set to a type (e.g., an exception type), its\ncanonical
51+
// class name identifying the type within the artifact SHOULD be used.\n\nInstrumentations SHOULD
52+
// document the list of errors they report.\n\nThe cardinality of `error.type` within one
53+
// instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple
54+
// instrumentation libraries and applications\nshould be prepared for `error.type` to have high
55+
// cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has
56+
// completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain
57+
// defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED
58+
// to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of
59+
// whether they are defined within the domain-specific set or not.\n", "requirement_level":
60+
// "recommended", "root_namespace": "error", "stability": "stable", "type": {"allow_custom_values":
61+
// true, "members": [{"brief": "A fallback error value to be used when the instrumentation doesn't
62+
// define a custom value.\n", "deprecated": none, "id": "other", "note": none, "stability":
63+
// "stable", "value": "_OTHER"}]}}
64+
namespace ErrorTypeValues
65+
{
66+
/**
67+
* A fallback error value to be used when the instrumentation doesn't define a custom value.
68+
*/
69+
// DEBUG: {"brief": "A fallback error value to be used when the instrumentation doesn't define a
70+
// custom value.\n", "deprecated": none, "id": "other", "note": none, "stability": "stable",
71+
// "value": "_OTHER"}
72+
static constexpr const char *kOther = "_OTHER";
73+
} // namespace ErrorTypeValues
74+
75+
} // namespace error
76+
} // namespace semconv
77+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
3+
/*
4+
* Copyright The OpenTelemetry Authors
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/*
9+
* DO NOT EDIT, this is an Auto-generated file from:
10+
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
11+
*/
12+
13+
#pragma once
14+
15+
#include "opentelemetry/common/macros.h"
16+
#include "opentelemetry/version.h"
17+
18+
OPENTELEMETRY_BEGIN_NAMESPACE
19+
namespace semconv
20+
{
21+
namespace exception
22+
{
23+
24+
/**
25+
* SHOULD be set to true if the exception event is recorded at a point where it is known that the
26+
* exception is escaping the scope of the span. Note: An exception is considered to have escaped (or
27+
* left) the scope of a span, if that span is ended while the exception is still logically "in
28+
* flight". This may be actually "in flight" in some languages (e.g. if the exception is passed to a
29+
* Context manager's @code __exit__ @endcode method in Python) but will usually be caught at the
30+
* point of recording the exception in most languages. <p> It is usually not possible to determine
31+
* at the point where an exception is thrown whether it will escape the scope of a span. However, it
32+
* is trivial to know that an exception will escape, if one checks for an active exception just
33+
* before ending the span, as done in the <a
34+
* href="https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception">example
35+
* for recording span exceptions</a>. <p> It follows that an exception may still escape the scope of
36+
* the span even if the @code exception.escaped @endcode attribute was not set or set to false,
37+
* since the event might have been recorded at a time where it was not
38+
* clear whether the exception will escape.
39+
*/
40+
static const char *kExceptionEscaped = "exception.escaped";
41+
42+
/**
43+
* The exception message.
44+
*/
45+
static const char *kExceptionMessage = "exception.message";
46+
47+
/**
48+
* A stacktrace as a string in the natural representation for the language runtime. The
49+
* representation is to be determined and documented by each language SIG.
50+
*/
51+
static const char *kExceptionStacktrace = "exception.stacktrace";
52+
53+
/**
54+
* The type of the exception (its fully-qualified class name, if applicable). The dynamic type of
55+
* the exception should be preferred over the static type in languages that support it.
56+
*/
57+
static const char *kExceptionType = "exception.type";
58+
59+
} // namespace exception
60+
} // namespace semconv
61+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
2+
3+
/*
4+
* Copyright The OpenTelemetry Authors
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/*
9+
* DO NOT EDIT, this is an Auto-generated file from:
10+
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
11+
*/
12+
13+
#pragma once
14+
15+
#include "opentelemetry/common/macros.h"
16+
#include "opentelemetry/version.h"
17+
18+
OPENTELEMETRY_BEGIN_NAMESPACE
19+
namespace semconv
20+
{
21+
namespace http
22+
{
23+
24+
/**
25+
* HTTP request headers, @code <key> @endcode being the normalized HTTP Header name (lowercase), the
26+
* value being the header values. Note: Instrumentations SHOULD require an explicit configuration of
27+
* which headers are to be captured. Including all request headers can be a security risk - explicit
28+
* configuration helps avoid leaking sensitive information. The @code User-Agent @endcode header is
29+
* already captured in the @code user_agent.original @endcode attribute. Users MAY explicitly
30+
* configure instrumentations to capture them even though it is not recommended. The attribute value
31+
* MUST consist of either multiple header values as an array of strings or a single-item array
32+
* containing a possibly comma-concatenated string, depending on the way the HTTP library provides
33+
* access to headers.
34+
*/
35+
static const char *kHttpRequestHeader = "http.request.header";
36+
37+
/**
38+
* HTTP request method.
39+
* Note: HTTP request method value SHOULD be "known" to the instrumentation.
40+
* By default, this convention defines "known" methods as the ones listed in <a
41+
* href="https://www.rfc-editor.org/rfc/rfc9110.html#name-methods">RFC9110</a> and the PATCH method
42+
* defined in <a href="https://www.rfc-editor.org/rfc/rfc5789.html">RFC5789</a>. <p> If the HTTP
43+
* request method is not known to instrumentation, it MUST set the @code http.request.method
44+
* @endcode attribute to @code _OTHER @endcode. <p> If the HTTP instrumentation could end up
45+
* converting valid HTTP request methods to @code _OTHER @endcode, then it MUST provide a way to
46+
* override the list of known HTTP methods. If this override is done via environment variable, then
47+
* the environment variable MUST be named OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a
48+
* comma-separated list of case-sensitive known HTTP methods (this list MUST be a full override of
49+
* the default known method, it is not a list of known methods in addition to the defaults). <p>
50+
* HTTP method names are case-sensitive and @code http.request.method @endcode attribute value MUST
51+
* match a known HTTP method name exactly. Instrumentations for specific web frameworks that
52+
* consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. Tracing
53+
* instrumentations that do so, MUST also set @code http.request.method_original @endcode to the
54+
* original value.
55+
*/
56+
static const char *kHttpRequestMethod = "http.request.method";
57+
58+
/**
59+
* Original HTTP method sent by the client in the request line.
60+
*/
61+
static const char *kHttpRequestMethodOriginal = "http.request.method_original";
62+
63+
/**
64+
* The ordinal number of request resending attempt (for any reason, including redirects).
65+
* Note: The resend count SHOULD be updated each time an HTTP request gets resent by the client,
66+
* regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503
67+
* Server Unavailable, network issues, or any other).
68+
*/
69+
static const char *kHttpRequestResendCount = "http.request.resend_count";
70+
71+
/**
72+
* HTTP response headers, @code <key> @endcode being the normalized HTTP Header name (lowercase),
73+
* the value being the header values. Note: Instrumentations SHOULD require an explicit
74+
* configuration of which headers are to be captured. Including all response headers can be a
75+
* security risk - explicit configuration helps avoid leaking sensitive information. Users MAY
76+
* explicitly configure instrumentations to capture them even though it is not recommended. The
77+
* attribute value MUST consist of either multiple header values as an array of strings or a
78+
* single-item array containing a possibly comma-concatenated string, depending on the way the HTTP
79+
* library provides access to headers.
80+
*/
81+
static const char *kHttpResponseHeader = "http.response.header";
82+
83+
/**
84+
* <a href="https://tools.ietf.org/html/rfc7231#section-6">HTTP response status code</a>.
85+
*/
86+
static const char *kHttpResponseStatusCode = "http.response.status_code";
87+
88+
/**
89+
* The matched route, that is, the path template in the format used by the respective server
90+
* framework. Note: MUST NOT be populated when this is not supported by the HTTP server framework as
91+
* the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD
92+
* include the <a href="/docs/http/http-spans.md#http-server-definitions">application root</a> if
93+
* there is one.
94+
*/
95+
static const char *kHttpRoute = "http.route";
96+
97+
// DEBUG: {"brief": "HTTP request method.", "examples": ["GET", "POST", "HEAD"], "name":
98+
// "http.request.method", "note": "HTTP request method value SHOULD be \"known\" to the
99+
// instrumentation.\nBy default, this convention defines \"known\" methods as the ones listed in
100+
// [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)\nand the PATCH method defined
101+
// in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).\n\nIf the HTTP request method is not
102+
// known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`.\n\nIf the
103+
// HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST
104+
// provide a way to override\nthe list of known HTTP methods. If this override is done via
105+
// environment variable, then the environment variable MUST be
106+
// named\nOTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of
107+
// case-sensitive known HTTP methods\n(this list MUST be a full override of the default known
108+
// method, it is not a list of known methods in addition to the defaults).\n\nHTTP method names are
109+
// case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name
110+
// exactly.\nInstrumentations for specific web frameworks that consider HTTP methods to be case
111+
// insensitive, SHOULD populate a canonical equivalent.\nTracing instrumentations that do so, MUST
112+
// also set `http.request.method_original` to the original value.\n", "requirement_level":
113+
// "recommended", "root_namespace": "http", "stability": "stable", "type": {"allow_custom_values":
114+
// true, "members": [{"brief": "CONNECT method.", "deprecated": none, "id": "connect", "note": none,
115+
// "stability": "stable", "value": "CONNECT"}, {"brief": "DELETE method.", "deprecated": none, "id":
116+
// "delete", "note": none, "stability": "stable", "value": "DELETE"}, {"brief": "GET method.",
117+
// "deprecated": none, "id": "get", "note": none, "stability": "stable", "value": "GET"}, {"brief":
118+
// "HEAD method.", "deprecated": none, "id": "head", "note": none, "stability": "stable", "value":
119+
// "HEAD"}, {"brief": "OPTIONS method.", "deprecated": none, "id": "options", "note": none,
120+
// "stability": "stable", "value": "OPTIONS"}, {"brief": "PATCH method.", "deprecated": none, "id":
121+
// "patch", "note": none, "stability": "stable", "value": "PATCH"}, {"brief": "POST method.",
122+
// "deprecated": none, "id": "post", "note": none, "stability": "stable", "value": "POST"},
123+
// {"brief": "PUT method.", "deprecated": none, "id": "put", "note": none, "stability": "stable",
124+
// "value": "PUT"}, {"brief": "TRACE method.", "deprecated": none, "id": "trace", "note": none,
125+
// "stability": "stable", "value": "TRACE"}, {"brief": "Any HTTP method that the instrumentation has
126+
// no prior knowledge of.", "deprecated": none, "id": "other", "note": none, "stability": "stable",
127+
// "value": "_OTHER"}]}}
128+
namespace HttpRequestMethodValues
129+
{
130+
/**
131+
* CONNECT method.
132+
*/
133+
// DEBUG: {"brief": "CONNECT method.", "deprecated": none, "id": "connect", "note": none,
134+
// "stability": "stable", "value": "CONNECT"}
135+
static constexpr const char *kConnect = "CONNECT";
136+
/**
137+
* DELETE method.
138+
*/
139+
// DEBUG: {"brief": "DELETE method.", "deprecated": none, "id": "delete", "note": none, "stability":
140+
// "stable", "value": "DELETE"}
141+
static constexpr const char *kDelete = "DELETE";
142+
/**
143+
* GET method.
144+
*/
145+
// DEBUG: {"brief": "GET method.", "deprecated": none, "id": "get", "note": none, "stability":
146+
// "stable", "value": "GET"}
147+
static constexpr const char *kGet = "GET";
148+
/**
149+
* HEAD method.
150+
*/
151+
// DEBUG: {"brief": "HEAD method.", "deprecated": none, "id": "head", "note": none, "stability":
152+
// "stable", "value": "HEAD"}
153+
static constexpr const char *kHead = "HEAD";
154+
/**
155+
* OPTIONS method.
156+
*/
157+
// DEBUG: {"brief": "OPTIONS method.", "deprecated": none, "id": "options", "note": none,
158+
// "stability": "stable", "value": "OPTIONS"}
159+
static constexpr const char *kOptions = "OPTIONS";
160+
/**
161+
* PATCH method.
162+
*/
163+
// DEBUG: {"brief": "PATCH method.", "deprecated": none, "id": "patch", "note": none, "stability":
164+
// "stable", "value": "PATCH"}
165+
static constexpr const char *kPatch = "PATCH";
166+
/**
167+
* POST method.
168+
*/
169+
// DEBUG: {"brief": "POST method.", "deprecated": none, "id": "post", "note": none, "stability":
170+
// "stable", "value": "POST"}
171+
static constexpr const char *kPost = "POST";
172+
/**
173+
* PUT method.
174+
*/
175+
// DEBUG: {"brief": "PUT method.", "deprecated": none, "id": "put", "note": none, "stability":
176+
// "stable", "value": "PUT"}
177+
static constexpr const char *kPut = "PUT";
178+
/**
179+
* TRACE method.
180+
*/
181+
// DEBUG: {"brief": "TRACE method.", "deprecated": none, "id": "trace", "note": none, "stability":
182+
// "stable", "value": "TRACE"}
183+
static constexpr const char *kTrace = "TRACE";
184+
/**
185+
* Any HTTP method that the instrumentation has no prior knowledge of.
186+
*/
187+
// DEBUG: {"brief": "Any HTTP method that the instrumentation has no prior knowledge of.",
188+
// "deprecated": none, "id": "other", "note": none, "stability": "stable", "value": "_OTHER"}
189+
static constexpr const char *kOther = "_OTHER";
190+
} // namespace HttpRequestMethodValues
191+
192+
} // namespace http
193+
} // namespace semconv
194+
OPENTELEMETRY_END_NAMESPACE

0 commit comments

Comments
 (0)