@spinajs/log-source-graphana-loki 2.0.481 → 2.0.482
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/lib/cjs/index.d.ts +50 -14
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +164 -64
- package/lib/cjs/index.js.map +1 -1
- package/lib/mjs/index.d.ts +50 -14
- package/lib/mjs/index.d.ts.map +1 -1
- package/lib/mjs/index.js +163 -65
- package/lib/mjs/index.js.map +1 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.mjs.tsbuildinfo +1 -1
- package/package.json +12 -12
package/lib/mjs/index.js
CHANGED
|
@@ -11,93 +11,168 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
/* eslint-disable security/detect-object-injection */
|
|
12
12
|
import { format } from "@spinajs/configuration-common";
|
|
13
13
|
import { Injectable, PerInstanceCheck } from "@spinajs/di";
|
|
14
|
-
import { Log, LogTarget, Logger } from "@spinajs/log";
|
|
14
|
+
import { Log, LogTarget, Logger, BatchQueue } from "@spinajs/log";
|
|
15
15
|
import axios from "axios";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
import { BackoffType, ResiliencePipelineBuilder, TimeSpan } from "@spinajs/util";
|
|
17
|
+
/**
|
|
18
|
+
* HTTP status codes worth retrying against Loki: rate limiting and transient
|
|
19
|
+
* upstream / gateway failures.
|
|
20
|
+
*/
|
|
21
|
+
const RETRYABLE_STATUS = new Set([429, 502, 503, 504]);
|
|
22
|
+
/**
|
|
23
|
+
* Decide whether a failed Loki push is worth retrying.
|
|
24
|
+
*
|
|
25
|
+
* Retryable: any error without an HTTP response ( network / timeout / DNS, eg.
|
|
26
|
+
* ECONNREFUSED / ETIMEDOUT / ECONNRESET / EAI_AGAIN ), or an HTTP response with
|
|
27
|
+
* status 429 / 502 / 503 / 504. Everything else ( 4xx client errors like 400 /
|
|
28
|
+
* 401 / 403 / 404, and any other status ) is treated as a permanent error that
|
|
29
|
+
* must surface rather than loop forever.
|
|
30
|
+
*/
|
|
31
|
+
export function isRetryableLokiError(error) {
|
|
32
|
+
const status = error?.response?.status;
|
|
33
|
+
// No HTTP response -> network / timeout / DNS failure ( axios reports these
|
|
34
|
+
// without a `.response`, carrying codes like ECONNREFUSED / ETIMEDOUT /
|
|
35
|
+
// ECONNRESET / EAI_AGAIN ) -> retryable.
|
|
36
|
+
if (status === undefined) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
return RETRYABLE_STATUS.has(status);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Read a `Retry-After` header from a Loki error response and return the delay in
|
|
43
|
+
* milliseconds. Supports both the numeric ( delta-seconds ) and HTTP-date forms.
|
|
44
|
+
* Returns `undefined` when there is no usable header.
|
|
45
|
+
*/
|
|
46
|
+
export function retryAfterMs(error) {
|
|
47
|
+
const err = error;
|
|
48
|
+
const headers = err?.response?.headers;
|
|
49
|
+
const raw = headers?.["retry-after"];
|
|
50
|
+
if (raw === undefined || raw === null) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
const value = Array.isArray(raw) ? raw[0] : raw;
|
|
54
|
+
// numeric delta-seconds ( either a real number or a numeric string )
|
|
55
|
+
const asNumber = typeof value === "number" ? value : Number(value);
|
|
56
|
+
if (typeof value !== "boolean" && !Number.isNaN(asNumber) && `${value}`.trim() !== "") {
|
|
57
|
+
return Math.max(0, asNumber * 1000);
|
|
58
|
+
}
|
|
59
|
+
// HTTP-date form
|
|
60
|
+
const asDate = Date.parse(String(value));
|
|
61
|
+
if (!Number.isNaN(asDate)) {
|
|
62
|
+
return Math.max(0, asDate - Date.now());
|
|
63
|
+
}
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
22
66
|
// we mark per instance check becouse we can have multiple file targes
|
|
23
67
|
// for different files/paths/logs but we dont want to create every time writer for same.
|
|
24
68
|
let GraphanaLokiLogTarget = class GraphanaLokiLogTarget extends LogTarget {
|
|
25
69
|
constructor(options) {
|
|
26
70
|
super(options);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Set true when the queue overflows maxBufferSize, so the drop warning is
|
|
73
|
+
* emitted ONCE per overflow episode and reset when a flush succeeds.
|
|
74
|
+
*/
|
|
75
|
+
this.Overflowed = false;
|
|
76
|
+
// Config-driven targets ( resolved through the logger config ) nest their
|
|
77
|
+
// settings under an `options` sub-object ( like FileTarget ), while direct
|
|
78
|
+
// construction passes them flat. Hoist any nested options onto this.Options
|
|
79
|
+
// at highest precedence so both forms resolve the same flat reads below.
|
|
80
|
+
const nested = (options?.options ?? {});
|
|
30
81
|
this.Options = Object.assign({
|
|
31
82
|
interval: 3000,
|
|
32
83
|
bufferSize: 10,
|
|
84
|
+
maxBufferSize: 1000,
|
|
33
85
|
timeout: 1000,
|
|
34
|
-
}, this.Options);
|
|
86
|
+
}, this.Options, nested);
|
|
35
87
|
}
|
|
36
88
|
__checkInstance__(creationOptions) {
|
|
37
89
|
return this.Options.name === creationOptions[0].name;
|
|
38
90
|
}
|
|
39
91
|
resolve() {
|
|
92
|
+
const headers = {
|
|
93
|
+
"Content-Type": "application/json",
|
|
94
|
+
};
|
|
95
|
+
// A Loki endpoint may be unauthenticated: only attach the Basic auth header
|
|
96
|
+
// when credentials are actually configured, so a config without `auth`
|
|
97
|
+
// doesn't throw on `auth.username`.
|
|
98
|
+
if (this.Options.auth?.username) {
|
|
99
|
+
headers.Authorization = `Basic ${Buffer.from(`${this.Options.auth.username}:${this.Options.auth.password}`).toString("base64")}`;
|
|
100
|
+
}
|
|
40
101
|
this.AxiosInstance = axios.create({
|
|
41
102
|
baseURL: this.Options.host,
|
|
42
|
-
headers
|
|
43
|
-
"Content-Type": "application/json",
|
|
44
|
-
Authorization: `Basic ${Buffer.from(`${this.Options.auth.username}:${this.Options.auth.password}`).toString("base64")}`,
|
|
45
|
-
},
|
|
103
|
+
headers,
|
|
46
104
|
timeout: this.Options.timeout,
|
|
47
105
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
106
|
+
// one reusable pipeline: exponential backoff + jitter, 5 attempts, 1s..5s,
|
|
107
|
+
// honoring Retry-After and retrying only transient errors ( network + 429 /
|
|
108
|
+
// 502 / 503 / 504 ). Non-retryable errors fall straight through to .catch.
|
|
109
|
+
this.RetryPipeline = new ResiliencePipelineBuilder()
|
|
110
|
+
.addRetry({
|
|
111
|
+
MaxRetryAttempts: 5,
|
|
112
|
+
Delay: TimeSpan.fromSeconds(1),
|
|
113
|
+
MaxDelay: TimeSpan.fromSeconds(5),
|
|
114
|
+
BackoffType: BackoffType.Exponential,
|
|
115
|
+
UseJitter: true,
|
|
116
|
+
ShouldHandle: (o) => o.Error !== undefined && isRetryableLokiError(o.Error),
|
|
117
|
+
DelayGenerator: ({ Outcome }) => {
|
|
118
|
+
const ms = retryAfterMs(Outcome.Error);
|
|
119
|
+
return ms !== undefined ? TimeSpan.fromMilliseconds(ms) : undefined;
|
|
120
|
+
},
|
|
121
|
+
})
|
|
122
|
+
.build();
|
|
123
|
+
// one BatchQueue owns accumulation, the periodic flush timer and the
|
|
124
|
+
// maxQueue cap ( dropping the oldest ). The actual push happens in send().
|
|
125
|
+
this.Queue = new BatchQueue({
|
|
126
|
+
maxBatch: this.Options.bufferSize,
|
|
127
|
+
maxQueue: this.Options.maxBufferSize,
|
|
128
|
+
flushIntervalMs: this.Options.interval ?? 3000,
|
|
129
|
+
onFlush: (batch) => this.send(batch),
|
|
130
|
+
onOverflow: (droppedItems) => {
|
|
131
|
+
// emit the drop warning ONCE per overflow episode; reset on the next
|
|
132
|
+
// successful send() so a later episode warns again.
|
|
133
|
+
if (!this.Overflowed) {
|
|
134
|
+
this.Overflowed = true;
|
|
135
|
+
this.Log.warn(`Graphana loki buffer exceeded ${this.Options.maxBufferSize} entries, dropped ${droppedItems.length} oldest entries.`);
|
|
136
|
+
}
|
|
137
|
+
// spill each dropped entry to the fallback ( if a wrapper wired one ) so
|
|
138
|
+
// a durable target catches exactly what overflow discarded.
|
|
139
|
+
for (const entry of droppedItems) {
|
|
140
|
+
this.OnDropped?.(entry);
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
super.resolve();
|
|
59
145
|
}
|
|
60
146
|
write(data) {
|
|
61
147
|
if (!this.Options.enabled) {
|
|
62
148
|
return;
|
|
63
149
|
}
|
|
64
150
|
data.Variables["n_timestamp"] = new Date().getTime() * 1000000;
|
|
65
|
-
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (this.Entries.length >= this.Options.bufferSize) {
|
|
72
|
-
this.Status = TargetStatus.PENDING;
|
|
73
|
-
this.WriteEntries = [...this.WriteEntries, ...this.Entries];
|
|
74
|
-
this.Entries = [];
|
|
75
|
-
// write at end of nodejs event loop all buffered messages at once
|
|
76
|
-
setImmediate(() => {
|
|
77
|
-
this.flush();
|
|
78
|
-
});
|
|
79
|
-
}
|
|
151
|
+
// fire-and-forget: Loki did not await the buffer write before either. A
|
|
152
|
+
// size-triggered flush ( when the batch fills ) runs in the background.
|
|
153
|
+
void this.Queue.enqueue(data);
|
|
154
|
+
}
|
|
155
|
+
forceFlush() {
|
|
156
|
+
return this.Queue ? this.Queue.forceFlush() : Promise.resolve();
|
|
80
157
|
}
|
|
81
158
|
async dispose() {
|
|
82
|
-
// stop flush timer
|
|
83
|
-
|
|
84
|
-
this.WriteEntries = [...this.WriteEntries, ...this.Entries];
|
|
85
|
-
this.Entries = [];
|
|
86
|
-
// write all messages from buffer
|
|
87
|
-
this.flush();
|
|
159
|
+
// stop the flush timer and perform a final best-effort flush.
|
|
160
|
+
await this.Queue.shutdown();
|
|
88
161
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Push a single batch to Loki. Wired as the queue's `onFlush`.
|
|
164
|
+
*
|
|
165
|
+
* MUST resolve ( never reject ) so shutdown()/forceFlush() cannot reject: on a
|
|
166
|
+
* retryable-exhausted failure the batch is requeued at the front, on a
|
|
167
|
+
* non-retryable error it is dropped and surfaced via HasError/Error.
|
|
168
|
+
*/
|
|
169
|
+
async send(batch) {
|
|
94
170
|
const streams = new Map();
|
|
95
171
|
const keyFor = (x) => {
|
|
96
172
|
return [this.Options.labels.app, x.Variables.logger, x.Variables.level, ...Object.values(this.Options.labels)].join("-");
|
|
97
173
|
};
|
|
98
174
|
const valFor = (x) => [x.Variables["n_timestamp"].toString(), format(x.Variables, this.Options.layout)];
|
|
99
|
-
|
|
100
|
-
this.WriteEntries.forEach((x) => {
|
|
175
|
+
batch.forEach((x) => {
|
|
101
176
|
const key = keyFor(x);
|
|
102
177
|
const stream = streams.get(key);
|
|
103
178
|
if (!stream) {
|
|
@@ -113,17 +188,40 @@ let GraphanaLokiLogTarget = class GraphanaLokiLogTarget extends LogTarget {
|
|
|
113
188
|
}
|
|
114
189
|
stream.values.push(valFor(x));
|
|
115
190
|
});
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
this.
|
|
121
|
-
|
|
122
|
-
.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
this.
|
|
126
|
-
|
|
191
|
+
// wrap ONLY the push in the resilience pipeline: transient failures are
|
|
192
|
+
// retried inline with backoff; we reach the catch only after retries are
|
|
193
|
+
// exhausted or immediately on a non-retryable error.
|
|
194
|
+
try {
|
|
195
|
+
await this.RetryPipeline.execute(() => this.AxiosInstance.post("/loki/api/v1/push", { streams: [...streams.values()] }).then(() => undefined));
|
|
196
|
+
// successful write -> clear any previous error state
|
|
197
|
+
this.HasError = false;
|
|
198
|
+
this.Error = null;
|
|
199
|
+
// drained successfully - allow the next overflow episode to warn again
|
|
200
|
+
this.Overflowed = false;
|
|
201
|
+
this.Log.trace(`Wrote buffered messages to graphana target at url ${this.Options.host}, ${batch.length} messages.`);
|
|
202
|
+
}
|
|
203
|
+
catch (err) {
|
|
204
|
+
// reached only after retries are exhausted ( transient ) or immediately
|
|
205
|
+
// for a non-retryable error.
|
|
206
|
+
this.HasError = true;
|
|
207
|
+
this.Error = err;
|
|
208
|
+
if (isRetryableLokiError(err)) {
|
|
209
|
+
// retryable but exhausted: put the batch back at the front so the next
|
|
210
|
+
// flush retries it. The queue enforces the maxQueue cap ( dropping the
|
|
211
|
+
// oldest + onOverflow ) so the retry buffer never grows without bound.
|
|
212
|
+
this.Log.error(err, `Cannot write log messages to graphana target - retries exhausted, retaining entries for next flush.`);
|
|
213
|
+
this.Queue.requeueFront(batch);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
// permanent error ( eg. 400 malformed, 401 bad auth ): retrying forever
|
|
217
|
+
// would only hide a config problem. Drop the batch and surface it, but
|
|
218
|
+
// first spill each undelivered entry to the fallback ( if a wrapper wired
|
|
219
|
+
// one ) so a durable target catches exactly what was not delivered.
|
|
220
|
+
for (const entry of batch) {
|
|
221
|
+
this.OnDropped?.(entry);
|
|
222
|
+
}
|
|
223
|
+
this.Log.error(err, `Cannot write log messages to graphana target - dropping ${batch.length} entries because the error is non-retryable.`);
|
|
224
|
+
}
|
|
127
225
|
}
|
|
128
226
|
};
|
|
129
227
|
__decorate([
|
package/lib/mjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0CAA0C;AAC1C,qDAAqD;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAkB,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC3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