@opentelemetry/instrumentation-http 0.200.0 → 0.201.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -71
- package/build/src/http.js +9 -21
- package/build/src/http.js.map +1 -1
- package/build/src/internal-types.d.ts +6 -12
- package/build/src/internal-types.js +9 -0
- package/build/src/internal-types.js.map +1 -1
- package/build/src/semconv.d.ts +239 -0
- package/build/src/semconv.js +262 -0
- package/build/src/semconv.js.map +1 -0
- package/build/src/types.d.ts +5 -0
- package/build/src/types.js.map +1 -1
- package/build/src/utils.d.ts +9 -2
- package/build/src/utils.js +100 -57
- package/build/src/utils.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/build/src/version.js.map +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the category of synthetic traffic, such as tests or bots.
|
|
3
|
+
*
|
|
4
|
+
* @note This attribute **MAY** be derived from the contents of the `user_agent.original` attribute. Components that populate the attribute are responsible for determining what they consider to be synthetic bot or test traffic. This attribute can either be set for self-identification purposes, or on telemetry detected to be generated as a result of a synthetic request. This attribute is useful for distinguishing between genuine client traffic and synthetic traffic generated by bots or tests.
|
|
5
|
+
*
|
|
6
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ATTR_USER_AGENT_SYNTHETIC_TYPE: "user_agent.synthetic.type";
|
|
9
|
+
/**
|
|
10
|
+
* Enum value "bot" for attribute {@link ATTR_USER_AGENT_SYNTHETIC_TYPE}.
|
|
11
|
+
*/
|
|
12
|
+
export declare const USER_AGENT_SYNTHETIC_TYPE_VALUE_BOT: "bot";
|
|
13
|
+
/**
|
|
14
|
+
* Enum value "test" for attribute {@link ATTR_USER_AGENT_SYNTHETIC_TYPE}.
|
|
15
|
+
*/
|
|
16
|
+
export declare const USER_AGENT_SYNTHETIC_TYPE_VALUE_TEST: "test";
|
|
17
|
+
/**
|
|
18
|
+
* Deprecated, use `client.address` instead.
|
|
19
|
+
*
|
|
20
|
+
* @example "83.164.160.102"
|
|
21
|
+
*
|
|
22
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
23
|
+
*
|
|
24
|
+
* @deprecated Replaced by `client.address`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ATTR_HTTP_CLIENT_IP: "http.client_ip";
|
|
27
|
+
/**
|
|
28
|
+
* Deprecated, use `network.protocol.name` instead.
|
|
29
|
+
*
|
|
30
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
31
|
+
*
|
|
32
|
+
* @deprecated Replaced by `network.protocol.name`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const ATTR_HTTP_FLAVOR: "http.flavor";
|
|
35
|
+
/**
|
|
36
|
+
* Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage.
|
|
37
|
+
*
|
|
38
|
+
* @example www.example.org
|
|
39
|
+
*
|
|
40
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
41
|
+
*
|
|
42
|
+
* @deprecated Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ATTR_HTTP_HOST: "http.host";
|
|
45
|
+
/**
|
|
46
|
+
* Deprecated, use `http.request.method` instead.
|
|
47
|
+
*
|
|
48
|
+
* @example GET
|
|
49
|
+
* @example POST
|
|
50
|
+
* @example HEAD
|
|
51
|
+
*
|
|
52
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated Replaced by `http.request.method`.
|
|
55
|
+
*/
|
|
56
|
+
export declare const ATTR_HTTP_METHOD: "http.method";
|
|
57
|
+
/**
|
|
58
|
+
* Deprecated, use `http.request.header.<key>` instead.
|
|
59
|
+
*
|
|
60
|
+
* @example 3495
|
|
61
|
+
*
|
|
62
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
63
|
+
*
|
|
64
|
+
* @deprecated Replaced by `http.request.header.<key>`.
|
|
65
|
+
*/
|
|
66
|
+
export declare const ATTR_HTTP_REQUEST_CONTENT_LENGTH: "http.request_content_length";
|
|
67
|
+
/**
|
|
68
|
+
* Deprecated, use `http.request.body.size` instead.
|
|
69
|
+
*
|
|
70
|
+
* @example 5493
|
|
71
|
+
*
|
|
72
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
73
|
+
*
|
|
74
|
+
* @deprecated Replaced by `http.request.body.size`.
|
|
75
|
+
*/
|
|
76
|
+
export declare const ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: "http.request_content_length_uncompressed";
|
|
77
|
+
/**
|
|
78
|
+
* Deprecated, use `http.response.header.<key>` instead.
|
|
79
|
+
*
|
|
80
|
+
* @example 3495
|
|
81
|
+
*
|
|
82
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
83
|
+
*
|
|
84
|
+
* @deprecated Replaced by `http.response.header.<key>`.
|
|
85
|
+
*/
|
|
86
|
+
export declare const ATTR_HTTP_RESPONSE_CONTENT_LENGTH: "http.response_content_length";
|
|
87
|
+
/**
|
|
88
|
+
* Deprecated, use `http.response.body.size` instead.
|
|
89
|
+
*
|
|
90
|
+
* @example 5493
|
|
91
|
+
*
|
|
92
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
93
|
+
*
|
|
94
|
+
* @deprecated Replace by `http.response.body.size`.
|
|
95
|
+
*/
|
|
96
|
+
export declare const ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: "http.response_content_length_uncompressed";
|
|
97
|
+
/**
|
|
98
|
+
* Deprecated, use `url.scheme` instead.
|
|
99
|
+
*
|
|
100
|
+
* @example http
|
|
101
|
+
* @example https
|
|
102
|
+
*
|
|
103
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
104
|
+
*
|
|
105
|
+
* @deprecated Replaced by `url.scheme` instead.
|
|
106
|
+
*/
|
|
107
|
+
export declare const ATTR_HTTP_SCHEME: "http.scheme";
|
|
108
|
+
/**
|
|
109
|
+
* Deprecated, use `server.address` instead.
|
|
110
|
+
*
|
|
111
|
+
* @example example.com
|
|
112
|
+
*
|
|
113
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
114
|
+
*
|
|
115
|
+
* @deprecated Replaced by `server.address`.
|
|
116
|
+
*/
|
|
117
|
+
export declare const ATTR_HTTP_SERVER_NAME: "http.server_name";
|
|
118
|
+
/**
|
|
119
|
+
* Deprecated, use `http.response.status_code` instead.
|
|
120
|
+
*
|
|
121
|
+
* @example 200
|
|
122
|
+
*
|
|
123
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
124
|
+
*
|
|
125
|
+
* @deprecated Replaced by `http.response.status_code`.
|
|
126
|
+
*/
|
|
127
|
+
export declare const ATTR_HTTP_STATUS_CODE: "http.status_code";
|
|
128
|
+
/**
|
|
129
|
+
* Deprecated, use `url.path` and `url.query` instead.
|
|
130
|
+
*
|
|
131
|
+
* @example /search?q=OpenTelemetry#SemConv
|
|
132
|
+
*
|
|
133
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
134
|
+
*
|
|
135
|
+
* @deprecated Split to `url.path` and `url.query.
|
|
136
|
+
*/
|
|
137
|
+
export declare const ATTR_HTTP_TARGET: "http.target";
|
|
138
|
+
/**
|
|
139
|
+
* Deprecated, use `url.full` instead.
|
|
140
|
+
*
|
|
141
|
+
* @example https://www.foo.bar/search?q=OpenTelemetry#SemConv
|
|
142
|
+
*
|
|
143
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
144
|
+
*
|
|
145
|
+
* @deprecated Replaced by `url.full`.
|
|
146
|
+
*/
|
|
147
|
+
export declare const ATTR_HTTP_URL: "http.url";
|
|
148
|
+
/**
|
|
149
|
+
* Deprecated, use `user_agent.original` instead.
|
|
150
|
+
*
|
|
151
|
+
* @example CERN-LineMode/2.15 libwww/2.17b3
|
|
152
|
+
* @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1
|
|
153
|
+
*
|
|
154
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
155
|
+
*
|
|
156
|
+
* @deprecated Replaced by `user_agent.original`.
|
|
157
|
+
*/
|
|
158
|
+
export declare const ATTR_HTTP_USER_AGENT: "http.user_agent";
|
|
159
|
+
/**
|
|
160
|
+
* Deprecated, use `network.local.address`.
|
|
161
|
+
*
|
|
162
|
+
* @example "192.168.0.1"
|
|
163
|
+
*
|
|
164
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
165
|
+
*
|
|
166
|
+
* @deprecated Replaced by `network.local.address`.
|
|
167
|
+
*/
|
|
168
|
+
export declare const ATTR_NET_HOST_IP: "net.host.ip";
|
|
169
|
+
/**
|
|
170
|
+
* Deprecated, use `server.address`.
|
|
171
|
+
*
|
|
172
|
+
* @example example.com
|
|
173
|
+
*
|
|
174
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
175
|
+
*
|
|
176
|
+
* @deprecated Replaced by `server.address`.
|
|
177
|
+
*/
|
|
178
|
+
export declare const ATTR_NET_HOST_NAME: "net.host.name";
|
|
179
|
+
/**
|
|
180
|
+
* Deprecated, use `server.port`.
|
|
181
|
+
*
|
|
182
|
+
* @example 8080
|
|
183
|
+
*
|
|
184
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
185
|
+
*
|
|
186
|
+
* @deprecated Replaced by `server.port`.
|
|
187
|
+
*/
|
|
188
|
+
export declare const ATTR_NET_HOST_PORT: "net.host.port";
|
|
189
|
+
/**
|
|
190
|
+
* Deprecated, use `network.peer.address`.
|
|
191
|
+
*
|
|
192
|
+
* @example "127.0.0.1"
|
|
193
|
+
*
|
|
194
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
195
|
+
*
|
|
196
|
+
* @deprecated Replaced by `network.peer.address`.
|
|
197
|
+
*/
|
|
198
|
+
export declare const ATTR_NET_PEER_IP: "net.peer.ip";
|
|
199
|
+
/**
|
|
200
|
+
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
|
|
201
|
+
*
|
|
202
|
+
* @example example.com
|
|
203
|
+
*
|
|
204
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
205
|
+
*
|
|
206
|
+
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
|
|
207
|
+
*/
|
|
208
|
+
export declare const ATTR_NET_PEER_NAME: "net.peer.name";
|
|
209
|
+
/**
|
|
210
|
+
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
|
|
211
|
+
*
|
|
212
|
+
* @example 8080
|
|
213
|
+
*
|
|
214
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
215
|
+
*
|
|
216
|
+
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
|
|
217
|
+
*/
|
|
218
|
+
export declare const ATTR_NET_PEER_PORT: "net.peer.port";
|
|
219
|
+
/**
|
|
220
|
+
* Deprecated, use `network.transport`.
|
|
221
|
+
*
|
|
222
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
223
|
+
*
|
|
224
|
+
* @deprecated Replaced by `network.transport`.
|
|
225
|
+
*/
|
|
226
|
+
export declare const ATTR_NET_TRANSPORT: "net.transport";
|
|
227
|
+
/**
|
|
228
|
+
* Enum value "ip_tcp" for attribute {@link ATTR_NET_TRANSPORT}.
|
|
229
|
+
*/
|
|
230
|
+
export declare const NET_TRANSPORT_VALUE_IP_TCP: "ip_tcp";
|
|
231
|
+
/**
|
|
232
|
+
* Enum value "ip_udp" for attribute {@link ATTR_NET_TRANSPORT}.
|
|
233
|
+
*/
|
|
234
|
+
export declare const NET_TRANSPORT_VALUE_IP_UDP: "ip_udp";
|
|
235
|
+
/**
|
|
236
|
+
* Enum value "1.1" for attribute {@link ATTR_HTTP_FLAVOR}.
|
|
237
|
+
*/
|
|
238
|
+
export declare const HTTP_FLAVOR_VALUE_HTTP_1_1: "1.1";
|
|
239
|
+
//# sourceMappingURL=semconv.d.ts.map
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.HTTP_FLAVOR_VALUE_HTTP_1_1 = exports.NET_TRANSPORT_VALUE_IP_UDP = exports.NET_TRANSPORT_VALUE_IP_TCP = exports.ATTR_NET_TRANSPORT = exports.ATTR_NET_PEER_PORT = exports.ATTR_NET_PEER_NAME = exports.ATTR_NET_PEER_IP = exports.ATTR_NET_HOST_PORT = exports.ATTR_NET_HOST_NAME = exports.ATTR_NET_HOST_IP = exports.ATTR_HTTP_USER_AGENT = exports.ATTR_HTTP_URL = exports.ATTR_HTTP_TARGET = exports.ATTR_HTTP_STATUS_CODE = exports.ATTR_HTTP_SERVER_NAME = exports.ATTR_HTTP_SCHEME = exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH = exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH = exports.ATTR_HTTP_METHOD = exports.ATTR_HTTP_HOST = exports.ATTR_HTTP_FLAVOR = exports.ATTR_HTTP_CLIENT_IP = exports.USER_AGENT_SYNTHETIC_TYPE_VALUE_TEST = exports.USER_AGENT_SYNTHETIC_TYPE_VALUE_BOT = exports.ATTR_USER_AGENT_SYNTHETIC_TYPE = void 0;
|
|
19
|
+
/*
|
|
20
|
+
* This file contains a copy of unstable semantic convention definitions
|
|
21
|
+
* used by this package.
|
|
22
|
+
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the category of synthetic traffic, such as tests or bots.
|
|
26
|
+
*
|
|
27
|
+
* @note This attribute **MAY** be derived from the contents of the `user_agent.original` attribute. Components that populate the attribute are responsible for determining what they consider to be synthetic bot or test traffic. This attribute can either be set for self-identification purposes, or on telemetry detected to be generated as a result of a synthetic request. This attribute is useful for distinguishing between genuine client traffic and synthetic traffic generated by bots or tests.
|
|
28
|
+
*
|
|
29
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
30
|
+
*/
|
|
31
|
+
exports.ATTR_USER_AGENT_SYNTHETIC_TYPE = 'user_agent.synthetic.type';
|
|
32
|
+
/**
|
|
33
|
+
* Enum value "bot" for attribute {@link ATTR_USER_AGENT_SYNTHETIC_TYPE}.
|
|
34
|
+
*/
|
|
35
|
+
exports.USER_AGENT_SYNTHETIC_TYPE_VALUE_BOT = 'bot';
|
|
36
|
+
/**
|
|
37
|
+
* Enum value "test" for attribute {@link ATTR_USER_AGENT_SYNTHETIC_TYPE}.
|
|
38
|
+
*/
|
|
39
|
+
exports.USER_AGENT_SYNTHETIC_TYPE_VALUE_TEST = 'test';
|
|
40
|
+
/**
|
|
41
|
+
* Deprecated, use `client.address` instead.
|
|
42
|
+
*
|
|
43
|
+
* @example "83.164.160.102"
|
|
44
|
+
*
|
|
45
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
46
|
+
*
|
|
47
|
+
* @deprecated Replaced by `client.address`.
|
|
48
|
+
*/
|
|
49
|
+
exports.ATTR_HTTP_CLIENT_IP = 'http.client_ip';
|
|
50
|
+
/**
|
|
51
|
+
* Deprecated, use `network.protocol.name` instead.
|
|
52
|
+
*
|
|
53
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
54
|
+
*
|
|
55
|
+
* @deprecated Replaced by `network.protocol.name`.
|
|
56
|
+
*/
|
|
57
|
+
exports.ATTR_HTTP_FLAVOR = 'http.flavor';
|
|
58
|
+
/**
|
|
59
|
+
* Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage.
|
|
60
|
+
*
|
|
61
|
+
* @example www.example.org
|
|
62
|
+
*
|
|
63
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
64
|
+
*
|
|
65
|
+
* @deprecated Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage.
|
|
66
|
+
*/
|
|
67
|
+
exports.ATTR_HTTP_HOST = 'http.host';
|
|
68
|
+
/**
|
|
69
|
+
* Deprecated, use `http.request.method` instead.
|
|
70
|
+
*
|
|
71
|
+
* @example GET
|
|
72
|
+
* @example POST
|
|
73
|
+
* @example HEAD
|
|
74
|
+
*
|
|
75
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
76
|
+
*
|
|
77
|
+
* @deprecated Replaced by `http.request.method`.
|
|
78
|
+
*/
|
|
79
|
+
exports.ATTR_HTTP_METHOD = 'http.method';
|
|
80
|
+
/**
|
|
81
|
+
* Deprecated, use `http.request.header.<key>` instead.
|
|
82
|
+
*
|
|
83
|
+
* @example 3495
|
|
84
|
+
*
|
|
85
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
86
|
+
*
|
|
87
|
+
* @deprecated Replaced by `http.request.header.<key>`.
|
|
88
|
+
*/
|
|
89
|
+
exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length';
|
|
90
|
+
/**
|
|
91
|
+
* Deprecated, use `http.request.body.size` instead.
|
|
92
|
+
*
|
|
93
|
+
* @example 5493
|
|
94
|
+
*
|
|
95
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
96
|
+
*
|
|
97
|
+
* @deprecated Replaced by `http.request.body.size`.
|
|
98
|
+
*/
|
|
99
|
+
exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';
|
|
100
|
+
/**
|
|
101
|
+
* Deprecated, use `http.response.header.<key>` instead.
|
|
102
|
+
*
|
|
103
|
+
* @example 3495
|
|
104
|
+
*
|
|
105
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
106
|
+
*
|
|
107
|
+
* @deprecated Replaced by `http.response.header.<key>`.
|
|
108
|
+
*/
|
|
109
|
+
exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';
|
|
110
|
+
/**
|
|
111
|
+
* Deprecated, use `http.response.body.size` instead.
|
|
112
|
+
*
|
|
113
|
+
* @example 5493
|
|
114
|
+
*
|
|
115
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
116
|
+
*
|
|
117
|
+
* @deprecated Replace by `http.response.body.size`.
|
|
118
|
+
*/
|
|
119
|
+
exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed';
|
|
120
|
+
/**
|
|
121
|
+
* Deprecated, use `url.scheme` instead.
|
|
122
|
+
*
|
|
123
|
+
* @example http
|
|
124
|
+
* @example https
|
|
125
|
+
*
|
|
126
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
127
|
+
*
|
|
128
|
+
* @deprecated Replaced by `url.scheme` instead.
|
|
129
|
+
*/
|
|
130
|
+
exports.ATTR_HTTP_SCHEME = 'http.scheme';
|
|
131
|
+
/**
|
|
132
|
+
* Deprecated, use `server.address` instead.
|
|
133
|
+
*
|
|
134
|
+
* @example example.com
|
|
135
|
+
*
|
|
136
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
137
|
+
*
|
|
138
|
+
* @deprecated Replaced by `server.address`.
|
|
139
|
+
*/
|
|
140
|
+
exports.ATTR_HTTP_SERVER_NAME = 'http.server_name';
|
|
141
|
+
/**
|
|
142
|
+
* Deprecated, use `http.response.status_code` instead.
|
|
143
|
+
*
|
|
144
|
+
* @example 200
|
|
145
|
+
*
|
|
146
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
147
|
+
*
|
|
148
|
+
* @deprecated Replaced by `http.response.status_code`.
|
|
149
|
+
*/
|
|
150
|
+
exports.ATTR_HTTP_STATUS_CODE = 'http.status_code';
|
|
151
|
+
/**
|
|
152
|
+
* Deprecated, use `url.path` and `url.query` instead.
|
|
153
|
+
*
|
|
154
|
+
* @example /search?q=OpenTelemetry#SemConv
|
|
155
|
+
*
|
|
156
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
157
|
+
*
|
|
158
|
+
* @deprecated Split to `url.path` and `url.query.
|
|
159
|
+
*/
|
|
160
|
+
exports.ATTR_HTTP_TARGET = 'http.target';
|
|
161
|
+
/**
|
|
162
|
+
* Deprecated, use `url.full` instead.
|
|
163
|
+
*
|
|
164
|
+
* @example https://www.foo.bar/search?q=OpenTelemetry#SemConv
|
|
165
|
+
*
|
|
166
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
167
|
+
*
|
|
168
|
+
* @deprecated Replaced by `url.full`.
|
|
169
|
+
*/
|
|
170
|
+
exports.ATTR_HTTP_URL = 'http.url';
|
|
171
|
+
/**
|
|
172
|
+
* Deprecated, use `user_agent.original` instead.
|
|
173
|
+
*
|
|
174
|
+
* @example CERN-LineMode/2.15 libwww/2.17b3
|
|
175
|
+
* @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1
|
|
176
|
+
*
|
|
177
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
178
|
+
*
|
|
179
|
+
* @deprecated Replaced by `user_agent.original`.
|
|
180
|
+
*/
|
|
181
|
+
exports.ATTR_HTTP_USER_AGENT = 'http.user_agent';
|
|
182
|
+
/**
|
|
183
|
+
* Deprecated, use `network.local.address`.
|
|
184
|
+
*
|
|
185
|
+
* @example "192.168.0.1"
|
|
186
|
+
*
|
|
187
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
188
|
+
*
|
|
189
|
+
* @deprecated Replaced by `network.local.address`.
|
|
190
|
+
*/
|
|
191
|
+
exports.ATTR_NET_HOST_IP = 'net.host.ip';
|
|
192
|
+
/**
|
|
193
|
+
* Deprecated, use `server.address`.
|
|
194
|
+
*
|
|
195
|
+
* @example example.com
|
|
196
|
+
*
|
|
197
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
198
|
+
*
|
|
199
|
+
* @deprecated Replaced by `server.address`.
|
|
200
|
+
*/
|
|
201
|
+
exports.ATTR_NET_HOST_NAME = 'net.host.name';
|
|
202
|
+
/**
|
|
203
|
+
* Deprecated, use `server.port`.
|
|
204
|
+
*
|
|
205
|
+
* @example 8080
|
|
206
|
+
*
|
|
207
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
208
|
+
*
|
|
209
|
+
* @deprecated Replaced by `server.port`.
|
|
210
|
+
*/
|
|
211
|
+
exports.ATTR_NET_HOST_PORT = 'net.host.port';
|
|
212
|
+
/**
|
|
213
|
+
* Deprecated, use `network.peer.address`.
|
|
214
|
+
*
|
|
215
|
+
* @example "127.0.0.1"
|
|
216
|
+
*
|
|
217
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
218
|
+
*
|
|
219
|
+
* @deprecated Replaced by `network.peer.address`.
|
|
220
|
+
*/
|
|
221
|
+
exports.ATTR_NET_PEER_IP = 'net.peer.ip';
|
|
222
|
+
/**
|
|
223
|
+
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
|
|
224
|
+
*
|
|
225
|
+
* @example example.com
|
|
226
|
+
*
|
|
227
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
228
|
+
*
|
|
229
|
+
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
|
|
230
|
+
*/
|
|
231
|
+
exports.ATTR_NET_PEER_NAME = 'net.peer.name';
|
|
232
|
+
/**
|
|
233
|
+
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
|
|
234
|
+
*
|
|
235
|
+
* @example 8080
|
|
236
|
+
*
|
|
237
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
238
|
+
*
|
|
239
|
+
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
|
|
240
|
+
*/
|
|
241
|
+
exports.ATTR_NET_PEER_PORT = 'net.peer.port';
|
|
242
|
+
/**
|
|
243
|
+
* Deprecated, use `network.transport`.
|
|
244
|
+
*
|
|
245
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
246
|
+
*
|
|
247
|
+
* @deprecated Replaced by `network.transport`.
|
|
248
|
+
*/
|
|
249
|
+
exports.ATTR_NET_TRANSPORT = 'net.transport';
|
|
250
|
+
/**
|
|
251
|
+
* Enum value "ip_tcp" for attribute {@link ATTR_NET_TRANSPORT}.
|
|
252
|
+
*/
|
|
253
|
+
exports.NET_TRANSPORT_VALUE_IP_TCP = 'ip_tcp';
|
|
254
|
+
/**
|
|
255
|
+
* Enum value "ip_udp" for attribute {@link ATTR_NET_TRANSPORT}.
|
|
256
|
+
*/
|
|
257
|
+
exports.NET_TRANSPORT_VALUE_IP_UDP = 'ip_udp';
|
|
258
|
+
/**
|
|
259
|
+
* Enum value "1.1" for attribute {@link ATTR_HTTP_FLAVOR}.
|
|
260
|
+
*/
|
|
261
|
+
exports.HTTP_FLAVOR_VALUE_HTTP_1_1 = '1.1';
|
|
262
|
+
//# sourceMappingURL=semconv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.js","sourceRoot":"","sources":["../../src/semconv.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH;;;;;;GAMG;AACU,QAAA,8BAA8B,GACzC,2BAAoC,CAAC;AAEvC;;GAEG;AACU,QAAA,mCAAmC,GAAG,KAAc,CAAC;AAElE;;GAEG;AACU,QAAA,oCAAoC,GAAG,MAAe,CAAC;AAEpE;;;;;;;;GAQG;AACU,QAAA,mBAAmB,GAAG,gBAAyB,CAAC;AAE7D;;;;;;GAMG;AACU,QAAA,gBAAgB,GAAG,aAAsB,CAAC;AAEvD;;;;;;;;GAQG;AACU,QAAA,cAAc,GAAG,WAAoB,CAAC;AAEnD;;;;;;;;;;GAUG;AACU,QAAA,gBAAgB,GAAG,aAAsB,CAAC;AAEvD;;;;;;;;GAQG;AACU,QAAA,gCAAgC,GAC3C,6BAAsC,CAAC;AAEzC;;;;;;;;GAQG;AACU,QAAA,6CAA6C,GACxD,0CAAmD,CAAC;AAEtD;;;;;;;;GAQG;AACU,QAAA,iCAAiC,GAC5C,8BAAuC,CAAC;AAE1C;;;;;;;;GAQG;AACU,QAAA,8CAA8C,GACzD,2CAAoD,CAAC;AAEvD;;;;;;;;;GASG;AACU,QAAA,gBAAgB,GAAG,aAAsB,CAAC;AAEvD;;;;;;;;GAQG;AACU,QAAA,qBAAqB,GAAG,kBAA2B,CAAC;AAEjE;;;;;;;;GAQG;AACU,QAAA,qBAAqB,GAAG,kBAA2B,CAAC;AAEjE;;;;;;;;GAQG;AACU,QAAA,gBAAgB,GAAG,aAAsB,CAAC;AAEvD;;;;;;;;GAQG;AACU,QAAA,aAAa,GAAG,UAAmB,CAAC;AAEjD;;;;;;;;;GASG;AACU,QAAA,oBAAoB,GAAG,iBAA0B,CAAC;AAE/D;;;;;;;;GAQG;AACU,QAAA,gBAAgB,GAAG,aAAsB,CAAC;AAEvD;;;;;;;;GAQG;AACU,QAAA,kBAAkB,GAAG,eAAwB,CAAC;AAE3D;;;;;;;;GAQG;AACU,QAAA,kBAAkB,GAAG,eAAwB,CAAC;AAE3D;;;;;;;;GAQG;AACU,QAAA,gBAAgB,GAAG,aAAsB,CAAC;AAEvD;;;;;;;;GAQG;AACU,QAAA,kBAAkB,GAAG,eAAwB,CAAC;AAE3D;;;;;;;;GAQG;AACU,QAAA,kBAAkB,GAAG,eAAwB,CAAC;AAE3D;;;;;;GAMG;AACU,QAAA,kBAAkB,GAAG,eAAwB,CAAC;AAE3D;;GAEG;AACU,QAAA,0BAA0B,GAAG,QAAiB,CAAC;AAE5D;;GAEG;AACU,QAAA,0BAA0B,GAAG,QAAiB,CAAC;AAE5D;;GAEG;AACU,QAAA,0BAA0B,GAAG,KAAc,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Specifies the category of synthetic traffic, such as tests or bots.\n *\n * @note This attribute **MAY** be derived from the contents of the `user_agent.original` attribute. Components that populate the attribute are responsible for determining what they consider to be synthetic bot or test traffic. This attribute can either be set for self-identification purposes, or on telemetry detected to be generated as a result of a synthetic request. This attribute is useful for distinguishing between genuine client traffic and synthetic traffic generated by bots or tests.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_USER_AGENT_SYNTHETIC_TYPE =\n 'user_agent.synthetic.type' as const;\n\n/**\n * Enum value \"bot\" for attribute {@link ATTR_USER_AGENT_SYNTHETIC_TYPE}.\n */\nexport const USER_AGENT_SYNTHETIC_TYPE_VALUE_BOT = 'bot' as const;\n\n/**\n * Enum value \"test\" for attribute {@link ATTR_USER_AGENT_SYNTHETIC_TYPE}.\n */\nexport const USER_AGENT_SYNTHETIC_TYPE_VALUE_TEST = 'test' as const;\n\n/**\n * Deprecated, use `client.address` instead.\n *\n * @example \"83.164.160.102\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `client.address`.\n */\nexport const ATTR_HTTP_CLIENT_IP = 'http.client_ip' as const;\n\n/**\n * Deprecated, use `network.protocol.name` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `network.protocol.name`.\n */\nexport const ATTR_HTTP_FLAVOR = 'http.flavor' as const;\n\n/**\n * Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage.\n *\n * @example www.example.org\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage.\n */\nexport const ATTR_HTTP_HOST = 'http.host' as const;\n\n/**\n * Deprecated, use `http.request.method` instead.\n *\n * @example GET\n * @example POST\n * @example HEAD\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.request.method`.\n */\nexport const ATTR_HTTP_METHOD = 'http.method' as const;\n\n/**\n * Deprecated, use `http.request.header.<key>` instead.\n *\n * @example 3495\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.request.header.<key>`.\n */\nexport const ATTR_HTTP_REQUEST_CONTENT_LENGTH =\n 'http.request_content_length' as const;\n\n/**\n * Deprecated, use `http.request.body.size` instead.\n *\n * @example 5493\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.request.body.size`.\n */\nexport const ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED =\n 'http.request_content_length_uncompressed' as const;\n\n/**\n * Deprecated, use `http.response.header.<key>` instead.\n *\n * @example 3495\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.response.header.<key>`.\n */\nexport const ATTR_HTTP_RESPONSE_CONTENT_LENGTH =\n 'http.response_content_length' as const;\n\n/**\n * Deprecated, use `http.response.body.size` instead.\n *\n * @example 5493\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replace by `http.response.body.size`.\n */\nexport const ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED =\n 'http.response_content_length_uncompressed' as const;\n\n/**\n * Deprecated, use `url.scheme` instead.\n *\n * @example http\n * @example https\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `url.scheme` instead.\n */\nexport const ATTR_HTTP_SCHEME = 'http.scheme' as const;\n\n/**\n * Deprecated, use `server.address` instead.\n *\n * @example example.com\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address`.\n */\nexport const ATTR_HTTP_SERVER_NAME = 'http.server_name' as const;\n\n/**\n * Deprecated, use `http.response.status_code` instead.\n *\n * @example 200\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.response.status_code`.\n */\nexport const ATTR_HTTP_STATUS_CODE = 'http.status_code' as const;\n\n/**\n * Deprecated, use `url.path` and `url.query` instead.\n *\n * @example /search?q=OpenTelemetry#SemConv\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Split to `url.path` and `url.query.\n */\nexport const ATTR_HTTP_TARGET = 'http.target' as const;\n\n/**\n * Deprecated, use `url.full` instead.\n *\n * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `url.full`.\n */\nexport const ATTR_HTTP_URL = 'http.url' as const;\n\n/**\n * Deprecated, use `user_agent.original` instead.\n *\n * @example CERN-LineMode/2.15 libwww/2.17b3\n * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `user_agent.original`.\n */\nexport const ATTR_HTTP_USER_AGENT = 'http.user_agent' as const;\n\n/**\n * Deprecated, use `network.local.address`.\n *\n * @example \"192.168.0.1\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `network.local.address`.\n */\nexport const ATTR_NET_HOST_IP = 'net.host.ip' as const;\n\n/**\n * Deprecated, use `server.address`.\n *\n * @example example.com\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address`.\n */\nexport const ATTR_NET_HOST_NAME = 'net.host.name' as const;\n\n/**\n * Deprecated, use `server.port`.\n *\n * @example 8080\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.port`.\n */\nexport const ATTR_NET_HOST_PORT = 'net.host.port' as const;\n\n/**\n * Deprecated, use `network.peer.address`.\n *\n * @example \"127.0.0.1\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `network.peer.address`.\n */\nexport const ATTR_NET_PEER_IP = 'net.peer.ip' as const;\n\n/**\n * Deprecated, use `server.address` on client spans and `client.address` on server spans.\n *\n * @example example.com\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.\n */\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\n\n/**\n * Deprecated, use `server.port` on client spans and `client.port` on server spans.\n *\n * @example 8080\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.\n */\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' as const;\n\n/**\n * Deprecated, use `network.transport`.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `network.transport`.\n */\nexport const ATTR_NET_TRANSPORT = 'net.transport' as const;\n\n/**\n * Enum value \"ip_tcp\" for attribute {@link ATTR_NET_TRANSPORT}.\n */\nexport const NET_TRANSPORT_VALUE_IP_TCP = 'ip_tcp' as const;\n\n/**\n * Enum value \"ip_udp\" for attribute {@link ATTR_NET_TRANSPORT}.\n */\nexport const NET_TRANSPORT_VALUE_IP_UDP = 'ip_udp' as const;\n\n/**\n * Enum value \"1.1\" for attribute {@link ATTR_HTTP_FLAVOR}.\n */\nexport const HTTP_FLAVOR_VALUE_HTTP_1_1 = '1.1' as const;\n"]}
|
package/build/src/types.d.ts
CHANGED
|
@@ -62,5 +62,10 @@ export interface HttpInstrumentationConfig extends InstrumentationConfig {
|
|
|
62
62
|
responseHeaders?: string[];
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Enable automatic population of synthetic source type based on the user-agent header
|
|
67
|
+
* @experimental
|
|
68
|
+
**/
|
|
69
|
+
enableSyntheticSourceDetection?: boolean;
|
|
65
70
|
}
|
|
66
71
|
//# sourceMappingURL=types.d.ts.map
|
package/build/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Span, Attributes } from '@opentelemetry/api';\nimport {\n ClientRequest,\n IncomingMessage,\n ServerResponse,\n RequestOptions,\n} from 'http';\nimport { InstrumentationConfig } from '@opentelemetry/instrumentation';\n\nexport interface HttpCustomAttributeFunction {\n (\n span: Span,\n request: ClientRequest | IncomingMessage,\n response: IncomingMessage | ServerResponse\n ): void;\n}\n\nexport interface IgnoreIncomingRequestFunction {\n (request: IncomingMessage): boolean;\n}\n\nexport interface IgnoreOutgoingRequestFunction {\n (request: RequestOptions): boolean;\n}\n\nexport interface HttpRequestCustomAttributeFunction {\n (span: Span, request: ClientRequest | IncomingMessage): void;\n}\n\nexport interface HttpResponseCustomAttributeFunction {\n (span: Span, response: IncomingMessage | ServerResponse): void;\n}\n\nexport interface StartIncomingSpanCustomAttributeFunction {\n (request: IncomingMessage): Attributes;\n}\n\nexport interface StartOutgoingSpanCustomAttributeFunction {\n (request: RequestOptions): Attributes;\n}\n\n/**\n * Options available for the HTTP instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http#http-instrumentation-options))\n */\nexport interface HttpInstrumentationConfig extends InstrumentationConfig {\n /** Not trace all incoming requests that matched with custom function */\n ignoreIncomingRequestHook?: IgnoreIncomingRequestFunction;\n /** Not trace all outgoing requests that matched with custom function */\n ignoreOutgoingRequestHook?: IgnoreOutgoingRequestFunction;\n /** If set to true, incoming requests will not be instrumented at all. */\n disableIncomingRequestInstrumentation?: boolean;\n /** If set to true, outgoing requests will not be instrumented at all. */\n disableOutgoingRequestInstrumentation?: boolean;\n /** Function for adding custom attributes after response is handled */\n applyCustomAttributesOnSpan?: HttpCustomAttributeFunction;\n /** Function for adding custom attributes before request is handled */\n requestHook?: HttpRequestCustomAttributeFunction;\n /** Function for adding custom attributes before response is handled */\n responseHook?: HttpResponseCustomAttributeFunction;\n /** Function for adding custom attributes before a span is started in incomingRequest */\n startIncomingSpanHook?: StartIncomingSpanCustomAttributeFunction;\n /** Function for adding custom attributes before a span is started in outgoingRequest */\n startOutgoingSpanHook?: StartOutgoingSpanCustomAttributeFunction;\n /** The primary server name of the matched virtual host. */\n serverName?: string;\n /** Require parent to create span for outgoing requests */\n requireParentforOutgoingSpans?: boolean;\n /** Require parent to create span for incoming requests */\n requireParentforIncomingSpans?: boolean;\n /** Map the following HTTP headers to span attributes. */\n headersToSpanAttributes?: {\n client?: { requestHeaders?: string[]; responseHeaders?: string[] };\n server?: { requestHeaders?: string[]; responseHeaders?: string[] };\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Span, Attributes } from '@opentelemetry/api';\nimport {\n ClientRequest,\n IncomingMessage,\n ServerResponse,\n RequestOptions,\n} from 'http';\nimport { InstrumentationConfig } from '@opentelemetry/instrumentation';\n\nexport interface HttpCustomAttributeFunction {\n (\n span: Span,\n request: ClientRequest | IncomingMessage,\n response: IncomingMessage | ServerResponse\n ): void;\n}\n\nexport interface IgnoreIncomingRequestFunction {\n (request: IncomingMessage): boolean;\n}\n\nexport interface IgnoreOutgoingRequestFunction {\n (request: RequestOptions): boolean;\n}\n\nexport interface HttpRequestCustomAttributeFunction {\n (span: Span, request: ClientRequest | IncomingMessage): void;\n}\n\nexport interface HttpResponseCustomAttributeFunction {\n (span: Span, response: IncomingMessage | ServerResponse): void;\n}\n\nexport interface StartIncomingSpanCustomAttributeFunction {\n (request: IncomingMessage): Attributes;\n}\n\nexport interface StartOutgoingSpanCustomAttributeFunction {\n (request: RequestOptions): Attributes;\n}\n\n/**\n * Options available for the HTTP instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http#http-instrumentation-options))\n */\nexport interface HttpInstrumentationConfig extends InstrumentationConfig {\n /** Not trace all incoming requests that matched with custom function */\n ignoreIncomingRequestHook?: IgnoreIncomingRequestFunction;\n /** Not trace all outgoing requests that matched with custom function */\n ignoreOutgoingRequestHook?: IgnoreOutgoingRequestFunction;\n /** If set to true, incoming requests will not be instrumented at all. */\n disableIncomingRequestInstrumentation?: boolean;\n /** If set to true, outgoing requests will not be instrumented at all. */\n disableOutgoingRequestInstrumentation?: boolean;\n /** Function for adding custom attributes after response is handled */\n applyCustomAttributesOnSpan?: HttpCustomAttributeFunction;\n /** Function for adding custom attributes before request is handled */\n requestHook?: HttpRequestCustomAttributeFunction;\n /** Function for adding custom attributes before response is handled */\n responseHook?: HttpResponseCustomAttributeFunction;\n /** Function for adding custom attributes before a span is started in incomingRequest */\n startIncomingSpanHook?: StartIncomingSpanCustomAttributeFunction;\n /** Function for adding custom attributes before a span is started in outgoingRequest */\n startOutgoingSpanHook?: StartOutgoingSpanCustomAttributeFunction;\n /** The primary server name of the matched virtual host. */\n serverName?: string;\n /** Require parent to create span for outgoing requests */\n requireParentforOutgoingSpans?: boolean;\n /** Require parent to create span for incoming requests */\n requireParentforIncomingSpans?: boolean;\n /** Map the following HTTP headers to span attributes. */\n headersToSpanAttributes?: {\n client?: { requestHeaders?: string[]; responseHeaders?: string[] };\n server?: { requestHeaders?: string[]; responseHeaders?: string[] };\n };\n /**\n * Enable automatic population of synthetic source type based on the user-agent header\n * @experimental\n **/\n enableSyntheticSourceDetection?: boolean;\n}\n"]}
|
package/build/src/utils.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Attributes, SpanStatusCode, Span, SpanKind, DiagLogger } from '@opentelemetry/api';
|
|
3
3
|
import { IncomingHttpHeaders, IncomingMessage, OutgoingHttpHeaders, RequestOptions, ServerResponse } from 'http';
|
|
4
|
+
import { SemconvStability } from '@opentelemetry/instrumentation';
|
|
4
5
|
import * as url from 'url';
|
|
5
|
-
import { Err, IgnoreMatcher, ParsedRequestOptions
|
|
6
|
+
import { Err, IgnoreMatcher, ParsedRequestOptions } from './internal-types';
|
|
6
7
|
/**
|
|
7
8
|
* Get an absolute url
|
|
8
9
|
*/
|
|
@@ -73,7 +74,7 @@ export declare const getOutgoingRequestAttributes: (requestOptions: ParsedReques
|
|
|
73
74
|
hostname: string;
|
|
74
75
|
port: string | number;
|
|
75
76
|
hookAttributes?: Attributes;
|
|
76
|
-
}, semconvStability: SemconvStability) => Attributes;
|
|
77
|
+
}, semconvStability: SemconvStability, enableSyntheticSourceDetection: boolean) => Attributes;
|
|
77
78
|
/**
|
|
78
79
|
* Returns outgoing request Metric attributes scoped to the request data
|
|
79
80
|
* @param {Attributes} spanAttributes the span attributes
|
|
@@ -95,6 +96,7 @@ export declare const getOutgoingRequestAttributesOnResponse: (response: Incoming
|
|
|
95
96
|
* @param {Attributes} spanAttributes the span attributes
|
|
96
97
|
*/
|
|
97
98
|
export declare const getOutgoingRequestMetricAttributesOnResponse: (spanAttributes: Attributes) => Attributes;
|
|
99
|
+
export declare const getOutgoingStableRequestMetricAttributesOnResponse: (spanAttributes: Attributes) => Attributes;
|
|
98
100
|
/**
|
|
99
101
|
* Get server.address and port according to http semconv 1.27
|
|
100
102
|
* https://github.com/open-telemetry/semantic-conventions/blob/bf0a2c1134f206f034408b201dbec37960ed60ec/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes
|
|
@@ -111,6 +113,7 @@ export declare const getIncomingRequestAttributes: (request: IncomingMessage, op
|
|
|
111
113
|
serverName?: string;
|
|
112
114
|
hookAttributes?: Attributes;
|
|
113
115
|
semconvStability: SemconvStability;
|
|
116
|
+
enableSyntheticSourceDetection: boolean;
|
|
114
117
|
}, logger: DiagLogger) => Attributes;
|
|
115
118
|
/**
|
|
116
119
|
* Returns incoming request Metric attributes scoped to the request data
|
|
@@ -128,6 +131,10 @@ export declare const getIncomingRequestAttributesOnResponse: (request: IncomingM
|
|
|
128
131
|
* @param {Attributes} spanAttributes the span attributes
|
|
129
132
|
*/
|
|
130
133
|
export declare const getIncomingRequestMetricAttributesOnResponse: (spanAttributes: Attributes) => Attributes;
|
|
134
|
+
/**
|
|
135
|
+
* Returns incoming stable request Metric attributes scoped to the request data
|
|
136
|
+
* @param {Attributes} spanAttributes the span attributes
|
|
137
|
+
*/
|
|
131
138
|
export declare const getIncomingStableRequestMetricAttributesOnResponse: (spanAttributes: Attributes) => Attributes;
|
|
132
139
|
export declare function headerCapture(type: 'request' | 'response', headers: string[]): (span: Span, getHeader: (key: string) => undefined | string | string[] | number) => void;
|
|
133
140
|
//# sourceMappingURL=utils.d.ts.map
|