Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion azure/activity_logs_monitoring/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2025 Datadog, Inc.

const VERSION = '1.2.0';
const VERSION = '1.2.1';

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

class ScrubberRule {
/**
* @param {string} name
* @param {string} pattern
* @param {string} replacement
*/
constructor(name, pattern, replacement) {
this.name = name;
this.replacement = replacement;
Expand All @@ -106,6 +111,11 @@ class ScrubberRule {
}

class Batcher {
/**
* @param {number} maxItemSizeBytes
* @param {number} maxBatchSizeBytes
* @param {number} maxItemsCount
*/
constructor(maxItemSizeBytes, maxBatchSizeBytes, maxItemsCount) {
this.maxItemSizeBytes = maxItemSizeBytes;
this.maxBatchSizeBytes = maxBatchSizeBytes;
Expand Down Expand Up @@ -152,6 +162,9 @@ class Batcher {
}

class HTTPClient {
/**
* @param {InvocationContext} context
*/
constructor(context) {
this.context = context;
this.url = `https://${DD_HTTP_URL}:${DD_HTTP_PORT}/api/v2/logs`;
Expand Down Expand Up @@ -228,6 +241,10 @@ class HTTPClient {
}

class Scrubber {
/**
* @param {InvocationContext} context
* @param {Record<string, {'pattern': string, 'replacement': string}>} configs
*/
constructor(context, configs) {
let rules = [];
for (const [name, settings] of Object.entries(configs)) {
Expand Down Expand Up @@ -260,6 +277,9 @@ class Scrubber {
}

class EventhubLogHandler {
/**
* @param {InvocationContext} context
*/
constructor(context) {
this.context = context;
this.logSplittingConfig = getLogSplittingConfig();
Expand Down
Loading