Skip to content

Commit 1f00133

Browse files
authored
[AZINTS] format and add docstrings (#897)
1 parent 8a5e603 commit 1f00133

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

azure/activity_logs_monitoring/index.js

+21-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2025 Datadog, Inc.
55

6-
const VERSION = '1.2.0';
6+
const VERSION = '1.2.1';
77

88
const STRING = 'string'; // example: 'some message'
99
const STRING_ARRAY = 'string-array'; // example: ['one message', 'two message', ...]
@@ -98,6 +98,11 @@ function sleep(ms) {
9898
}
9999

100100
class ScrubberRule {
101+
/**
102+
* @param {string} name
103+
* @param {string} pattern
104+
* @param {string} replacement
105+
*/
101106
constructor(name, pattern, replacement) {
102107
this.name = name;
103108
this.replacement = replacement;
@@ -106,6 +111,11 @@ class ScrubberRule {
106111
}
107112

108113
class Batcher {
114+
/**
115+
* @param {number} maxItemSizeBytes
116+
* @param {number} maxBatchSizeBytes
117+
* @param {number} maxItemsCount
118+
*/
109119
constructor(maxItemSizeBytes, maxBatchSizeBytes, maxItemsCount) {
110120
this.maxItemSizeBytes = maxItemSizeBytes;
111121
this.maxBatchSizeBytes = maxBatchSizeBytes;
@@ -152,6 +162,9 @@ class Batcher {
152162
}
153163

154164
class HTTPClient {
165+
/**
166+
* @param {InvocationContext} context
167+
*/
155168
constructor(context) {
156169
this.context = context;
157170
this.url = `https://${DD_HTTP_URL}:${DD_HTTP_PORT}/api/v2/logs`;
@@ -228,6 +241,10 @@ class HTTPClient {
228241
}
229242

230243
class Scrubber {
244+
/**
245+
* @param {InvocationContext} context
246+
* @param {Record<string, {'pattern': string, 'replacement': string}>} configs
247+
*/
231248
constructor(context, configs) {
232249
let rules = [];
233250
for (const [name, settings] of Object.entries(configs)) {
@@ -260,6 +277,9 @@ class Scrubber {
260277
}
261278

262279
class EventhubLogHandler {
280+
/**
281+
* @param {InvocationContext} context
282+
*/
263283
constructor(context) {
264284
this.context = context;
265285
this.logSplittingConfig = getLogSplittingConfig();

0 commit comments

Comments
 (0)