-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathindex.d.ts
More file actions
210 lines (170 loc) · 6.77 KB
/
Copy pathindex.d.ts
File metadata and controls
210 lines (170 loc) · 6.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/** Original definitions by felixfbecker: https://github.com/lightstep/lightstep-tracer-javascript/issues/99#issuecomment-436823685 */
declare module 'lightstep-tracer' {
import * as opentracing from 'opentracing';
export interface TracerOptions {
/** the project access token. Access tokens are used by the LightStep tracer client libraries to identify the project the tracer is reporting for */
access_token: string
/** the string identifier for the application, service, or process. A Component is a logical service (or client) in a distributed system. The component usually represents a particular process or script in the distributed system */
component_name: string
/**
* controls the level of logging to the console
*
* - 0 - the client library will never log to the console
* - 1 - error reporting will be throttled to the first error per minute
* - 2 - all errors are logged to the console
* - 3 - all errors, warnings, and info statements are logged to the console
* - 4 - all log statements, including debugging details
*
* @default 1
*/
verbosity?: number
/** custom collector hostname */
collector_host?: string
/** custom collector port */
collector_port?: number
/** custom collector base path (if served behind a reverse proxy) */
collector_path?: string
/** optional, default='tls'
* `tls` - use HTTPS encrypted connections
* `none` - use HTTP plain-text connections
*/
collector_encryption?: "tls" | "none"
/**
* optional tag object that will be applied to all reports.
*/
tags?: any
/**
* optional, the maximum time before the tracer reports. default = 2500
*/
max_reporting_interval_millis?: number
/**
* optional, disables clock skew correction. default = false
*/
disable_clock_skew_correction?: boolean
/**
* optional, specifies the transport method used for communication to the Satellite. default = proto.
* `proto` - use protobuf over HTTP(S)
* `thrift` - use thrift
*/
transport?: string
/**
* optional, disables the tracer. default = false
*/
disabled?: boolean
/**
* optional, defines the maximum number of spans per report. default = 4096
*/
max_span_records?: number
/**
* optional tag object that will be applied to all spans.
*/
default_span_tags?: any
/**
* optional, sets the timeout for flushing reports to Satellite. default = 30000 (30s)
*/
report_timeout_millis?: number
/**
* optional, if enabled will use gzip compression of reports from node.js. default = true
*/
gzip_json_requests?: boolean
/**
* optional, if enabled the tracer will not flush reports to Satellite. default = false
*/
disable_reporting_loop?: boolean
/**
* optional, if enabled the tracer will not attempt to flush at process exit. default = false
*/
disable_report_on_exit?: boolean
/**
* optional, specifies how long the tracer should wait before its first flush in ms. default = 1000
*/
delay_initial_report_millis?: number
/**
* optional, specifies how quickly error logging should throttle in ms. default = 60000
*/
error_throttle_millis?: number
/**
* optional, an override of the existing logging function for the tracer. by default, log to console.
*/
logger?: any
/**
* optional. browser-only. creates a single long-lived span for the entire page view. default = false
*/
instrument_page_load?: boolean
/**
* optional. browser-only. if enabled, automatically instruments all XHR requests with context headers.
* see `xhr_url_inclusion_patterns` and `xhr_url_exclusion_patterns`.
*/
xhr_instrumentation?: boolean
/**
* optional. browser-only. a regex to indicate which URLs should be automatically instrumented for XHRs.
* default value is all urls.
*/
xhr_url_inclusion_patterns?: RegExp[]
/**
* optional. browser-only. a regex to indicate which URLs should not be automatically instrumented for XHRs.
* default value is no urls.
*/
xhr_url_exclusion_patterns?: RegExp[]
/**
* optional. browser-only. a regex to indicate which automatically instrumented XHR URLs should include headers for continuing the trace on the server.
* default value is all urls.
*/
xhr_url_header_inclusion_patterns?: RegExp[]
/**
* optional. browser-only. a regex to indicate which automatically instrumented XHR URLs should not include headers for continuing the trace on the server.
* default value is no urls.
*/
xhr_url_header_exclusion_patterns?: RegExp[]
/**
* optional. browser-only. if enabled, automatically instrument all window.fetch requests with context.headers.
* see `fetch_url_inclusion_patterns` and `fetch_url_exclusion_patterns`.
*/
fetch_instrumentation?: boolean
/**
* optional. browser-only. a regex to indicate which URLs should be automatically instrumented for window.fetch.
* default value is all urls.
*/
fetch_url_inclusion_patterns?: RegExp[]
/**
* optional. browser-only. a regex to indicate which URLs should not be automatically instrumented for window.fetch.
* default value is no urls.
*/
fetch_url_exclusion_patterns?: RegExp[]
/**
* optional. browser-only. a regex to indicate which automatically instrumented URLs should include headers for continuing the trace on the server.
* default value is all urls.
*/
fetch_url_header_inclusion_patterns?: RegExp[]
/**
* optional. browser-only. a regex to indicate which automatically instrumented URLs should not include headers for continuing the trace on the server.
* default value is no urls.
*/
fetch_url_header_exclusion_patterns?: RegExp[]
/**
* optional. node-only. if enabled, automatically instrument all node requests with
* context.headers.
*/
nodejs_instrumentation?: boolean
/**
* optional. node-only. a regex to indicate which URLs should be automatically instrumented for
* node's native http, https modules.
* default value is all urls.
*/
nodejs_url_inclusion_patterns?: RegExp[]
/**
* optional. node-only. a regex to indicate which URLs should not be automatically instrumented
* for node's native http, https modules.
* default value is no urls.
*/
nodejs_url_exclusion_patterns?: RegExp[]
/**
* optional. browser-only. if true, includes cookies in the span logs for both `window.fetch` and `XMLHttpRequest`.
* defaults to true.
*/
include_cookies?: boolean
}
export class Tracer extends opentracing.Tracer {
constructor(options: TracerOptions)
}
}