@orchesty/connector-loki 1.0.0 → 1.0.1
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/dist/package.json +4 -1
- package/package.json +4 -1
- package/CHANGELOG.md +0 -7
- package/coverage/clover.xml +0 -106
- package/coverage/coverage-final.json +0 -4
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/Batch/LokiGetQueryListBatch.ts.html +0 -799
- package/coverage/lcov-report/src/Batch/index.html +0 -116
- package/coverage/lcov-report/src/LokiApplication.ts.html +0 -364
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/test/dataProvider.ts.html +0 -139
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov.info +0 -203
- package/jest.config.js +0 -13
- package/src/Batch/LokiGetQueryListBatch.ts +0 -238
- package/src/Batch/__tests__/Data/LokiGetQueryListBatch/input.json +0 -8
- package/src/Batch/__tests__/Data/LokiGetQueryListBatch/mock.json +0 -259
- package/src/Batch/__tests__/Data/LokiGetQueryListBatch/output.json +0 -43
- package/src/Batch/__tests__/LokiGetQueryListBatch.ts +0 -17
- package/src/LokiApplication.ts +0 -93
- package/test/dataProvider.ts +0 -18
- package/tsconfig.json +0 -8
- package/tsconfig.prod.json +0 -13
- package/tsconfig.prod.tsbuildinfo +0 -1
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
2
|
-
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
-
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
4
|
-
import ResultCode from '@orchesty/nodejs-sdk/dist/lib/Utils/ResultCode';
|
|
5
|
-
import { NAME as APPLICATION_NAME } from '../LokiApplication';
|
|
6
|
-
|
|
7
|
-
export const NAME = `${APPLICATION_NAME}-get-query-list-batch`;
|
|
8
|
-
|
|
9
|
-
enum Direction {
|
|
10
|
-
FORWARD = 'forward',
|
|
11
|
-
BACKWARD = 'backward',
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default class LokiGetQueryListBatch extends ABatchNode {
|
|
15
|
-
|
|
16
|
-
public getName(): string {
|
|
17
|
-
return NAME;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public async processAction(dto: BatchProcessDto<IInput>): Promise<BatchProcessDto> {
|
|
21
|
-
const boundaryTimestamp = dto.getBatchCursor();
|
|
22
|
-
|
|
23
|
-
const { query, limit, start, end, since, interval, step, direction } = dto.getJsonData();
|
|
24
|
-
|
|
25
|
-
const params = new URLSearchParams({ query });
|
|
26
|
-
|
|
27
|
-
if (start || (boundaryTimestamp && direction === Direction.FORWARD)) {
|
|
28
|
-
params.set('start', (direction === Direction.FORWARD ? boundaryTimestamp || String(start) : String(start)));
|
|
29
|
-
}
|
|
30
|
-
if (end || (boundaryTimestamp && direction !== Direction.FORWARD)) {
|
|
31
|
-
params.set('end', (direction === Direction.FORWARD ? String(end) : boundaryTimestamp || String(end)));
|
|
32
|
-
}
|
|
33
|
-
if (limit) params.set('limit', String(limit));
|
|
34
|
-
if (since) params.set('since', since);
|
|
35
|
-
if (interval) params.set('interval', String(interval));
|
|
36
|
-
if (step) params.set('step', String(step));
|
|
37
|
-
if (direction) params.set('direction', direction);
|
|
38
|
-
|
|
39
|
-
const requestDto = await this.getApplication().getRequestDto(
|
|
40
|
-
dto,
|
|
41
|
-
await this.getApplicationInstallFromProcess(dto),
|
|
42
|
-
HttpMethods.GET,
|
|
43
|
-
`/loki/api/v1/query_range?${params}`,
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
const responseDto = await this.getSender().send<IOutput>(requestDto);
|
|
47
|
-
|
|
48
|
-
const { status, data } = responseDto.getJsonBody();
|
|
49
|
-
|
|
50
|
-
if (status !== 'success') {
|
|
51
|
-
dto.setStopProcess(ResultCode.STOP_AND_FAILED, 'Unexpected error occurred during LogQL query execution');
|
|
52
|
-
return dto;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const items: string[] = [];
|
|
56
|
-
if (data.resultType === 'streams') {
|
|
57
|
-
const result = data.result.flatMap((item) => item.values);
|
|
58
|
-
result.sort((a, b) => (
|
|
59
|
-
direction === Direction.FORWARD
|
|
60
|
-
? Number(a[0]) - Number(b[0])
|
|
61
|
-
: Number(b[0]) - Number(a[0])
|
|
62
|
-
));
|
|
63
|
-
items.push(...result.map((item) => item[1]));
|
|
64
|
-
if (result.length === (limit ?? 100)) {
|
|
65
|
-
const timestamp = Number(result[result.length - 1][0]);
|
|
66
|
-
dto.setBatchCursor(String(timestamp + (direction === Direction.FORWARD ? 1 : -1)));
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
const result = data.result.flatMap((item) => item.values);
|
|
70
|
-
result.sort((a, b) => (direction === Direction.FORWARD ? a[0] - b[0] : b[0] - a[0]));
|
|
71
|
-
items.push(...result.map((item) => item[1]));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return dto.setItemList(items);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
type Duration = `${number}${'ns' | 'us' | 'µs' | 'ms' | 's' | 'm' | 'h'}`;
|
|
80
|
-
|
|
81
|
-
export interface IInput {
|
|
82
|
-
/** LogQL query to retrieve data */
|
|
83
|
-
query: string;
|
|
84
|
-
/**
|
|
85
|
-
* Applied only to `streams` (log lines) response type. Reduces amount of log entries to specified number.
|
|
86
|
-
*
|
|
87
|
-
* - This defaults to 100
|
|
88
|
-
*/
|
|
89
|
-
limit?: number;
|
|
90
|
-
/**
|
|
91
|
-
* The unix epoch timestamp in nanoseconds or unix epoch timestamp in seconds with fractions (for floating point numbers)
|
|
92
|
-
* or string in `RFC3339` format which represents timestamp.
|
|
93
|
-
*
|
|
94
|
-
* - This defaults to 1 hour ago
|
|
95
|
-
*/
|
|
96
|
-
start?: number | string;
|
|
97
|
-
/**
|
|
98
|
-
* The unix epoch timestamp in nanoseconds or unix epoch timestamp in seconds with fractions (for floating point numbers)
|
|
99
|
-
* or string in `RFC3339` format which represents timestamp.
|
|
100
|
-
*
|
|
101
|
-
* - This defaults now
|
|
102
|
-
*/
|
|
103
|
-
end?: number | string;
|
|
104
|
-
/**
|
|
105
|
-
* A duration used to calculate `start` relative to `end`. If `start` is specified, then this value is ignored.
|
|
106
|
-
* If `end` is not specified or targets to future timestamp, then the `start` is calculated relatively to now.
|
|
107
|
-
*
|
|
108
|
-
* - This defaults to 1h
|
|
109
|
-
*/
|
|
110
|
-
since?: Duration;
|
|
111
|
-
/**
|
|
112
|
-
* Applied only to `matrix` response type. Query resolution step width in `duration` format or float number of seconds.
|
|
113
|
-
* The `duration` refers to Prometheus duration strings of the form `[0-9]+[smhdwy]`.
|
|
114
|
-
*
|
|
115
|
-
* - Defaults to a dynamic value based on start and end
|
|
116
|
-
*/
|
|
117
|
-
step?: string | number;
|
|
118
|
-
/**
|
|
119
|
-
* Applied only to `streams` response type. This iterates through logs by specified interval and returns one log entry
|
|
120
|
-
* at time. That means it takes first log entry within `start` then omits other entries until `start` + `interval` boundary
|
|
121
|
-
* is reached. Then repeats the step until `end` of interval.
|
|
122
|
-
*/
|
|
123
|
-
interval?: Duration | number;
|
|
124
|
-
/**
|
|
125
|
-
* Determines the sort order of logs.
|
|
126
|
-
*
|
|
127
|
-
* - This defaults to `backward`
|
|
128
|
-
*/
|
|
129
|
-
direction?: Direction;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export interface IOutput {
|
|
133
|
-
status: string;
|
|
134
|
-
data: ({
|
|
135
|
-
resultType: 'matrix';
|
|
136
|
-
result: {
|
|
137
|
-
metric: Record<string, unknown>;
|
|
138
|
-
values: [number, string][]
|
|
139
|
-
}[];
|
|
140
|
-
} | {
|
|
141
|
-
resultType: 'streams';
|
|
142
|
-
result: {
|
|
143
|
-
stream: Record<string, unknown>;
|
|
144
|
-
values: [string, string][]
|
|
145
|
-
}[];
|
|
146
|
-
}) & { stats: Statistics };
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
interface Statistics {
|
|
150
|
-
summary: {
|
|
151
|
-
bytesProcessedPerSecond: number;
|
|
152
|
-
linesProcessedPerSecond: number;
|
|
153
|
-
totalBytesProcessed: number;
|
|
154
|
-
totalLinesProcessed: number;
|
|
155
|
-
execTime: number;
|
|
156
|
-
queueTime: number;
|
|
157
|
-
subqueries: number;
|
|
158
|
-
totalEntriesReturned: number;
|
|
159
|
-
splits: number;
|
|
160
|
-
shards: number;
|
|
161
|
-
totalPostFilterLines: number;
|
|
162
|
-
totalStructuredMetadataBytesProcessed: number;
|
|
163
|
-
};
|
|
164
|
-
querier: {
|
|
165
|
-
store: Store;
|
|
166
|
-
};
|
|
167
|
-
ingester: {
|
|
168
|
-
totalReached: number;
|
|
169
|
-
totalChunksMatched: number;
|
|
170
|
-
totalBatches: number;
|
|
171
|
-
totalLinesSent: number;
|
|
172
|
-
store: Store;
|
|
173
|
-
}
|
|
174
|
-
cache: {
|
|
175
|
-
chunk: CacheStatistic;
|
|
176
|
-
index: CacheStatistic;
|
|
177
|
-
result: CacheStatistic;
|
|
178
|
-
statsResult: CacheStatistic;
|
|
179
|
-
volumeResult: CacheStatistic;
|
|
180
|
-
seriesResult: CacheStatistic;
|
|
181
|
-
labelResult: CacheStatistic;
|
|
182
|
-
instantMetricResult: CacheStatistic;
|
|
183
|
-
};
|
|
184
|
-
index: {
|
|
185
|
-
totalChunks: number;
|
|
186
|
-
postFilterChunks: number;
|
|
187
|
-
shardsDuration: number;
|
|
188
|
-
usedBloomFilters: boolean;
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
interface Store {
|
|
193
|
-
totalChunksRef: number;
|
|
194
|
-
totalChunksDownloaded: number;
|
|
195
|
-
chunksDownloadTime: number;
|
|
196
|
-
queryReferencedStructuredMetadata: boolean;
|
|
197
|
-
queryUsedV2Engine: boolean;
|
|
198
|
-
chunk: {
|
|
199
|
-
headChunkBytes: number;
|
|
200
|
-
headChunkLines: number;
|
|
201
|
-
decompressedBytes: number;
|
|
202
|
-
decompressedLines: number;
|
|
203
|
-
compressedBytes: number;
|
|
204
|
-
totalDuplicates: number;
|
|
205
|
-
postFilterLines: number;
|
|
206
|
-
headChunkStructuredMetadataBytes: number;
|
|
207
|
-
decompressedStructuredMetadataBytes: number;
|
|
208
|
-
};
|
|
209
|
-
chunkRefsFetchTime: number;
|
|
210
|
-
congestionControlLatency: number;
|
|
211
|
-
pipelineWrapperFilteredLines: number;
|
|
212
|
-
dataobj: {
|
|
213
|
-
prePredicateDecompressedRows: number;
|
|
214
|
-
prePredicateDecompressedBytes: number;
|
|
215
|
-
prePredicateDecompressedStructuredMetadataBytes: number;
|
|
216
|
-
postPredicateRows: number;
|
|
217
|
-
postPredicateDecompressedBytes: number;
|
|
218
|
-
postPredicateStructuredMetadataBytes: number;
|
|
219
|
-
postFilterRows: number;
|
|
220
|
-
pagesScanned: number;
|
|
221
|
-
pagesDownloaded: number;
|
|
222
|
-
pagesDownloadedBytes: number;
|
|
223
|
-
pageBatches: number;
|
|
224
|
-
totalRowsAvailable: number;
|
|
225
|
-
totalPageDownloadTime: number;
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
interface CacheStatistic {
|
|
230
|
-
entriesFound: number;
|
|
231
|
-
entriesRequested: number;
|
|
232
|
-
entriesStored: number;
|
|
233
|
-
bytesReceived: number;
|
|
234
|
-
bytesSent: number;
|
|
235
|
-
requests: number;
|
|
236
|
-
downloadTime: number;
|
|
237
|
-
queryLengthServed: number;
|
|
238
|
-
}
|
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "GET http://127.0.0.1:3100/loki/api/v1/query_range?query=%7Bcontainer%3D%22test-container%22%7D",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": {
|
|
5
|
-
"status": "success",
|
|
6
|
-
"data": {
|
|
7
|
-
"resultType": "streams",
|
|
8
|
-
"result": [
|
|
9
|
-
{
|
|
10
|
-
"stream": {
|
|
11
|
-
"container": "test-container",
|
|
12
|
-
"detected_level": "unknown",
|
|
13
|
-
"service_name": "test-container"
|
|
14
|
-
},
|
|
15
|
-
"values": [
|
|
16
|
-
[
|
|
17
|
-
"1763718000105421097",
|
|
18
|
-
"{\"level\":50,\"time\":1763718000103,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189b\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"2a4e871b-cdcb-45cc-bc4b-c5cca17ed72c\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000103,\"service\":\"sdk\",\"levelName\":\"error\",\"message\":\"Request process failed. Message: [Error occurred: Service with name [hbpf.custom-node.event-status-filter-messageInTrash] does not exist!]\"}"
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
"1763718000082354870",
|
|
22
|
-
"{\"level\":50,\"time\":1763718000080,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189a\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"178876cb-8de8-4a20-b806-2819dff03a23\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000080,\"service\":\"sdk\",\"levelName\":\"error\",\"message\":\"Request process failed. Message: [Error occurred: Service with name [hbpf.custom-node.event-status-filter-limitOverflow] does not exist!]\"}"
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
"1763718000075690371",
|
|
26
|
-
"{\"level\":50,\"time\":1763718000073,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b86071899\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"08b02c86-ca3e-44a1-ae6a-7aa8adee8e64\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000073,\"service\":\"sdk\",\"levelName\":\"error\",\"message\":\"Request process failed. Message: [Error occurred: Service with name [hbpf.custom-node.event-status-filter-processFailed] does not exist!]\"}"
|
|
27
|
-
]
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"stream": {
|
|
32
|
-
"container": "test-container",
|
|
33
|
-
"detected_level": "info",
|
|
34
|
-
"service_name": "test-container"
|
|
35
|
-
},
|
|
36
|
-
"values": [
|
|
37
|
-
[
|
|
38
|
-
"1763716743460138650",
|
|
39
|
-
"{\"level\":30,\"time\":1763716743459,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692015f2711ce3b17d0b72f2\",\"nodeId\":\"692015f2711ce3b17d0b72f3\",\"correlationId\":\"56d59e60-4de9-466e-a239-62849f58174f\",\"topologyId\":\"692015dc70454e872a0bc373\",\"processId\":\"a3a8f55a-4931-44da-8fc1-db9f3422ba0a\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"applications\":\"loki\",\"timestamp\":1763716743459,\"service\":\"sdk\",\"levelName\":\"info\",\"message\":\"Request successfully processed. Message: [Processed successfully.]\"}"
|
|
40
|
-
],
|
|
41
|
-
[
|
|
42
|
-
"1763716742150279721",
|
|
43
|
-
"{\"level\":30,\"time\":1763716742142,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692015f2711ce3b17d0b72f2\",\"nodeId\":\"692015f2711ce3b17d0b72f3\",\"correlationId\":\"56d59e60-4de9-466e-a239-62849f58174f\",\"topologyId\":\"692015dc70454e872a0bc373\",\"processId\":\"a3a8f55a-4931-44da-8fc1-db9f3422ba0a\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"applications\":\"loki\",\"timestamp\":1763716742142,\"service\":\"sdk\",\"levelName\":\"info\",\"message\":\"Request successfully processed. Message: [Message will be used as a iterator with cursor [1763715600133392400]. Data will be send to follower(s).]\"}"
|
|
44
|
-
],
|
|
45
|
-
[
|
|
46
|
-
"1763716651483968589",
|
|
47
|
-
"{\"level\":30,\"time\":1763716651483,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692015f2711ce3b17d0b72f2\",\"nodeId\":\"692015f2711ce3b17d0b72f3\",\"correlationId\":\"d7dfb793-000a-4d72-a385-3f6e2f788ab7\",\"topologyId\":\"692015dc70454e872a0bc373\",\"processId\":\"dcb634b6-1f2b-467d-93a9-618a42c237b1\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"applications\":\"loki\",\"timestamp\":1763716651483,\"service\":\"sdk\",\"levelName\":\"info\",\"message\":\"Request successfully processed. Message: [Processed successfully.]\"}"
|
|
48
|
-
]
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"stream": {
|
|
53
|
-
"container": "test-container",
|
|
54
|
-
"detected_level": "debug",
|
|
55
|
-
"service_name": "test-container"
|
|
56
|
-
},
|
|
57
|
-
"values": [
|
|
58
|
-
[
|
|
59
|
-
"1763718000105457435",
|
|
60
|
-
"{\"level\":20,\"time\":1763718000104,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189b\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"2a4e871b-cdcb-45cc-bc4b-c5cca17ed72c\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000104,\"service\":\"sdk\",\"levelName\":\"debug\",\"message\":\"Total request duration: 1ms for endpoint POST[/custom-node/event-status-filter-messageInTrash/process]\"}"
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"1763718000102718589",
|
|
64
|
-
"{\"level\":20,\"time\":1763718000102,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189b\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"2a4e871b-cdcb-45cc-bc4b-c5cca17ed72c\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"reqHeaders\":{\"host\":\"worker:8080\",\"user-agent\":\"Go-http-client/1.1\",\"content-length\":\"1011\",\"accept-encoding\":\"gzip\"},\"reqBody\":{\"headers\":{\"applications\":\"\",\"content-type\":\"application/json\",\"correlation-id\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"node-id\":\"692013fc52d8b25b8607189b\",\"parent-id\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"previous-node-id\":\"692013fc52d8b25b8607189c\",\"process-id\":\"2a4e871b-cdcb-45cc-bc4b-c5cca17ed72c\",\"process-started\":1763718000047,\"system-event\":\"true\",\"topology-id\":\"692013fc52d8b25b86071897\",\"user\":\"orchesty\",\"worker-followers\":\"[]\"},\"body\":\"{\\\"type\\\":\\\"messageInTrash\\\",\\\"data\\\":{\\\"topologyName\\\":\\\"oauth2-refresh-tokens\\\",\\\"topologyVersion\\\":0,\\\"applications\\\":\\\"\\\",\\\"topologyId\\\":\\\"692013fa52d8b25b86071892\\\",\\\"resultMessage\\\":\\\"result status [400], message: Error occurred: Service with name [hbpf.batch.get-application-for-refresh] does not exist!\\\",\\\"correlationId\\\":\\\"4a83b1fc-5de7-475f-b4cf-8dec88fcbaeb\\\",\\\"processId\\\":\\\"b7cd93cf-03e6-4a0e-a2bb-a7b06b26346f\\\",\\\"user\\\":\\\"orchesty\\\",\\\"timestampMs\\\":1763718000018},\\\"contents\\\":[{\\\"trashId\\\":\\\"69203370ecd9fd9edfd75929\\\",\\\"body\\\":\\\"{}\\\\n\\\"}]}\"},\"timestamp\":1763718000102,\"service\":\"sdk\",\"levelName\":\"debug\",\"message\":\"Incoming request: Method[POST] Url[/custom-node/event-status-filter-messageInTrash/process]\"}"
|
|
65
|
-
],
|
|
66
|
-
[
|
|
67
|
-
"1763718000082385057",
|
|
68
|
-
"{\"level\":20,\"time\":1763718000081,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189a\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"178876cb-8de8-4a20-b806-2819dff03a23\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000081,\"service\":\"sdk\",\"levelName\":\"debug\",\"message\":\"Total request duration: 2ms for endpoint POST[/custom-node/event-status-filter-limitOverflow/process]\"}"
|
|
69
|
-
]
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"stats": {
|
|
74
|
-
"summary": {
|
|
75
|
-
"bytesProcessedPerSecond": 9164713,
|
|
76
|
-
"linesProcessedPerSecond": 6777,
|
|
77
|
-
"totalBytesProcessed": 164974,
|
|
78
|
-
"totalLinesProcessed": 122,
|
|
79
|
-
"execTime": 0.018001,
|
|
80
|
-
"queueTime": 0.000182,
|
|
81
|
-
"subqueries": 0,
|
|
82
|
-
"totalEntriesReturned": 100,
|
|
83
|
-
"splits": 1,
|
|
84
|
-
"shards": 1,
|
|
85
|
-
"totalPostFilterLines": 122,
|
|
86
|
-
"totalStructuredMetadataBytesProcessed": 3000
|
|
87
|
-
},
|
|
88
|
-
"querier": {
|
|
89
|
-
"store": {
|
|
90
|
-
"totalChunksRef": 0,
|
|
91
|
-
"totalChunksDownloaded": 0,
|
|
92
|
-
"chunksDownloadTime": 0,
|
|
93
|
-
"queryReferencedStructuredMetadata": false,
|
|
94
|
-
"queryUsedV2Engine": false,
|
|
95
|
-
"chunk": {
|
|
96
|
-
"headChunkBytes": 0,
|
|
97
|
-
"headChunkLines": 0,
|
|
98
|
-
"decompressedBytes": 0,
|
|
99
|
-
"decompressedLines": 0,
|
|
100
|
-
"compressedBytes": 0,
|
|
101
|
-
"totalDuplicates": 0,
|
|
102
|
-
"postFilterLines": 0,
|
|
103
|
-
"headChunkStructuredMetadataBytes": 0,
|
|
104
|
-
"decompressedStructuredMetadataBytes": 0
|
|
105
|
-
},
|
|
106
|
-
"chunkRefsFetchTime": 1375760,
|
|
107
|
-
"congestionControlLatency": 0,
|
|
108
|
-
"pipelineWrapperFilteredLines": 0,
|
|
109
|
-
"dataobj": {
|
|
110
|
-
"prePredicateDecompressedRows": 0,
|
|
111
|
-
"prePredicateDecompressedBytes": 0,
|
|
112
|
-
"prePredicateDecompressedStructuredMetadataBytes": 0,
|
|
113
|
-
"postPredicateRows": 0,
|
|
114
|
-
"postPredicateDecompressedBytes": 0,
|
|
115
|
-
"postPredicateStructuredMetadataBytes": 0,
|
|
116
|
-
"postFilterRows": 0,
|
|
117
|
-
"pagesScanned": 0,
|
|
118
|
-
"pagesDownloaded": 0,
|
|
119
|
-
"pagesDownloadedBytes": 0,
|
|
120
|
-
"pageBatches": 0,
|
|
121
|
-
"totalRowsAvailable": 0,
|
|
122
|
-
"totalPageDownloadTime": 0
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"ingester": {
|
|
127
|
-
"totalReached": 1,
|
|
128
|
-
"totalChunksMatched": 2,
|
|
129
|
-
"totalBatches": 1,
|
|
130
|
-
"totalLinesSent": 100,
|
|
131
|
-
"store": {
|
|
132
|
-
"totalChunksRef": 0,
|
|
133
|
-
"totalChunksDownloaded": 0,
|
|
134
|
-
"chunksDownloadTime": 0,
|
|
135
|
-
"queryReferencedStructuredMetadata": false,
|
|
136
|
-
"queryUsedV2Engine": false,
|
|
137
|
-
"chunk": {
|
|
138
|
-
"headChunkBytes": 27194,
|
|
139
|
-
"headChunkLines": 30,
|
|
140
|
-
"decompressedBytes": 137780,
|
|
141
|
-
"decompressedLines": 92,
|
|
142
|
-
"compressedBytes": 65197,
|
|
143
|
-
"totalDuplicates": 0,
|
|
144
|
-
"postFilterLines": 122,
|
|
145
|
-
"headChunkStructuredMetadataBytes": 240,
|
|
146
|
-
"decompressedStructuredMetadataBytes": 2760
|
|
147
|
-
},
|
|
148
|
-
"chunkRefsFetchTime": 0,
|
|
149
|
-
"congestionControlLatency": 0,
|
|
150
|
-
"pipelineWrapperFilteredLines": 0,
|
|
151
|
-
"dataobj": {
|
|
152
|
-
"prePredicateDecompressedRows": 0,
|
|
153
|
-
"prePredicateDecompressedBytes": 0,
|
|
154
|
-
"prePredicateDecompressedStructuredMetadataBytes": 0,
|
|
155
|
-
"postPredicateRows": 0,
|
|
156
|
-
"postPredicateDecompressedBytes": 0,
|
|
157
|
-
"postPredicateStructuredMetadataBytes": 0,
|
|
158
|
-
"postFilterRows": 0,
|
|
159
|
-
"pagesScanned": 0,
|
|
160
|
-
"pagesDownloaded": 0,
|
|
161
|
-
"pagesDownloadedBytes": 0,
|
|
162
|
-
"pageBatches": 0,
|
|
163
|
-
"totalRowsAvailable": 0,
|
|
164
|
-
"totalPageDownloadTime": 0
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
"cache": {
|
|
169
|
-
"chunk": {
|
|
170
|
-
"entriesFound": 0,
|
|
171
|
-
"entriesRequested": 0,
|
|
172
|
-
"entriesStored": 0,
|
|
173
|
-
"bytesReceived": 0,
|
|
174
|
-
"bytesSent": 0,
|
|
175
|
-
"requests": 0,
|
|
176
|
-
"downloadTime": 0,
|
|
177
|
-
"queryLengthServed": 0
|
|
178
|
-
},
|
|
179
|
-
"index": {
|
|
180
|
-
"entriesFound": 0,
|
|
181
|
-
"entriesRequested": 0,
|
|
182
|
-
"entriesStored": 0,
|
|
183
|
-
"bytesReceived": 0,
|
|
184
|
-
"bytesSent": 0,
|
|
185
|
-
"requests": 0,
|
|
186
|
-
"downloadTime": 0,
|
|
187
|
-
"queryLengthServed": 0
|
|
188
|
-
},
|
|
189
|
-
"result": {
|
|
190
|
-
"entriesFound": 0,
|
|
191
|
-
"entriesRequested": 0,
|
|
192
|
-
"entriesStored": 0,
|
|
193
|
-
"bytesReceived": 0,
|
|
194
|
-
"bytesSent": 0,
|
|
195
|
-
"requests": 0,
|
|
196
|
-
"downloadTime": 0,
|
|
197
|
-
"queryLengthServed": 0
|
|
198
|
-
},
|
|
199
|
-
"statsResult": {
|
|
200
|
-
"entriesFound": 0,
|
|
201
|
-
"entriesRequested": 0,
|
|
202
|
-
"entriesStored": 0,
|
|
203
|
-
"bytesReceived": 0,
|
|
204
|
-
"bytesSent": 0,
|
|
205
|
-
"requests": 0,
|
|
206
|
-
"downloadTime": 0,
|
|
207
|
-
"queryLengthServed": 0
|
|
208
|
-
},
|
|
209
|
-
"volumeResult": {
|
|
210
|
-
"entriesFound": 0,
|
|
211
|
-
"entriesRequested": 0,
|
|
212
|
-
"entriesStored": 0,
|
|
213
|
-
"bytesReceived": 0,
|
|
214
|
-
"bytesSent": 0,
|
|
215
|
-
"requests": 0,
|
|
216
|
-
"downloadTime": 0,
|
|
217
|
-
"queryLengthServed": 0
|
|
218
|
-
},
|
|
219
|
-
"seriesResult": {
|
|
220
|
-
"entriesFound": 0,
|
|
221
|
-
"entriesRequested": 0,
|
|
222
|
-
"entriesStored": 0,
|
|
223
|
-
"bytesReceived": 0,
|
|
224
|
-
"bytesSent": 0,
|
|
225
|
-
"requests": 0,
|
|
226
|
-
"downloadTime": 0,
|
|
227
|
-
"queryLengthServed": 0
|
|
228
|
-
},
|
|
229
|
-
"labelResult": {
|
|
230
|
-
"entriesFound": 0,
|
|
231
|
-
"entriesRequested": 0,
|
|
232
|
-
"entriesStored": 0,
|
|
233
|
-
"bytesReceived": 0,
|
|
234
|
-
"bytesSent": 0,
|
|
235
|
-
"requests": 0,
|
|
236
|
-
"downloadTime": 0,
|
|
237
|
-
"queryLengthServed": 0
|
|
238
|
-
},
|
|
239
|
-
"instantMetricResult": {
|
|
240
|
-
"entriesFound": 0,
|
|
241
|
-
"entriesRequested": 0,
|
|
242
|
-
"entriesStored": 0,
|
|
243
|
-
"bytesReceived": 0,
|
|
244
|
-
"bytesSent": 0,
|
|
245
|
-
"requests": 0,
|
|
246
|
-
"downloadTime": 0,
|
|
247
|
-
"queryLengthServed": 0
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
"index": {
|
|
251
|
-
"totalChunks": 0,
|
|
252
|
-
"postFilterChunks": 0,
|
|
253
|
-
"shardsDuration": 0,
|
|
254
|
-
"usedBloomFilters": false
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": [
|
|
6
|
-
{
|
|
7
|
-
"body": "{\"level\":20,\"time\":1763718000104,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189b\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"2a4e871b-cdcb-45cc-bc4b-c5cca17ed72c\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000104,\"service\":\"sdk\",\"levelName\":\"debug\",\"message\":\"Total request duration: 1ms for endpoint POST[/custom-node/event-status-filter-messageInTrash/process]\"}",
|
|
8
|
-
"headers": {}
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"body": "{\"level\":50,\"time\":1763718000103,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189b\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"2a4e871b-cdcb-45cc-bc4b-c5cca17ed72c\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000103,\"service\":\"sdk\",\"levelName\":\"error\",\"message\":\"Request process failed. Message: [Error occurred: Service with name [hbpf.custom-node.event-status-filter-messageInTrash] does not exist!]\"}",
|
|
12
|
-
"headers": {}
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"body": "{\"level\":20,\"time\":1763718000102,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189b\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"2a4e871b-cdcb-45cc-bc4b-c5cca17ed72c\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"reqHeaders\":{\"host\":\"worker:8080\",\"user-agent\":\"Go-http-client/1.1\",\"content-length\":\"1011\",\"accept-encoding\":\"gzip\"},\"reqBody\":{\"headers\":{\"applications\":\"\",\"content-type\":\"application/json\",\"correlation-id\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"node-id\":\"692013fc52d8b25b8607189b\",\"parent-id\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"previous-node-id\":\"692013fc52d8b25b8607189c\",\"process-id\":\"2a4e871b-cdcb-45cc-bc4b-c5cca17ed72c\",\"process-started\":1763718000047,\"system-event\":\"true\",\"topology-id\":\"692013fc52d8b25b86071897\",\"user\":\"orchesty\",\"worker-followers\":\"[]\"},\"body\":\"{\\\"type\\\":\\\"messageInTrash\\\",\\\"data\\\":{\\\"topologyName\\\":\\\"oauth2-refresh-tokens\\\",\\\"topologyVersion\\\":0,\\\"applications\\\":\\\"\\\",\\\"topologyId\\\":\\\"692013fa52d8b25b86071892\\\",\\\"resultMessage\\\":\\\"result status [400], message: Error occurred: Service with name [hbpf.batch.get-application-for-refresh] does not exist!\\\",\\\"correlationId\\\":\\\"4a83b1fc-5de7-475f-b4cf-8dec88fcbaeb\\\",\\\"processId\\\":\\\"b7cd93cf-03e6-4a0e-a2bb-a7b06b26346f\\\",\\\"user\\\":\\\"orchesty\\\",\\\"timestampMs\\\":1763718000018},\\\"contents\\\":[{\\\"trashId\\\":\\\"69203370ecd9fd9edfd75929\\\",\\\"body\\\":\\\"{}\\\\n\\\"}]}\"},\"timestamp\":1763718000102,\"service\":\"sdk\",\"levelName\":\"debug\",\"message\":\"Incoming request: Method[POST] Url[/custom-node/event-status-filter-messageInTrash/process]\"}",
|
|
16
|
-
"headers": {}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"body": "{\"level\":20,\"time\":1763718000081,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189a\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"178876cb-8de8-4a20-b806-2819dff03a23\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000081,\"service\":\"sdk\",\"levelName\":\"debug\",\"message\":\"Total request duration: 2ms for endpoint POST[/custom-node/event-status-filter-limitOverflow/process]\"}",
|
|
20
|
-
"headers": {}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"body": "{\"level\":50,\"time\":1763718000080,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b8607189a\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"178876cb-8de8-4a20-b806-2819dff03a23\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000080,\"service\":\"sdk\",\"levelName\":\"error\",\"message\":\"Request process failed. Message: [Error occurred: Service with name [hbpf.custom-node.event-status-filter-limitOverflow] does not exist!]\"}",
|
|
24
|
-
"headers": {}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"body": "{\"level\":50,\"time\":1763718000073,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692013fc52d8b25b8607189c\",\"nodeId\":\"692013fc52d8b25b86071899\",\"correlationId\":\"f814b1a4-e50a-4799-b4e0-e82d3c210eed\",\"topologyId\":\"692013fc52d8b25b86071897\",\"processId\":\"08b02c86-ca3e-44a1-ae6a-7aa8adee8e64\",\"parentId\":\"35264ef5-90ef-4729-bfd2-342739d3eb18\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"timestamp\":1763718000073,\"service\":\"sdk\",\"levelName\":\"error\",\"message\":\"Request process failed. Message: [Error occurred: Service with name [hbpf.custom-node.event-status-filter-processFailed] does not exist!]\"}",
|
|
28
|
-
"headers": {}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"body": "{\"level\":30,\"time\":1763716743459,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692015f2711ce3b17d0b72f2\",\"nodeId\":\"692015f2711ce3b17d0b72f3\",\"correlationId\":\"56d59e60-4de9-466e-a239-62849f58174f\",\"topologyId\":\"692015dc70454e872a0bc373\",\"processId\":\"a3a8f55a-4931-44da-8fc1-db9f3422ba0a\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"applications\":\"loki\",\"timestamp\":1763716743459,\"service\":\"sdk\",\"levelName\":\"info\",\"message\":\"Request successfully processed. Message: [Processed successfully.]\"}",
|
|
32
|
-
"headers": {}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"body": "{\"level\":30,\"time\":1763716742142,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692015f2711ce3b17d0b72f2\",\"nodeId\":\"692015f2711ce3b17d0b72f3\",\"correlationId\":\"56d59e60-4de9-466e-a239-62849f58174f\",\"topologyId\":\"692015dc70454e872a0bc373\",\"processId\":\"a3a8f55a-4931-44da-8fc1-db9f3422ba0a\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"applications\":\"loki\",\"timestamp\":1763716742142,\"service\":\"sdk\",\"levelName\":\"info\",\"message\":\"Request successfully processed. Message: [Message will be used as a iterator with cursor [1763715600133392400]. Data will be send to follower(s).]\"}",
|
|
36
|
-
"headers": {}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"body": "{\"level\":30,\"time\":1763716651483,\"pid\":953,\"hostname\":\"3975fa509fa3\",\"previousNodeId\":\"692015f2711ce3b17d0b72f2\",\"nodeId\":\"692015f2711ce3b17d0b72f3\",\"correlationId\":\"d7dfb793-000a-4d72-a385-3f6e2f788ab7\",\"topologyId\":\"692015dc70454e872a0bc373\",\"processId\":\"dcb634b6-1f2b-467d-93a9-618a42c237b1\",\"sequenceId\":\"0\",\"userId\":\"orchesty\",\"applications\":\"loki\",\"timestamp\":1763716651483,\"service\":\"sdk\",\"levelName\":\"info\",\"message\":\"Request successfully processed. Message: [Processed successfully.]\"}",
|
|
40
|
-
"headers": {}
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
-
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
-
import init from '../../../test/dataProvider';
|
|
4
|
-
import { NAME as LOKI_GET_QUERY_LIST_BATCH } from '../LokiGetQueryListBatch';
|
|
5
|
-
|
|
6
|
-
let tester: NodeTester;
|
|
7
|
-
|
|
8
|
-
describe('Tests for LokiGetQueryListBatch', () => {
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
tester = new NodeTester(container, __filename);
|
|
11
|
-
init();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('process - ok', async () => {
|
|
15
|
-
await tester.testBatch(LOKI_GET_QUERY_LIST_BATCH);
|
|
16
|
-
});
|
|
17
|
-
});
|