@newrelic/preflight 1.0.3 → 1.0.5
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 +7 -1
- package/dist/alerts/types.d.ts.map +1 -1
- package/dist/alerts/types.js.map +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -3
- package/dist/config.js.map +1 -1
- package/dist/dashboard/dashboard-server.d.ts +4 -0
- package/dist/dashboard/dashboard-server.d.ts.map +1 -1
- package/dist/dashboard/dashboard-server.js +42 -1
- package/dist/dashboard/dashboard-server.js.map +1 -1
- package/dist/dashboard/live-event-bus.js +2 -2
- package/dist/dashboard/live-event-bus.js.map +1 -1
- package/dist/dashboard/routes/sse-handler.js +3 -3
- package/dist/dashboard/routes/sse-handler.js.map +1 -1
- package/dist/hooks/collector-script.d.ts.map +1 -1
- package/dist/hooks/collector-script.js +1 -5
- package/dist/hooks/collector-script.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/install/cli.d.ts +1 -0
- package/dist/install/cli.d.ts.map +1 -1
- package/dist/install/cli.js +306 -106
- package/dist/install/cli.js.map +1 -1
- package/dist/install/install-helper.d.ts +5 -4
- package/dist/install/install-helper.d.ts.map +1 -1
- package/dist/install/install-helper.js +2 -2
- package/dist/install/install-helper.js.map +1 -1
- package/dist/install/json-utils.d.ts +4 -0
- package/dist/install/json-utils.d.ts.map +1 -0
- package/dist/install/json-utils.js +88 -0
- package/dist/install/json-utils.js.map +1 -0
- package/dist/install/migrate.d.ts.map +1 -1
- package/dist/install/migrate.js +57 -1
- package/dist/install/migrate.js.map +1 -1
- package/dist/install/schedule.d.ts +1 -0
- package/dist/install/schedule.d.ts.map +1 -1
- package/dist/install/schedule.js +23 -5
- package/dist/install/schedule.js.map +1 -1
- package/dist/install/setup-wizard.d.ts.map +1 -1
- package/dist/install/setup-wizard.js +105 -44
- package/dist/install/setup-wizard.js.map +1 -1
- package/dist/metrics/anti-patterns.d.ts.map +1 -1
- package/dist/metrics/anti-patterns.js.map +1 -1
- package/dist/metrics/context-composition-tracker.d.ts.map +1 -1
- package/dist/metrics/context-composition-tracker.js.map +1 -1
- package/dist/platforms/copilot-adapter.d.ts.map +1 -1
- package/dist/platforms/copilot-adapter.js.map +1 -1
- package/dist/proxy/otlp-receiver.d.ts.map +1 -1
- package/dist/proxy/otlp-receiver.js.map +1 -1
- package/dist/proxy/proxy-manager.js +1 -1
- package/dist/proxy/proxy-manager.js.map +1 -1
- package/dist/proxy/upstream-stdio.d.ts.map +1 -1
- package/dist/proxy/upstream-stdio.js.map +1 -1
- package/dist/security/ssrf.js +1 -1
- package/dist/security/ssrf.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -1
- package/dist/server.js.map +1 -1
- package/dist/shared/__test-utils__/log-output.d.ts +1 -2
- package/dist/shared/__test-utils__/log-output.d.ts.map +1 -1
- package/dist/shared/__test-utils__/log-output.js +1 -2
- package/dist/shared/__test-utils__/log-output.js.map +1 -1
- package/dist/shared/config.d.ts +8 -2
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js +20 -20
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.js +10 -10
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/events/factory.js +12 -12
- package/dist/shared/events/factory.js.map +1 -1
- package/dist/shared/events/serialize.d.ts +2 -2
- package/dist/shared/events/serialize.js +19 -19
- package/dist/shared/events/serialize.js.map +1 -1
- package/dist/shared/harvest/event-buffer.d.ts +2 -2
- package/dist/shared/harvest/event-buffer.js +3 -3
- package/dist/shared/harvest/event-buffer.js.map +1 -1
- package/dist/shared/harvest/harvest-scheduler.d.ts +4 -5
- package/dist/shared/harvest/harvest-scheduler.d.ts.map +1 -1
- package/dist/shared/harvest/harvest-scheduler.js +35 -35
- package/dist/shared/harvest/harvest-scheduler.js.map +1 -1
- package/dist/shared/harvest/metric-aggregator.d.ts +9 -9
- package/dist/shared/harvest/metric-aggregator.d.ts.map +1 -1
- package/dist/shared/harvest/metric-aggregator.js +16 -18
- package/dist/shared/harvest/metric-aggregator.js.map +1 -1
- package/dist/shared/index.d.ts +0 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +0 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/logger.d.ts +4 -5
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/logger.js +12 -12
- package/dist/shared/logger.js.map +1 -1
- package/dist/shared/pricing-data.js +10 -10
- package/dist/shared/pricing-data.js.map +1 -1
- package/dist/shared/pricing.d.ts +3 -3
- package/dist/shared/pricing.js +12 -12
- package/dist/shared/pricing.js.map +1 -1
- package/dist/shared/redact.d.ts +1 -3
- package/dist/shared/redact.d.ts.map +1 -1
- package/dist/shared/redact.js +8 -10
- package/dist/shared/redact.js.map +1 -1
- package/dist/shared/timing.d.ts +4 -4
- package/dist/shared/timing.d.ts.map +1 -1
- package/dist/shared/timing.js +9 -9
- package/dist/shared/timing.js.map +1 -1
- package/dist/shared/tokens.d.ts +4 -4
- package/dist/shared/tokens.js +16 -16
- package/dist/shared/tokens.js.map +1 -1
- package/dist/shared/transport/events-api.d.ts +1 -1
- package/dist/shared/transport/events-api.d.ts.map +1 -1
- package/dist/shared/transport/events-api.js +2 -1
- package/dist/shared/transport/events-api.js.map +1 -1
- package/dist/shared/transport/http-client.d.ts +1 -1
- package/dist/shared/transport/http-client.d.ts.map +1 -1
- package/dist/shared/transport/http-client.js +19 -28
- package/dist/shared/transport/http-client.js.map +1 -1
- package/dist/shared/transport/logs-api.d.ts +2 -3
- package/dist/shared/transport/logs-api.d.ts.map +1 -1
- package/dist/shared/transport/logs-api.js +3 -3
- package/dist/shared/transport/logs-api.js.map +1 -1
- package/dist/shared/transport/metric-api.d.ts.map +1 -1
- package/dist/shared/transport/metric-api.js +1 -0
- package/dist/shared/transport/metric-api.js.map +1 -1
- package/dist/shared/transport/otlp-event-bridge.d.ts +10 -5
- package/dist/shared/transport/otlp-event-bridge.d.ts.map +1 -1
- package/dist/shared/transport/otlp-event-bridge.js +20 -11
- package/dist/shared/transport/otlp-event-bridge.js.map +1 -1
- package/dist/shared/transport/otlp-shared.d.ts +12 -1
- package/dist/shared/transport/otlp-shared.d.ts.map +1 -1
- package/dist/shared/transport/otlp-shared.js +20 -4
- package/dist/shared/transport/otlp-shared.js.map +1 -1
- package/dist/shared/transport/otlp-transport.d.ts +22 -19
- package/dist/shared/transport/otlp-transport.d.ts.map +1 -1
- package/dist/shared/transport/otlp-transport.js +136 -120
- package/dist/shared/transport/otlp-transport.js.map +1 -1
- package/dist/shared/transport/types.d.ts +7 -3
- package/dist/shared/transport/types.d.ts.map +1 -1
- package/dist/storage/session-store.js +1 -1
- package/dist/storage/weekly-summary.js +3 -3
- package/dist/storage/weekly-summary.js.map +1 -1
- package/dist/tools/cross-session-tools.js +1 -1
- package/dist/tools/cross-session-tools.js.map +1 -1
- package/dist/tools/session-stats.d.ts.map +1 -1
- package/dist/tools/session-stats.js +2 -1
- package/dist/tools/session-stats.js.map +1 -1
- package/dist/tracing/mcp-tracer.js +1 -1
- package/dist/tracing/mcp-tracer.js.map +1 -1
- package/dist/transport/nr-ingest.d.ts.map +1 -1
- package/dist/transport/nr-ingest.js +4 -0
- package/dist/transport/nr-ingest.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +21 -0
- package/dist/version.js.map +1 -0
- package/dist/web/assets/index-CW0UCwb9.css +2 -0
- package/dist/web/assets/index-HRyb4aZK.js +64 -0
- package/dist/web/index.html +2 -2
- package/package.json +23 -23
- package/dist/shared/version.d.ts +0 -2
- package/dist/shared/version.d.ts.map +0 -1
- package/dist/shared/version.js +0 -2
- package/dist/shared/version.js.map +0 -1
- package/dist/web/assets/index-BrL281N-.css +0 -2
- package/dist/web/assets/index-CcaYZzXm.js +0 -42
|
@@ -18,9 +18,9 @@ const serializeLogger = createLogger('events-serialize');
|
|
|
18
18
|
* after prefixing — which doesn't collide, but is misleading because
|
|
19
19
|
* the bare `nr.<x>` and `gen_ai.<x>` namespaces ARE reserved at the
|
|
20
20
|
* top level. Reject the bare-key form to avoid the cognitive trap.
|
|
21
|
-
* - `schemaVersion`
|
|
21
|
+
* - `schemaVersion` — reserved for the library's own use.
|
|
22
22
|
* - `type` — easy to confuse with NR's `eventType`; many dashboards
|
|
23
|
-
* use `type` for log/event categorization
|
|
23
|
+
* use `type` for log/event categorization.
|
|
24
24
|
*/
|
|
25
25
|
const RESERVED_CUSTOM_KEYS = new Set([
|
|
26
26
|
'eventType',
|
|
@@ -41,8 +41,8 @@ function isReservedCustomKey(key) {
|
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Apply customAttribute clipping
|
|
45
|
-
* would collide with reserved/internal namespaces
|
|
44
|
+
* Apply customAttribute clipping and reject keys that
|
|
45
|
+
* would collide with reserved/internal namespaces. Drop +
|
|
46
46
|
* debug-log on rejection so misuse is discoverable but doesn't fail
|
|
47
47
|
* the entire event.
|
|
48
48
|
*/
|
|
@@ -58,12 +58,12 @@ function applyCustomAttributes(data, custom, options, eventType) {
|
|
|
58
58
|
data[`custom.${key}`] = clipCustomAttribute(value, options);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
// NR Events API caps attribute values at 4096 UTF-8 bytes
|
|
61
|
+
// NR Events API caps attribute values at 4096 UTF-8 bytes.
|
|
62
62
|
// Truncating by character count can still exceed the byte cap for multi-byte
|
|
63
63
|
// scripts (CJK = 3 bytes/char, emoji = 4 bytes/char). Truncate by byte count.
|
|
64
64
|
const NR_VALUE_MAX_BYTES = 4096;
|
|
65
65
|
const NR_VALUE_SUFFIX = '...'; // 3 bytes (ASCII)
|
|
66
|
-
//
|
|
66
|
+
// Shared helper used by both truncate() and clipCustomAttribute().
|
|
67
67
|
// Finds the longest code-point prefix of `s` whose UTF-8 byte length fits
|
|
68
68
|
// within `maxBytes`, then appends '...'. Called only when the string is
|
|
69
69
|
// already known to exceed `maxBytes`.
|
|
@@ -114,7 +114,7 @@ function truncate(s) {
|
|
|
114
114
|
// on top of that.
|
|
115
115
|
const CUSTOM_ATTR_MAX_HS_BYTES = 256;
|
|
116
116
|
function clipCustomAttribute(value, options) {
|
|
117
|
-
//
|
|
117
|
+
// Booleans pass through alongside strings and numbers.
|
|
118
118
|
if (typeof value !== 'string')
|
|
119
119
|
return value;
|
|
120
120
|
const maxBytes = options?.highSecurity === true ? CUSTOM_ATTR_MAX_HS_BYTES : NR_VALUE_MAX_BYTES;
|
|
@@ -147,7 +147,7 @@ function clipCustomAttribute(value, options) {
|
|
|
147
147
|
* spelling fix).
|
|
148
148
|
*/
|
|
149
149
|
// Typed as Record<AiProvider, string> so a new AiProvider value causes a
|
|
150
|
-
// compile error until a gen_ai.system mapping is added here
|
|
150
|
+
// compile error until a gen_ai.system mapping is added here.
|
|
151
151
|
const PROVIDER_TO_GENAI_SYSTEM = {
|
|
152
152
|
anthropic: 'anthropic',
|
|
153
153
|
google: 'gcp.gemini',
|
|
@@ -165,7 +165,7 @@ const PROVIDER_TO_GENAI_SYSTEM = {
|
|
|
165
165
|
* the wire payload — this is the OTel-recommended behavior for
|
|
166
166
|
* unrecognized operations.
|
|
167
167
|
*/
|
|
168
|
-
// Partial<Record<...>> so unrecognized methods fall through cleanly
|
|
168
|
+
// Partial<Record<...>> so unrecognized methods fall through cleanly.
|
|
169
169
|
// Unlike PROVIDER_TO_GENAI_SYSTEM (which uses non-Partial Record to enforce exhaustiveness),
|
|
170
170
|
// coverage here is intentionally partial — adding a new AiRequestMethod without an
|
|
171
171
|
// entry produces no compile error; the attribute is simply omitted per the OTel fallthrough
|
|
@@ -177,7 +177,7 @@ const METHOD_TO_GENAI_OPERATION = {
|
|
|
177
177
|
'models.generateContentStream': 'generate_content',
|
|
178
178
|
'models.embedContent': 'embeddings',
|
|
179
179
|
'chat.completions.create': 'chat',
|
|
180
|
-
//
|
|
180
|
+
// OpenAI Node SDK: `client.embeddings.create({...})`.
|
|
181
181
|
'embeddings.create': 'embeddings',
|
|
182
182
|
converse: 'chat',
|
|
183
183
|
'converse-stream': 'chat',
|
|
@@ -185,7 +185,7 @@ const METHOD_TO_GENAI_OPERATION = {
|
|
|
185
185
|
'chat.stream': 'chat',
|
|
186
186
|
chat: 'chat',
|
|
187
187
|
chatStream: 'chat',
|
|
188
|
-
//
|
|
188
|
+
// Cohere Node SDK: `client.embed(...)`.
|
|
189
189
|
embed: 'embeddings',
|
|
190
190
|
};
|
|
191
191
|
/**
|
|
@@ -202,7 +202,7 @@ const METHOD_TO_GENAI_OPERATION = {
|
|
|
202
202
|
* - Change a field's type or unit: bump.
|
|
203
203
|
* - Change a field's semantic meaning: bump.
|
|
204
204
|
*
|
|
205
|
-
* The
|
|
205
|
+
* The metric-API summary migration is an analogous (separate) wire
|
|
206
206
|
* change and is covered by NR's metric `type` field, not this schema version.
|
|
207
207
|
*/
|
|
208
208
|
export const EVENT_SCHEMA_VERSION = 1;
|
|
@@ -269,7 +269,7 @@ export function aiResponseToNrEvent(event, options) {
|
|
|
269
269
|
totalTokens: event.totalTokens,
|
|
270
270
|
'nr.appName': event['nr.appName'],
|
|
271
271
|
};
|
|
272
|
-
//
|
|
272
|
+
// Emit `nr.entityGuid` so AiResponse events route to the
|
|
273
273
|
// owning NR entity surface, matching `aiRequestToNrEvent`. Without this the
|
|
274
274
|
// factory's entityGuid input was silently dropped at serialization time
|
|
275
275
|
// even though the AiResponse interface declared the field.
|
|
@@ -299,7 +299,7 @@ export function aiResponseToNrEvent(event, options) {
|
|
|
299
299
|
data['cost.totalUsd'] = event.costTotalUsd;
|
|
300
300
|
if (event.error !== null) {
|
|
301
301
|
data['error.type'] = truncate(event.error.type);
|
|
302
|
-
//
|
|
302
|
+
// In high-security mode, drop error.message (may contain verbatim
|
|
303
303
|
// prompt fragments). error.type + error.statusCode still surface enough
|
|
304
304
|
// signal for triage without leaking user content via the error path.
|
|
305
305
|
if (options?.highSecurity !== true) {
|
|
@@ -318,13 +318,13 @@ export function aiResponseToNrEvent(event, options) {
|
|
|
318
318
|
// Anthropic: inputTokens = fresh only; cache tokens are disjoint → sum all.
|
|
319
319
|
// Gemini / OpenAI: inputTokens already includes cached content (the cache
|
|
320
320
|
// tokens are a SUBSET of inputTokens, not separate) → using inputTokens
|
|
321
|
-
// alone is correct; adding cacheReadTokens would double-count
|
|
321
|
+
// alone is correct; adding cacheReadTokens would double-count.
|
|
322
322
|
// Bedrock, Mistral, Cohere: no cache token overlap → same as Anthropic.
|
|
323
323
|
const otelInputTokens = event.provider === 'google' || event.provider === 'openai'
|
|
324
324
|
? event.inputTokens
|
|
325
325
|
: event.inputTokens + event.cacheReadTokens + event.cacheCreationTokens;
|
|
326
326
|
data['gen_ai.usage.input_tokens'] = otelInputTokens;
|
|
327
|
-
//
|
|
327
|
+
// gen_ai.usage.output_tokens semantics differ by provider.
|
|
328
328
|
//
|
|
329
329
|
// Anthropic / Google: thinkingTokens is DISJOINT from outputTokens
|
|
330
330
|
// (extended-thinking and thought-summary tokens are separate) → add both.
|
|
@@ -359,7 +359,7 @@ export function aiMessageToNrEvent(event, options) {
|
|
|
359
359
|
sequence: event.sequence,
|
|
360
360
|
'nr.appName': event['nr.appName'],
|
|
361
361
|
};
|
|
362
|
-
//
|
|
362
|
+
// Emit `nr.entityGuid` so AiMessage events route to the
|
|
363
363
|
// owning NR entity surface, matching `aiRequestToNrEvent` / `aiResponseToNrEvent`.
|
|
364
364
|
if (event['nr.entityGuid'] !== null)
|
|
365
365
|
data['nr.entityGuid'] = event['nr.entityGuid'];
|
|
@@ -367,7 +367,7 @@ export function aiMessageToNrEvent(event, options) {
|
|
|
367
367
|
return data;
|
|
368
368
|
}
|
|
369
369
|
/**
|
|
370
|
-
*
|
|
370
|
+
* Dotted-key naming convention for the four newer
|
|
371
371
|
* agent-shaped event types (`AiAgentTaskSummary`, `AiAntiPattern`,
|
|
372
372
|
* `AiAgentMessage`, `AiContextReset`). These serializers emit attributes
|
|
373
373
|
* with a `<namespace>.<field>` shape (e.g. `ai.agent.task_duration_ms`,
|
|
@@ -389,7 +389,7 @@ export function aiMessageToNrEvent(event, options) {
|
|
|
389
389
|
* fields to these event types should follow it for consistency, but the
|
|
390
390
|
* library does not validate the shape at runtime.
|
|
391
391
|
*/
|
|
392
|
-
// NOTE
|
|
392
|
+
// NOTE: The four agent-shaped event types below do not emit gen_ai.*
|
|
393
393
|
// OTel SemConv attributes (e.g. gen_ai.system) because they lack a `provider`
|
|
394
394
|
// field. Adding provider to these types is a post-0.1.0 task; until then,
|
|
395
395
|
// NRQL queries on gen_ai.* will not return these event types.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../../src/shared/events/serialize.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,eAAe,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,oBAAoB,GAAwB,IAAI,GAAG,CAAC;IACxD,WAAW;IACX,WAAW;IACX,WAAW;IACX,aAAa;IACb,OAAO;IACP,eAAe;IACf,MAAM;CACP,CAAC,CAAC;AAEH,SAAS,mBAAmB,CAAC,GAAW;IACtC,IAAI,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAS,qBAAqB,CAC5B,IAAiB,EACjB,MAAiD,EACjD,OAAq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AAC;QAC9C,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;KAClC,CAAC;IAEF,IAAI,KAAK,CAAC,eAAe,CAAC,KAAK,IAAI;QAAE,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;IACpF,IAAI,KAAK,CAAC,QAAQ;QAAE,IAAI,CAAC,eAAe,CAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACrF,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS;QAAE,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IAE7E,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,gBAAgB,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAErF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -10,7 +10,7 @@ export interface EventBufferOptions {
|
|
|
10
10
|
* observability data feeding alerts and dashboards — a user looking at New
|
|
11
11
|
* Relic during a latency spike wants the last 30 seconds, not a uniform random
|
|
12
12
|
* sample of the last hour. It also matches the head-drop policy used by the
|
|
13
|
-
* scheduler's retry buffers
|
|
13
|
+
* scheduler's retry buffers, so callers see consistent behavior across
|
|
14
14
|
* the harvest pipeline.
|
|
15
15
|
*
|
|
16
16
|
* Each drop increments `dropCount`. `HarvestScheduler` drains this counter
|
|
@@ -37,7 +37,7 @@ export declare class EventBuffer {
|
|
|
37
37
|
/**
|
|
38
38
|
* Return the number of events added since the last call, resetting the
|
|
39
39
|
* counter to 0. Mirrors `drainDropCount()` so callers that need per-flush
|
|
40
|
-
* production rate can use both symmetrically
|
|
40
|
+
* production rate can use both symmetrically.
|
|
41
41
|
*/
|
|
42
42
|
drainAddCount(): number;
|
|
43
43
|
/**
|
|
@@ -7,7 +7,7 @@ const DEFAULT_MAX_SIZE = 1000;
|
|
|
7
7
|
* observability data feeding alerts and dashboards — a user looking at New
|
|
8
8
|
* Relic during a latency spike wants the last 30 seconds, not a uniform random
|
|
9
9
|
* sample of the last hour. It also matches the head-drop policy used by the
|
|
10
|
-
* scheduler's retry buffers
|
|
10
|
+
* scheduler's retry buffers, so callers see consistent behavior across
|
|
11
11
|
* the harvest pipeline.
|
|
12
12
|
*
|
|
13
13
|
* Each drop increments `dropCount`. `HarvestScheduler` drains this counter
|
|
@@ -21,7 +21,7 @@ export class EventBuffer {
|
|
|
21
21
|
droppedSinceDrain;
|
|
22
22
|
constructor(options) {
|
|
23
23
|
const maxSize = options?.maxSize ?? DEFAULT_MAX_SIZE;
|
|
24
|
-
//
|
|
24
|
+
// Validate maxSize at construction. Pre-fix, values like
|
|
25
25
|
// 0 / negative / NaN turned the buffer into a silent /dev/null because the
|
|
26
26
|
// overflow comparison `buffer.length >= maxSize` is never true (NaN) or
|
|
27
27
|
// immediately true with no event ever stored (0 / negative). All
|
|
@@ -64,7 +64,7 @@ export class EventBuffer {
|
|
|
64
64
|
/**
|
|
65
65
|
* Return the number of events added since the last call, resetting the
|
|
66
66
|
* counter to 0. Mirrors `drainDropCount()` so callers that need per-flush
|
|
67
|
-
* production rate can use both symmetrically
|
|
67
|
+
* production rate can use both symmetrically.
|
|
68
68
|
*/
|
|
69
69
|
drainAddCount() {
|
|
70
70
|
const n = this.totalSeen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-buffer.js","sourceRoot":"","sources":["../../../src/shared/harvest/event-buffer.ts"],"names":[],"mappings":"AAMA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,WAAW;IACL,OAAO,CAAS;IACzB,MAAM,CAAgB;IACtB,S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,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,OAAO,CAAC,OAAO,CAAC;IAClB,CAAC;IAED,KAAK;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,2EAA2E;QAC3E,+EAA+E;QAC/E,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACH,aAAa;QACX,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,OAAO,CAAC,CAAC;IACX,CAAC;IAED;;;;OAIG;IACH,cAAc;QACZ,MAAM,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAC3B,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACH,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;CACF"}
|
|
@@ -22,7 +22,7 @@ export interface HarvestSchedulerOptions {
|
|
|
22
22
|
/**
|
|
23
23
|
* Maximum number of metric snapshots kept in the per-transport retry
|
|
24
24
|
* buffer when a metric harvest fails. Defaults to 500.
|
|
25
|
-
* Each snapshot represents one (name, attributes) bucket; with
|
|
25
|
+
* Each snapshot represents one (name, attributes) bucket; with the
|
|
26
26
|
* summary-metric wire format, the corresponding NrMetric count is also
|
|
27
27
|
* one per snapshot.
|
|
28
28
|
*/
|
|
@@ -49,8 +49,7 @@ export interface HarvestSchedulerOptions {
|
|
|
49
49
|
* shutdown path is missed (CLI tools, short-lived scripts).
|
|
50
50
|
*
|
|
51
51
|
* The `beforeExit` fallback is best-effort: Node may exit before its
|
|
52
|
-
* fire-and-forget `void this.stop()` finishes, so events may be lost
|
|
53
|
-
*.
|
|
52
|
+
* fire-and-forget `void this.stop()` finishes, so events may be lost.
|
|
54
53
|
*/
|
|
55
54
|
readonly allowProcessExit?: boolean;
|
|
56
55
|
}
|
|
@@ -98,7 +97,7 @@ export declare class HarvestScheduler {
|
|
|
98
97
|
*
|
|
99
98
|
* Returns `true` when the sample was accepted into a bucket, and `false`
|
|
100
99
|
* when it was rejected (non-finite value or invalid attribute type) per
|
|
101
|
-
* the
|
|
100
|
+
* the strict validation contract. Existing
|
|
102
101
|
* callers that ignore the return value see unchanged behavior.
|
|
103
102
|
*/
|
|
104
103
|
recordMetric(name: string, value: number, attributes?: Record<string, MetricAttributeValue>): boolean;
|
|
@@ -183,7 +182,7 @@ export declare class HarvestScheduler {
|
|
|
183
182
|
* with one entry per unique key. Uses a throwaway {@link MetricAggregator}
|
|
184
183
|
* as the merge engine so the bucket-key logic is not duplicated here.
|
|
185
184
|
*
|
|
186
|
-
*
|
|
185
|
+
* Without this re-merge, a failed-send retry plus a
|
|
187
186
|
* fresh harvest hitting the same metric+attrs would produce two wire
|
|
188
187
|
* data points with different timestamps, breaking downstream NRQL
|
|
189
188
|
* aggregation that expects one bucket per harvest interval.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harvest-scheduler.d.ts","sourceRoot":"","sources":["../../../src/shared/harvest/harvest-scheduler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAIpE,OAAO,KAAK,EAAE,oBAAoB,EAAkB,MAAM,wBAA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AAO;IAIV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,KAAK,IAAI,IAAI;IAkEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAuBb,MAAM;YAoEN,aAAa;IAW3B,OAAO,CAAC,gBAAgB;YASV,eAAe;YAkDf,cAAc;YA0Bd,gBAAgB;YA0BhB,cAAc;YAQd,gBAAgB;IAgE9B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,cAAc;YAYR,eAAe;YAkCf,iBAAiB;IAiD/B,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,kBAAkB;CAY3B"}
|
|
@@ -4,8 +4,8 @@ import { EventBuffer } from './event-buffer.js';
|
|
|
4
4
|
import { MetricAggregator, snapshotsToNrMetrics } from './metric-aggregator.js';
|
|
5
5
|
const logger = createLogger('harvest');
|
|
6
6
|
/**
|
|
7
|
-
* Generate an 8-hex-char correlation ID for one harvest cycle
|
|
8
|
-
|
|
7
|
+
* Generate an 8-hex-char correlation ID for one harvest cycle.
|
|
8
|
+
* Stamped via `logger.child({ harvestId })` so every
|
|
9
9
|
* log line emitted during the cycle — including from `sendEvents*` /
|
|
10
10
|
* `sendMetrics*` helpers — carries the same ID. Operators can pivot on
|
|
11
11
|
* `harvestId` in stderr to trace one cycle through batch send, retry,
|
|
@@ -33,7 +33,7 @@ export class HarvestScheduler {
|
|
|
33
33
|
metricIntervalId = null;
|
|
34
34
|
running = false;
|
|
35
35
|
stopPromise = null;
|
|
36
|
-
//
|
|
36
|
+
// Track in-flight harvests so (a) overlapping
|
|
37
37
|
// interval ticks don't double-fire harvests on the same buffers (a slow
|
|
38
38
|
// network can otherwise produce N concurrent fetches if interval < latency),
|
|
39
39
|
// and (b) stop() can await any harvest already in progress before kicking
|
|
@@ -45,7 +45,7 @@ export class HarvestScheduler {
|
|
|
45
45
|
// harvest to re-send the batch to *both* transports, duplicating on OTLP.
|
|
46
46
|
retryNrEventBatch = [];
|
|
47
47
|
retryOtlpEventBatch = [];
|
|
48
|
-
//
|
|
48
|
+
// Retry buffers hold pre-explosion bucket snapshots, not
|
|
49
49
|
// exploded NrMetric[] wire form. On the next harvest the failed snapshots
|
|
50
50
|
// are merged back into the aggregator (via a temporary one, per transport)
|
|
51
51
|
// so that overlapping (name, attributes) keys collapse into a single
|
|
@@ -72,7 +72,7 @@ export class HarvestScheduler {
|
|
|
72
72
|
this.transport = options.transport ?? 'nr-events-api';
|
|
73
73
|
this.allowProcessExit = options.allowProcessExit ?? false;
|
|
74
74
|
// Warn when the transport configuration requires an OTLP component that
|
|
75
|
-
// was not provided — events/metrics would be silently dropped
|
|
75
|
+
// was not provided — events/metrics would be silently dropped.
|
|
76
76
|
const wantOtlp = this.transport === 'otlp' || this.transport === 'both';
|
|
77
77
|
if (wantOtlp && !this.otlpEventBridge) {
|
|
78
78
|
logger.warn('HarvestScheduler: transport includes otlp but otlpEventBridge is not configured — OTLP events will be silently dropped');
|
|
@@ -82,7 +82,7 @@ export class HarvestScheduler {
|
|
|
82
82
|
}
|
|
83
83
|
this.eventBuffer = new EventBuffer({ maxSize: options.maxEventBufferSize });
|
|
84
84
|
this.metricAggregator = new MetricAggregator();
|
|
85
|
-
//
|
|
85
|
+
// maxRetryEvents defaults to maxEventBufferSize when
|
|
86
86
|
// not specified, preserving prior behavior. Operators that need a
|
|
87
87
|
// deeper retry cap (bursty failures, long downstream outages) can set
|
|
88
88
|
// it independently — peak in-memory event count is then roughly
|
|
@@ -112,7 +112,7 @@ export class HarvestScheduler {
|
|
|
112
112
|
*
|
|
113
113
|
* Returns `true` when the sample was accepted into a bucket, and `false`
|
|
114
114
|
* when it was rejected (non-finite value or invalid attribute type) per
|
|
115
|
-
* the
|
|
115
|
+
* the strict validation contract. Existing
|
|
116
116
|
* callers that ignore the return value see unchanged behavior.
|
|
117
117
|
*/
|
|
118
118
|
recordMetric(name, value, attributes = {}) {
|
|
@@ -158,7 +158,7 @@ export class HarvestScheduler {
|
|
|
158
158
|
logger.warn('HarvestScheduler already running');
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
|
-
//
|
|
161
|
+
// Refuse start() while a previous stop() is still
|
|
162
162
|
// resolving. `running` flips to false at the top of doStop(), so without
|
|
163
163
|
// this guard a fast-cycling consumer could call start() before stop()
|
|
164
164
|
// has finished tearing down intervals / removing the beforeExit
|
|
@@ -180,7 +180,7 @@ export class HarvestScheduler {
|
|
|
180
180
|
if (this.inFlightEventHarvest)
|
|
181
181
|
return;
|
|
182
182
|
// .catch prevents unhandled-rejection process crash if the promise
|
|
183
|
-
// rejects unexpectedly before reaching its internal try/catch
|
|
183
|
+
// rejects unexpectedly before reaching its internal try/catch.
|
|
184
184
|
this.harvestEvents().catch((err) => {
|
|
185
185
|
logger.error('Unexpected error in event harvest interval', {
|
|
186
186
|
error: err instanceof Error ? err.message : String(err),
|
|
@@ -197,7 +197,7 @@ export class HarvestScheduler {
|
|
|
197
197
|
});
|
|
198
198
|
}, this.metricHarvestIntervalMs);
|
|
199
199
|
if (this.allowProcessExit) {
|
|
200
|
-
//
|
|
200
|
+
// Opt-in path for short-lived CLI tools. unref()'d
|
|
201
201
|
// intervals don't hold the loop open, and beforeExit is registered as
|
|
202
202
|
// a best-effort final-flush attempt. Both are best-effort: Node can
|
|
203
203
|
// exit before the fire-and-forget stop() finishes, so events may be
|
|
@@ -246,14 +246,14 @@ export class HarvestScheduler {
|
|
|
246
246
|
if (this.stopPromise)
|
|
247
247
|
return this.stopPromise;
|
|
248
248
|
// Do NOT short-circuit when !this.running — a caller who added events
|
|
249
|
-
// without ever calling start() should still get a final flush
|
|
249
|
+
// without ever calling start() should still get a final flush.
|
|
250
250
|
// The interval teardown steps in doStop() are all safe no-ops when the
|
|
251
251
|
// intervals were never started.
|
|
252
|
-
//
|
|
252
|
+
// Drive doStop to completion through stopPromise so
|
|
253
253
|
// concurrent stop() callers coalesce, then clear stopPromise once it
|
|
254
254
|
// resolves so a subsequent start() can pass the "no in-flight stop"
|
|
255
255
|
// guard. Without the clear, a restart-after-stop sequence would be
|
|
256
|
-
// refused (the
|
|
256
|
+
// refused (the guard sees a non-null stopPromise from the prior
|
|
257
257
|
// session and treats the next start() as racing an in-flight stop).
|
|
258
258
|
const promise = this.doStop().finally(() => {
|
|
259
259
|
// Only clear if the promise we registered is still the current one —
|
|
@@ -278,7 +278,7 @@ export class HarvestScheduler {
|
|
|
278
278
|
if (this.allowProcessExit) {
|
|
279
279
|
process.removeListener('beforeExit', this.boundBeforeExit);
|
|
280
280
|
}
|
|
281
|
-
//
|
|
281
|
+
// Wait for any harvest started by an interval tick
|
|
282
282
|
// to complete before we initiate the final flush. Without this, stop()'s
|
|
283
283
|
// own harvestEvents call could race the in-flight one (the re-entrancy
|
|
284
284
|
// guard would make it a no-op, returning the existing promise — but if
|
|
@@ -341,13 +341,13 @@ export class HarvestScheduler {
|
|
|
341
341
|
return ms;
|
|
342
342
|
}
|
|
343
343
|
async doHarvestEvents() {
|
|
344
|
-
//
|
|
344
|
+
// Scoped child logger stamps `harvestId` on every
|
|
345
345
|
// log line emitted during this cycle (overflow, retry, requeue,
|
|
346
346
|
// OTLP-export failures). Operators searching stderr for one harvest's
|
|
347
347
|
// story have a single pivot.
|
|
348
348
|
const harvestLog = logger.child({ harvestId: newHarvestId(), scope: 'events' });
|
|
349
349
|
const fresh = this.eventBuffer.flush();
|
|
350
|
-
//
|
|
350
|
+
// Surface event-buffer head-drops as a self-monitoring metric so
|
|
351
351
|
// overflow loss is visible in the consumer's own NR dashboards. Drained
|
|
352
352
|
// once per harvest, paired with a single warn log.
|
|
353
353
|
const dropped = this.eventBuffer.drainDropCount();
|
|
@@ -358,7 +358,7 @@ export class HarvestScheduler {
|
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
360
|
// Drain the add counter each cycle so totalAdded represents adds-since-
|
|
361
|
-
// last-flush
|
|
361
|
+
// last-flush. Not emitted as a metric today; wired here so a
|
|
362
362
|
// future nr.ai.added_events metric reads the correct per-interval value.
|
|
363
363
|
this.eventBuffer.drainAddCount();
|
|
364
364
|
const wantNr = this.transport === 'nr-events-api' || this.transport === 'both';
|
|
@@ -392,7 +392,7 @@ export class HarvestScheduler {
|
|
|
392
392
|
this.requeueNrEvents(batch, log);
|
|
393
393
|
}
|
|
394
394
|
else {
|
|
395
|
-
//
|
|
395
|
+
// Debug-level success log so operators tailing stderr can
|
|
396
396
|
// distinguish "harvest completed cleanly with N events" from
|
|
397
397
|
// "harvest never ran". Debug (not info) keeps the steady-state
|
|
398
398
|
// happy-path output quiet at default log levels.
|
|
@@ -412,15 +412,15 @@ export class HarvestScheduler {
|
|
|
412
412
|
try {
|
|
413
413
|
if (this.otlpEventBridge) {
|
|
414
414
|
this.otlpEventBridge.sendEvents(batch);
|
|
415
|
-
//
|
|
415
|
+
// Paired with the NR-side success log. Note: this only
|
|
416
416
|
// confirms enqueue into the OTel BatchLogRecordProcessor, not
|
|
417
417
|
// export — the SDK decides when the wire send actually fires.
|
|
418
418
|
log.debug('Enqueued events to OTLP bridge', { batchSize: batch.length });
|
|
419
419
|
}
|
|
420
420
|
else {
|
|
421
|
-
// Bridge absent: the constructor already warned once
|
|
421
|
+
// Bridge absent: the constructor already warned once. Warn
|
|
422
422
|
// at debug here so repeated harvests are traceable without flooding
|
|
423
|
-
// stderr
|
|
423
|
+
// stderr.
|
|
424
424
|
log.debug('OTLP event bridge not configured — batch discarded', {
|
|
425
425
|
batchSize: batch.length,
|
|
426
426
|
});
|
|
@@ -444,13 +444,13 @@ export class HarvestScheduler {
|
|
|
444
444
|
return this.inFlightMetricHarvest;
|
|
445
445
|
}
|
|
446
446
|
async doHarvestMetrics() {
|
|
447
|
-
//
|
|
447
|
+
// Scoped child logger stamps a `harvestId` on every
|
|
448
448
|
// log line emitted during this metric harvest cycle.
|
|
449
449
|
const harvestLog = logger.child({ harvestId: newHarvestId(), scope: 'metrics' });
|
|
450
|
-
//
|
|
450
|
+
// Self-monitoring: drain MetricAggregator's
|
|
451
451
|
// drop counter and emit it as a metric so non-finite-value rejections
|
|
452
452
|
// and invalid-attribute rejections are visible in the consumer's own
|
|
453
|
-
// NR dashboards. Mirrors
|
|
453
|
+
// NR dashboards. Mirrors the `nr.ai.dropped_events` pattern from
|
|
454
454
|
// doHarvestEvents. Note this is recorded BEFORE harvestSnapshots() so
|
|
455
455
|
// the dropped_metrics gauge itself flows through this same harvest tick
|
|
456
456
|
// (one extra bucket, one extra summary on the wire).
|
|
@@ -463,11 +463,11 @@ export class HarvestScheduler {
|
|
|
463
463
|
source: 'metric_aggregator',
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
|
-
//
|
|
466
|
+
// Drain the aggregator as snapshots, then per
|
|
467
467
|
// transport: merge the previous failed-send snapshots with the fresh
|
|
468
468
|
// ones (so duplicate name+attrs buckets accumulate), then explode to
|
|
469
469
|
// wire form. Each transport gets its own merged set so a NR-only
|
|
470
|
-
// failure doesn't double-send to OTLP
|
|
470
|
+
// failure doesn't double-send to OTLP.
|
|
471
471
|
const fresh = this.metricAggregator.harvestSnapshots();
|
|
472
472
|
const wantNr = this.transport === 'nr-events-api' || this.transport === 'both';
|
|
473
473
|
const wantOtlp = this.transport === 'otlp' || this.transport === 'both';
|
|
@@ -495,7 +495,7 @@ export class HarvestScheduler {
|
|
|
495
495
|
* with one entry per unique key. Uses a throwaway {@link MetricAggregator}
|
|
496
496
|
* as the merge engine so the bucket-key logic is not duplicated here.
|
|
497
497
|
*
|
|
498
|
-
*
|
|
498
|
+
* Without this re-merge, a failed-send retry plus a
|
|
499
499
|
* fresh harvest hitting the same metric+attrs would produce two wire
|
|
500
500
|
* data points with different timestamps, breaking downstream NRQL
|
|
501
501
|
* aggregation that expects one bucket per harvest interval.
|
|
@@ -521,7 +521,7 @@ export class HarvestScheduler {
|
|
|
521
521
|
this.requeueNrMetrics(snapshots, log);
|
|
522
522
|
}
|
|
523
523
|
else {
|
|
524
|
-
//
|
|
524
|
+
// Debug-level success log so operators tailing stderr can
|
|
525
525
|
// distinguish "harvest completed cleanly with N metrics" from
|
|
526
526
|
// "harvest never ran". Includes both the wire batch count and
|
|
527
527
|
// the underlying snapshot count so a future cardinality-explosion
|
|
@@ -545,14 +545,14 @@ export class HarvestScheduler {
|
|
|
545
545
|
try {
|
|
546
546
|
if (this.otlpTransport) {
|
|
547
547
|
await this.otlpTransport.exportMetrics(batch);
|
|
548
|
-
//
|
|
548
|
+
// Paired with the NR-side success log.
|
|
549
549
|
log.debug('Sent metrics to OTLP', {
|
|
550
550
|
batchSize: batch.length,
|
|
551
551
|
snapshotCount: snapshots.length,
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
554
|
else {
|
|
555
|
-
// Transport absent: the constructor already warned once
|
|
555
|
+
// Transport absent: the constructor already warned once.
|
|
556
556
|
log.debug('OTLP transport not configured — metric batch discarded', {
|
|
557
557
|
batchSize: batch.length,
|
|
558
558
|
});
|
|
@@ -560,7 +560,7 @@ export class HarvestScheduler {
|
|
|
560
560
|
}
|
|
561
561
|
catch (err) {
|
|
562
562
|
const message = err instanceof Error ? err.message : String(err);
|
|
563
|
-
//
|
|
563
|
+
// OtlpTransport.exportMetrics throws { code: 'OTLP_BAD_REQUEST' } for
|
|
564
564
|
// HTTP 400 to signal that the payload is permanently malformed and will always
|
|
565
565
|
// fail. Drop the batch instead of requeuing so it does not occupy the retry
|
|
566
566
|
// buffer indefinitely. All other errors are retried normally.
|
|
@@ -581,7 +581,7 @@ export class HarvestScheduler {
|
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
// NOTE
|
|
584
|
+
// NOTE: the self-monitoring metrics recorded below (nr.ai.dropped_events,
|
|
585
585
|
// nr.ai.dropped_metrics) are written to metricAggregator AFTER the current
|
|
586
586
|
// harvest cycle has already drained it via harvestSnapshots(). They will not
|
|
587
587
|
// be sent until the NEXT harvest cycle — operators see overflow counts one
|
|
@@ -589,15 +589,15 @@ export class HarvestScheduler {
|
|
|
589
589
|
// mistaken for a bug.
|
|
590
590
|
requeueNrEvents(batch, log = logger) {
|
|
591
591
|
// for-of push avoids two hazards: (a) the O(n+m) intermediate array from
|
|
592
|
-
// [...old, ...new]
|
|
593
|
-
// batch.length exceeds the engine's argument-count limit (~65k)
|
|
592
|
+
// [...old, ...new], and (b) push(...batch) throwing RangeError when
|
|
593
|
+
// batch.length exceeds the engine's argument-count limit (~65k).
|
|
594
594
|
for (const e of batch)
|
|
595
595
|
this.retryNrEventBatch.push(e);
|
|
596
596
|
if (this.retryNrEventBatch.length > this.maxRetryEvents) {
|
|
597
597
|
const dropped = this.retryNrEventBatch.length - this.maxRetryEvents;
|
|
598
598
|
this.retryNrEventBatch.splice(0, dropped);
|
|
599
599
|
log.warn('NR event retry buffer overflow — oldest entries dropped', { dropped });
|
|
600
|
-
// Surface as self-monitoring metric so NR dashboards show retry-buffer drops
|
|
600
|
+
// Surface as self-monitoring metric so NR dashboards show retry-buffer drops.
|
|
601
601
|
this.metricAggregator.record('nr.ai.dropped_events', dropped, {
|
|
602
602
|
source: 'retry_buffer',
|
|
603
603
|
transport: 'nr-events-api',
|