3
3
// This product includes software developed at Datadog (https://www.datadoghq.com/).
4
4
// Copyright 2025 Datadog, Inc.
5
5
6
- const VERSION = '1.2.0 ' ;
6
+ const VERSION = '1.2.1 ' ;
7
7
8
8
const STRING = 'string' ; // example: 'some message'
9
9
const STRING_ARRAY = 'string-array' ; // example: ['one message', 'two message', ...]
@@ -98,6 +98,11 @@ function sleep(ms) {
98
98
}
99
99
100
100
class ScrubberRule {
101
+ /**
102
+ * @param {string } name
103
+ * @param {string } pattern
104
+ * @param {string } replacement
105
+ */
101
106
constructor ( name , pattern , replacement ) {
102
107
this . name = name ;
103
108
this . replacement = replacement ;
@@ -106,6 +111,11 @@ class ScrubberRule {
106
111
}
107
112
108
113
class Batcher {
114
+ /**
115
+ * @param {number } maxItemSizeBytes
116
+ * @param {number } maxBatchSizeBytes
117
+ * @param {number } maxItemsCount
118
+ */
109
119
constructor ( maxItemSizeBytes , maxBatchSizeBytes , maxItemsCount ) {
110
120
this . maxItemSizeBytes = maxItemSizeBytes ;
111
121
this . maxBatchSizeBytes = maxBatchSizeBytes ;
@@ -152,6 +162,9 @@ class Batcher {
152
162
}
153
163
154
164
class HTTPClient {
165
+ /**
166
+ * @param {InvocationContext } context
167
+ */
155
168
constructor ( context ) {
156
169
this . context = context ;
157
170
this . url = `https://${ DD_HTTP_URL } :${ DD_HTTP_PORT } /api/v2/logs` ;
@@ -228,6 +241,10 @@ class HTTPClient {
228
241
}
229
242
230
243
class Scrubber {
244
+ /**
245
+ * @param {InvocationContext } context
246
+ * @param {Record<string, {'pattern': string, 'replacement': string}> } configs
247
+ */
231
248
constructor ( context , configs ) {
232
249
let rules = [ ] ;
233
250
for ( const [ name , settings ] of Object . entries ( configs ) ) {
@@ -260,6 +277,9 @@ class Scrubber {
260
277
}
261
278
262
279
class EventhubLogHandler {
280
+ /**
281
+ * @param {InvocationContext } context
282
+ */
263
283
constructor ( context ) {
264
284
this . context = context ;
265
285
this . logSplittingConfig = getLogSplittingConfig ( ) ;
0 commit comments