Fix totalCostInUSD calculation and update Otel Collector port

This commit is contained in:
Simon Larsen 2023-12-30 13:32:41 +00:00
parent 018d3b7fcd
commit 2d2f2b0521
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
2 changed files with 4 additions and 4 deletions

View File

@ -49,10 +49,10 @@ export default class TelemetryMeteredPlan extends ServerMeteredPlan {
for (const usageBilling of usageBillings) { for (const usageBilling of usageBillings) {
if ( if (
usageBilling?.totalCostInUSD && usageBilling?.totalCostInUSD?.value &&
usageBilling?.totalCostInUSD > 0 usageBilling?.totalCostInUSD.value > 0
) { ) {
totalCostInUSD += usageBilling.totalCostInUSD; totalCostInUSD += usageBilling.totalCostInUSD.value;
} }
} }

View File

@ -33,7 +33,7 @@ upstream workers {
upstream opentelemetry-collector { upstream opentelemetry-collector {
server ${SERVER_OTEL_COLLECTOR_HOSTNAME}:${OTEL_COLLECTOR_PORT} weight=10 max_fails=3 fail_timeout=30s; server ${SERVER_OTEL_COLLECTOR_HOSTNAME}:${OTEL_COLLECTOR_HTTP_PORT} weight=10 max_fails=3 fail_timeout=30s;
} }
# Otel Collector # Otel Collector