Reapply "enable otel logs and metrics for staging environments" (#1310)

This reverts commit d7e7df1df6.

## Description:

enable otel logs and metrics for staging environments

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
This commit is contained in:
Scott Anderson
2025-06-30 19:43:49 -04:00
committed by GitHub
parent a0c13c5457
commit 9d25668791
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -7,7 +7,6 @@ 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();
@@ -21,7 +20,7 @@ const loggerProvider = new LoggerProvider({
resource,
});
if (config.env() === GameEnv.Prod && config.otelEnabled()) {
if (config.otelEnabled()) {
console.log("OTEL enabled");
// Configure OpenTelemetry endpoint with basic auth (if provided)
const headers = {};
+1 -1
View File
@@ -46,7 +46,7 @@ export function startWorker() {
const privilegeChecker = new PrivilegeChecker(COSMETICS);
if (config.env() === GameEnv.Prod && config.otelEnabled()) {
if (config.otelEnabled()) {
initWorkerMetrics(gm);
}