disable remote logging and metrics on dev & staging to reduce load on monitoring stack

This commit is contained in:
evan
2025-05-02 12:53:48 -07:00
parent a79e0ffc19
commit 8bdda67b2a
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import {
import { OpenTelemetryTransportV3 } from "@opentelemetry/winston-transport";
import * as dotenv from "dotenv";
import winston from "winston";
import { GameEnv } from "../core/configuration/Config";
import { getServerConfigFromServer } from "../core/configuration/ConfigLoader";
import { getOtelResource } from "./OtelResource";
dotenv.config();
@@ -20,7 +21,7 @@ const loggerProvider = new LoggerProvider({
resource,
});
if (config.otelEnabled()) {
if (config.env() == GameEnv.Prod && config.otelEnabled()) {
console.log("OTEL enabled");
// Configure OpenTelemetry endpoint with basic auth (if provided)
const headers = {};