mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-16 23:00:51 +00:00
feat: Add concurrency setting for OpenTelemetry Ingest worker and update related configurations
This commit is contained in:
parent
db1f5a29bb
commit
c0259fc041
6 changed files with 22 additions and 1 deletions
|
|
@ -93,6 +93,8 @@ spec:
|
|||
value: {{ $.Values.openTelemetryIngest.ports.http | quote }}
|
||||
- name: DISABLE_TELEMETRY
|
||||
value: {{ $.Values.openTelemetryIngest.disableTelemetryCollection | quote }}
|
||||
- name: OPEN_TELEMETRY_INGEST_CONCURRENCY
|
||||
value: {{ $.Values.openTelemetryIngest.concurrency | squote }}
|
||||
ports:
|
||||
- containerPort: {{ $.Values.openTelemetryIngest.ports.http }}
|
||||
protocol: TCP
|
||||
|
|
|
|||
|
|
@ -537,6 +537,8 @@ openTelemetryIngest:
|
|||
replicaCount: 1
|
||||
disableTelemetryCollection: false
|
||||
disableAutoscaler: false
|
||||
# Max concurrent telemetry jobs processed by each pod
|
||||
concurrency: 100
|
||||
ports:
|
||||
http: 3403
|
||||
resources:
|
||||
|
|
|
|||
9
OpenTelemetryIngest/Config.ts
Normal file
9
OpenTelemetryIngest/Config.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
let concurrency: string | number =
|
||||
process.env["OPEN_TELEMETRY_INGEST_CONCURRENCY"] || 100;
|
||||
|
||||
if (typeof concurrency === "string") {
|
||||
const parsed: number = parseInt(concurrency, 10);
|
||||
concurrency = !isNaN(parsed) && parsed > 0 ? parsed : 100;
|
||||
}
|
||||
|
||||
export const OPEN_TELEMETRY_INGEST_CONCURRENCY: number = concurrency as number;
|
||||
|
|
@ -8,6 +8,7 @@ import logger from "Common/Server/Utils/Logger";
|
|||
import { QueueJob, QueueName } from "Common/Server/Infrastructure/Queue";
|
||||
import QueueWorker from "Common/Server/Infrastructure/QueueWorker";
|
||||
import ObjectID from "Common/Types/ObjectID";
|
||||
import { OPEN_TELEMETRY_INGEST_CONCURRENCY } from "../../Config";
|
||||
|
||||
// Set up the unified worker for processing telemetry queue
|
||||
QueueWorker.getWorker(
|
||||
|
|
@ -58,7 +59,7 @@ QueueWorker.getWorker(
|
|||
throw error;
|
||||
}
|
||||
},
|
||||
{ concurrency: 50 }, // Process up to 50 telemetry jobs concurrently
|
||||
{ concurrency: OPEN_TELEMETRY_INGEST_CONCURRENCY },
|
||||
);
|
||||
|
||||
logger.debug("Unified telemetry worker initialized");
|
||||
|
|
|
|||
|
|
@ -234,6 +234,11 @@ WORKFLOW_SCRIPT_TIMEOUT_IN_MS=5000
|
|||
WORKFLOW_TIMEOUT_IN_MS=5000
|
||||
|
||||
|
||||
# Concurrency settings
|
||||
# Max number of telemetry jobs processed concurrently by OpenTelemetry Ingest worker
|
||||
OPEN_TELEMETRY_INGEST_CONCURRENCY=100
|
||||
|
||||
|
||||
|
||||
# Lets encrypt notification email. This email will be used when certs are about to expire
|
||||
LETS_ENCRYPT_NOTIFICATION_EMAIL=
|
||||
|
|
|
|||
|
|
@ -482,6 +482,8 @@ services:
|
|||
<<: *common-server-variables
|
||||
PORT: ${OPEN_TELEMETRY_INGEST_PORT}
|
||||
DISABLE_TELEMETRY: ${DISABLE_TELEMETRY_FOR_OPEN_TELEMETRY_INGEST}
|
||||
# Max concurrent telemetry jobs the worker will process
|
||||
OPEN_TELEMETRY_INGEST_CONCURRENCY: ${OPEN_TELEMETRY_INGEST_CONCURRENCY}
|
||||
logging:
|
||||
driver: "local"
|
||||
options:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue