Rebranding app and naming
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// OpenTelemetry Node SDK bootstrap for FarmaFinder backend.
|
||||
// OpenTelemetry Node SDK bootstrap for FarmaClic backend.
|
||||
// Started as a side-effect import from server.js (ESM).
|
||||
//
|
||||
// Env vars (set by docker-compose):
|
||||
// OTEL_SERVICE_NAME — default: farmafinder-backend
|
||||
// OTEL_SERVICE_NAME — default: farmaclic-backend
|
||||
// OTEL_EXPORTER_OTLP_ENDPOINT — OTLP gRPC endpoint (e.g. http://alloy:4317)
|
||||
//
|
||||
// Exports traces to the shared Grafana Alloy collector, where they are
|
||||
@@ -15,17 +15,17 @@ import * as resources from '@opentelemetry/resources';
|
||||
import { ATTR_SERVICE_NAME, ATTR_SERVICE_NAMESPACE } from '@opentelemetry/semantic-conventions';
|
||||
import { PinoInstrumentation } from '@opentelemetry/instrumentation-pino';
|
||||
|
||||
const serviceName = process.env.OTEL_SERVICE_NAME || 'farmafinder-backend';
|
||||
const serviceName = process.env.OTEL_SERVICE_NAME || 'farmaclic-backend';
|
||||
const otlpEndpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT || 'http://localhost:4317';
|
||||
|
||||
const resource = typeof resources.resourceFromAttributes === 'function'
|
||||
? resources.resourceFromAttributes({
|
||||
[ATTR_SERVICE_NAME]: serviceName,
|
||||
[ATTR_SERVICE_NAMESPACE]: 'farmafinder',
|
||||
[ATTR_SERVICE_NAMESPACE]: 'farmaclic',
|
||||
})
|
||||
: new resources.Resource({
|
||||
[ATTR_SERVICE_NAME]: serviceName,
|
||||
[ATTR_SERVICE_NAMESPACE]: 'farmafinder',
|
||||
[ATTR_SERVICE_NAMESPACE]: 'farmaclic',
|
||||
});
|
||||
|
||||
const sdk = new NodeSDK({
|
||||
|
||||
Reference in New Issue
Block a user