From f7d6854c06b5bc61245861e8b38edba54dc06b19 Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Mon, 7 Oct 2024 17:28:18 -0700 Subject: [PATCH] fix(collector): move to an otel collector --- infrastructure/client-api/src/config/index.ts | 4 +- infrastructure/client-api/src/main.ts | 38 +------------ infrastructure/list-api/src/config/index.ts | 5 ++ infrastructure/list-api/src/main.ts | 38 ++----------- .../src/config/index.ts | 5 ++ .../parser-graphql-wrapper/src/main.ts | 38 ++----------- infrastructure/user-api/src/config/index.ts | 4 +- infrastructure/user-api/src/main.ts | 38 ++----------- infrastructure/user-list-search/apollo_ecs.tf | 6 +- infrastructure/user-list-search/ecs.tf | 55 ------------------- infrastructure/user-list-search/locals.tf | 2 + .../user-list-search/queue_users_ecs.tf | 2 +- .../v3-proxy-api/src/config/index.ts | 5 ++ infrastructure/v3-proxy-api/src/main.ts | 38 ++----------- packages/tracing/package.json | 1 + packages/tracing/src/tracing.ts | 16 +++--- pnpm-lock.yaml | 3 + servers/client-api/config/router.yaml | 4 +- servers/list-api/src/config/index.ts | 2 +- servers/otel-collector/httpd.conf | 1 - .../otel-collector/otel-collector-config.yaml | 4 ++ .../src/config/index.ts | 2 +- servers/user-api/src/config/index.ts | 2 +- servers/user-list-search/src/config/index.ts | 2 +- servers/v3-proxy-api/src/config/index.ts | 2 +- 25 files changed, 69 insertions(+), 248 deletions(-) diff --git a/infrastructure/client-api/src/config/index.ts b/infrastructure/client-api/src/config/index.ts index 00ecb8fbd..09a495fda 100644 --- a/infrastructure/client-api/src/config/index.ts +++ b/infrastructure/client-api/src/config/index.ts @@ -47,6 +47,8 @@ export const config = { }, }, tracing: { - host: 'localhost', + url: isDev + ? 'https://otlp-collector.getpocket.dev' + : 'https://otlp-collector.readitlater.com', }, }; diff --git a/infrastructure/client-api/src/main.ts b/infrastructure/client-api/src/main.ts index 0aab79814..2f7f737a8 100644 --- a/infrastructure/client-api/src/main.ts +++ b/infrastructure/client-api/src/main.ts @@ -235,8 +235,8 @@ class ClientAPI extends TerraformStack { value: config.isProd ? 'production' : 'development', }, { - name: 'OTLP_COLLECTOR_HOST', - value: `${config.tracing.host}`, + name: 'OTLP_COLLECTOR_URL', + value: `${config.tracing.url}`, }, { name: 'REDIS_ENDPOINT', @@ -266,40 +266,6 @@ class ClientAPI extends TerraformStack { startPeriod: 0, }, }, - { - name: 'otel-collector', - containerImage: 'pocket/opentelemetry-collector-contrib', - essential: true, - logMultilinePattern: '^\\S.+', - logGroup: this.createCustomLogGroup('otel-collector'), - portMappings: [ - { - hostPort: 4138, - containerPort: 4138, - }, - { - hostPort: 4137, - containerPort: 4137, - }, - { - hostPort: 55681, - containerPort: 55681, - }, - ], - envVars: [ - { - name: 'DEPLOYMENT_ENVIRONMENT_NAME', - value: config.tags.env_code, - }, - ], - secretEnvVars: [ - { - name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON', - valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES:::`, - }, - ], - repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`, - }, ], codeDeploy: { useCodeDeploy: true, diff --git a/infrastructure/list-api/src/config/index.ts b/infrastructure/list-api/src/config/index.ts index 773fd1e9b..9fbde0aee 100644 --- a/infrastructure/list-api/src/config/index.ts +++ b/infrastructure/list-api/src/config/index.ts @@ -50,4 +50,9 @@ export const config = { userEvents: `PocketEventBridge-${environment}-UserEventTopic`, }, }, + tracing: { + url: isDev + ? 'https://otlp-collector.getpocket.dev' + : 'https://otlp-collector.readitlater.com', + }, }; diff --git a/infrastructure/list-api/src/main.ts b/infrastructure/list-api/src/main.ts index 052cb348d..b93d8cb5a 100644 --- a/infrastructure/list-api/src/main.ts +++ b/infrastructure/list-api/src/main.ts @@ -230,6 +230,10 @@ class ListAPI extends TerraformStack { name: 'EVENT_BUS_NAME', value: config.envVars.eventBusName, }, + { + name: 'OTLP_COLLECTOR_URL', + value: config.tracing.url, + }, ], secretEnvVars: [ { @@ -304,40 +308,6 @@ class ListAPI extends TerraformStack { logGroup: this.createCustomLogGroup('app'), logMultilinePattern: '^\\S.+', }, - { - name: 'otel-collector', - containerImage: 'pocket/opentelemetry-collector-contrib', - essential: true, - logMultilinePattern: '^\\S.+', - logGroup: this.createCustomLogGroup('otel-collector'), - portMappings: [ - { - hostPort: 4138, - containerPort: 4138, - }, - { - hostPort: 4137, - containerPort: 4137, - }, - { - hostPort: 55681, - containerPort: 55681, - }, - ], - envVars: [ - { - name: 'DEPLOYMENT_ENVIRONMENT_NAME', - value: config.tags.env_code, - }, - ], - secretEnvVars: [ - { - name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON', - valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES:::`, - }, - ], - repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`, - }, ], codeDeploy: { useCodeDeploy: true, diff --git a/infrastructure/parser-graphql-wrapper/src/config/index.ts b/infrastructure/parser-graphql-wrapper/src/config/index.ts index 5c5243439..7d864b46c 100644 --- a/infrastructure/parser-graphql-wrapper/src/config/index.ts +++ b/infrastructure/parser-graphql-wrapper/src/config/index.ts @@ -42,4 +42,9 @@ export const config = { databaseName: 'readitla_shares', masterUsername: 'share_urls', }, + tracing: { + url: isDev + ? 'https://otlp-collector.getpocket.dev' + : 'https://otlp-collector.readitlater.com', + }, }; diff --git a/infrastructure/parser-graphql-wrapper/src/main.ts b/infrastructure/parser-graphql-wrapper/src/main.ts index 247b798e5..a6e6d6960 100644 --- a/infrastructure/parser-graphql-wrapper/src/main.ts +++ b/infrastructure/parser-graphql-wrapper/src/main.ts @@ -176,6 +176,10 @@ class ParserGraphQLWrapper extends TerraformStack { name: 'ITEM_SUMMARY_TABLE', value: dynamodb.itemSummaryTable.dynamodb.name, }, + { + name: 'OTLP_COLLECTOR_URL', + value: config.tracing.url, + }, ], healthCheck: { command: [ @@ -278,40 +282,6 @@ class ParserGraphQLWrapper extends TerraformStack { }, ], }, - { - name: 'otel-collector', - containerImage: 'pocket/opentelemetry-collector-contrib', - essential: true, - logMultilinePattern: '^\\S.+', - logGroup: this.createCustomLogGroup('otel-collector'), - portMappings: [ - { - hostPort: 4138, - containerPort: 4138, - }, - { - hostPort: 4137, - containerPort: 4137, - }, - { - hostPort: 55681, - containerPort: 55681, - }, - ], - envVars: [ - { - name: 'DEPLOYMENT_ENVIRONMENT_NAME', - value: config.tags.env_code, - }, - ], - secretEnvVars: [ - { - name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON', - valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES`, - }, - ], - repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`, - }, ], codeDeploy: { useCodeDeploy: true, diff --git a/infrastructure/user-api/src/config/index.ts b/infrastructure/user-api/src/config/index.ts index 53765fc99..0cf3ad5dd 100644 --- a/infrastructure/user-api/src/config/index.ts +++ b/infrastructure/user-api/src/config/index.ts @@ -37,6 +37,8 @@ export const config = { env_code: isDev ? 'dev' : 'prod', }, tracing: { - host: 'localhost', + url: isDev + ? 'https://otlp-collector.getpocket.dev' + : 'https://otlp-collector.readitlater.com', }, }; diff --git a/infrastructure/user-api/src/main.ts b/infrastructure/user-api/src/main.ts index 3cf4c6a2d..5e99ca5d7 100644 --- a/infrastructure/user-api/src/main.ts +++ b/infrastructure/user-api/src/main.ts @@ -112,6 +112,10 @@ class UserAPI extends TerraformStack { startPeriod: 0, }, envVars: [ + { + name: 'OTLP_COLLECTOR_URL', + value: config.tracing.url, + }, { name: 'NODE_ENV', value: process.env.NODE_ENV ?? 'development', @@ -198,40 +202,6 @@ class UserAPI extends TerraformStack { logGroup: this.createCustomLogGroup('app'), logMultilinePattern: '^\\S.+', }, - { - name: 'otel-collector', - containerImage: 'pocket/opentelemetry-collector-contrib', - essential: true, - logMultilinePattern: '^\\S.+', - logGroup: this.createCustomLogGroup('otel-collector'), - portMappings: [ - { - hostPort: 4138, - containerPort: 4138, - }, - { - hostPort: 4137, - containerPort: 4137, - }, - { - hostPort: 55681, - containerPort: 55681, - }, - ], - envVars: [ - { - name: 'DEPLOYMENT_ENVIRONMENT_NAME', - value: config.tags.env_code, - }, - ], - secretEnvVars: [ - { - name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON', - valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES:::`, - }, - ], - repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`, - }, ], codeDeploy: { useCodeDeploy: true, diff --git a/infrastructure/user-list-search/apollo_ecs.tf b/infrastructure/user-list-search/apollo_ecs.tf index e520b710c..d38dc55de 100644 --- a/infrastructure/user-list-search/apollo_ecs.tf +++ b/infrastructure/user-list-search/apollo_ecs.tf @@ -110,13 +110,17 @@ module "apollo" { { name = "CORPUS_SEARCH_ENDPOINT" value = module.corpus_embeddings.opensearch_endpoint + }, + { + name = "OTLP_COLLECTOR_URL" + value = local.workspace.otlpCollectorUrl } ] } resource "aws_ecs_task_definition" "apollo" { family = "${local.prefix}-Apollo" - container_definitions = "[${module.apollo.json_map_encoded}, ${module.otel.json_map_encoded}]" + container_definitions = "[${module.apollo.json_map_encoded}]" task_role_arn = aws_iam_role.ecs_task_role.arn execution_role_arn = aws_iam_role.ecs_execution_role.arn diff --git a/infrastructure/user-list-search/ecs.tf b/infrastructure/user-list-search/ecs.tf index 9780df9ba..e10d1ff5e 100644 --- a/infrastructure/user-list-search/ecs.tf +++ b/infrastructure/user-list-search/ecs.tf @@ -101,58 +101,3 @@ resource "aws_security_group" "ecs_security_group" { depends_on = [aws_security_group.alb_security_group] } -resource "aws_cloudwatch_log_group" "xray" { - name = "/ecs/${local.name}/${local.env}/xray" - retention_in_days = 30 -} - -module "otel" { - source = "cloudposse/ecs-container-definition/aws" - version = "0.61.1" - - essential = true - container_name = "otel-collector" - container_image = "pocket/opentelemetry-collector-contrib" - - repository_credentials = { - credentialsParameter : local.container_credential - } - - log_configuration = { - logDriver = "awslogs" - secretOptions = [] - options = { - awslogs-region = data.aws_region.current.name - awslogs-group = aws_cloudwatch_log_group.xray.name - awslogs-stream-prefix = "ecs" - } - } - - environment = [{ - name = "DEPLOYMENT_ENVIRONMENT_NAME", - value = local.tags.env_code, - }] - - secrets = [{ - name = "GOOGLE_APPLICATION_CREDENTIALS_JSON" - valueFrom = "${local.secret_path_shared}GCP_SA_TRACES:::" - }] - - port_mappings = [ - { - containerPort = 4138 - hostPort = 4138 - }, - { - containerPort = 4137 - hostPort = 4137 - }, - { - containerPort = 55681 - hostPort = 55681 - } - ] - container_cpu = null - container_memory = null - container_memory_reservation = null -} diff --git a/infrastructure/user-list-search/locals.tf b/infrastructure/user-list-search/locals.tf index 0c30dc3bd..d9f3b27bc 100644 --- a/infrastructure/user-list-search/locals.tf +++ b/infrastructure/user-list-search/locals.tf @@ -81,6 +81,7 @@ locals { sns_topic_corpus_events = "PocketEventBridge-Dev-CorpusEventsTopic" sns_topic_collection_events = "PocketEventBridge-Dev-CollectionEventTopic" userApiUri = "https://user-list-search.getpocket.dev" + otlpCollectorUrl = "https://otlp-collector.getpocket.dev" } UserListSearch-Prod = { @@ -97,6 +98,7 @@ locals { sns_topic_corpus_events = "PocketEventBridge-Prod-CorpusEventsTopic" sns_topic_collection_events = "PocketEventBridge-Prod-CollectionEventTopic" userApiUri = "https://user-list-search.readitlater.com" + otlpCollectorUrl = "https://otlp-collector.readitlater.com" } } diff --git a/infrastructure/user-list-search/queue_users_ecs.tf b/infrastructure/user-list-search/queue_users_ecs.tf index 9885ddc68..0c0198615 100644 --- a/infrastructure/user-list-search/queue_users_ecs.tf +++ b/infrastructure/user-list-search/queue_users_ecs.tf @@ -72,7 +72,7 @@ module "queue_users" { resource "aws_ecs_task_definition" "queue_users" { family = "${local.prefix}-QueueUsers" - container_definitions = "[${module.queue_users.json_map_encoded}, ${module.otel.json_map_encoded}]" + container_definitions = "[${module.queue_users.json_map_encoded}]" task_role_arn = aws_iam_role.ecs_task_role.arn execution_role_arn = aws_iam_role.ecs_execution_role.arn diff --git a/infrastructure/v3-proxy-api/src/config/index.ts b/infrastructure/v3-proxy-api/src/config/index.ts index fae3a2019..d54e34cac 100644 --- a/infrastructure/v3-proxy-api/src/config/index.ts +++ b/infrastructure/v3-proxy-api/src/config/index.ts @@ -38,4 +38,9 @@ export const config = { component_code: `pocket-${name.toLowerCase()}`, env_code: isDev ? 'dev' : 'prod', }, + tracing: { + url: isDev + ? 'https://otlp-collector.getpocket.dev' + : 'https://otlp-collector.readitlater.com', + }, }; diff --git a/infrastructure/v3-proxy-api/src/main.ts b/infrastructure/v3-proxy-api/src/main.ts index 24f8f7527..87d636b52 100644 --- a/infrastructure/v3-proxy-api/src/main.ts +++ b/infrastructure/v3-proxy-api/src/main.ts @@ -112,6 +112,10 @@ class Stack extends TerraformStack { name: 'ENVIRONMENT', value: process.env.NODE_ENV ?? 'development', // this gives us a nice lowercase production and development }, + { + name: 'OTLP_COLLECTOR_URL', + value: config.tracing.url, + }, ], secretEnvVars: [ { @@ -128,40 +132,6 @@ class Stack extends TerraformStack { }, ], }, - { - name: 'otel-collector', - containerImage: 'pocket/opentelemetry-collector-contrib', - essential: true, - logMultilinePattern: '^\\S.+', - logGroup: this.createCustomLogGroup('otel-collector'), - portMappings: [ - { - hostPort: 4138, - containerPort: 4138, - }, - { - hostPort: 4137, - containerPort: 4137, - }, - { - hostPort: 55681, - containerPort: 55681, - }, - ], - envVars: [ - { - name: 'DEPLOYMENT_ENVIRONMENT_NAME', - value: config.tags.env_code, - }, - ], - secretEnvVars: [ - { - name: 'GOOGLE_APPLICATION_CREDENTIALS_JSON', - valueFrom: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/GCP_SA_TRACES:::`, - }, - ], - repositoryCredentialsParam: `arn:aws:secretsmanager:${region.name}:${caller.accountId}:secret:Shared/DockerHub`, - }, ], codeDeploy: { useCodeDeploy: true, diff --git a/packages/tracing/package.json b/packages/tracing/package.json index da0cc2745..2f986857f 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -75,6 +75,7 @@ "@opentelemetry/id-generator-aws-xray": "1.2.2", "@opentelemetry/instrumentation-knex": "0.40.0", "@opentelemetry/propagator-aws-xray": "1.26.0", + "@opentelemetry/resource-detector-aws": "1.6.1", "@opentelemetry/resources": "1.26.0", "@opentelemetry/sdk-metrics": "1.26.0", "@opentelemetry/sdk-node": "0.53.0", diff --git a/packages/tracing/src/tracing.ts b/packages/tracing/src/tracing.ts index 7c523f22c..b59f8bad2 100644 --- a/packages/tracing/src/tracing.ts +++ b/packages/tracing/src/tracing.ts @@ -8,7 +8,7 @@ import { } from '@opentelemetry/api'; import { KnexInstrumentation } from '@opentelemetry/instrumentation-knex'; -import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; import { PrismaInstrumentation } from '@prisma/instrumentation'; import { Detector, Resource } from '@opentelemetry/resources'; import { @@ -18,7 +18,7 @@ import { import { SentrySampler } from '@sentry/opentelemetry'; // import { PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics'; -// import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-grpc'; +// import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http'; import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; import { @@ -29,6 +29,7 @@ import { hostDetectorSync, processDetectorSync, } from '@opentelemetry/resources'; +import { awsEcsDetectorSync } from '@opentelemetry/resource-detector-aws'; import * as Sentry from '@sentry/node'; import type { NodeClient } from '@sentry/node'; @@ -57,9 +58,7 @@ export type TracingConfig = { release: string; samplingRatio?: number; graphQLDepth?: number; - grpcDefaultPort?: number; - httpDefaultPort?: number; - host?: string; + url?: string; logger?: DiagLogger; sentry: NodeClient | undefined; additionalInstrumentations?: AdditionalInstrumentation[]; @@ -70,9 +69,7 @@ const tracingDefaults: TracingConfig = { release: 'unknown', sentry: undefined, graphQLDepth: 8, - grpcDefaultPort: 4317, - httpDefaultPort: 4318, - host: 'localhost', + url: 'http://localhost:4318', logger: new DiagConsoleLogger(), additionalInstrumentations: [], }; @@ -122,7 +119,7 @@ export async function nodeSDKBuilder(config: TracingConfig) { const _traceExporter = new OTLPTraceExporter({ //collector url - url: `http://${config.host}:${config.grpcDefaultPort}`, + url: config.url, }); // const _metricReader = new PeriodicExportingMetricReader({ @@ -181,6 +178,7 @@ export async function nodeSDKBuilder(config: TracingConfig) { awaitAttributes(envDetectorSync), awaitAttributes(hostDetectorSync), awaitAttributes(processDetectorSync), + awaitAttributes(awsEcsDetectorSync), ], }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95e4c8a1c..7f605190f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2269,6 +2269,9 @@ importers: '@opentelemetry/propagator-aws-xray': specifier: 1.26.0 version: 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resource-detector-aws': + specifier: 1.6.1 + version: 1.6.1(@opentelemetry/api@1.9.0) '@opentelemetry/resources': specifier: 1.26.0 version: 1.26.0(@opentelemetry/api@1.9.0) diff --git a/servers/client-api/config/router.yaml b/servers/client-api/config/router.yaml index af931ab75..8564477dd 100644 --- a/servers/client-api/config/router.yaml +++ b/servers/client-api/config/router.yaml @@ -169,8 +169,8 @@ telemetry: header_name: 'pocket-trace-id' otlp: enabled: true - endpoint: 'http://${env.OTLP_COLLECTOR_HOST:-localhost}:4317' - protocol: grpc + endpoint: '${env.OTLP_COLLECTOR_URL:-http://localhost:4318}' + protocol: http batch_processor: scheduled_delay: 100ms max_concurrent_exports: 1000 diff --git a/servers/list-api/src/config/index.ts b/servers/list-api/src/config/index.ts index 7e1d0b135..2a37e084f 100644 --- a/servers/list-api/src/config/index.ts +++ b/servers/list-api/src/config/index.ts @@ -123,7 +123,7 @@ export default { }, }, tracing: { - host: process.env.OTLP_COLLECTOR_HOST || 'localhost', + url: process.env.OTLP_COLLECTOR_URL || 'http://localhost:4318', release: process.env.GIT_SHA || '', serviceName, graphQLDepth: 8, diff --git a/servers/otel-collector/httpd.conf b/servers/otel-collector/httpd.conf index 545d6d2dc..470a5befa 100644 --- a/servers/otel-collector/httpd.conf +++ b/servers/otel-collector/httpd.conf @@ -3,7 +3,6 @@ server { listen 3000 default_server; listen [::]:3000 default_server; - # Everything is a 200 location /status { default_type application/json; return 200 '{"status": "ok"}'; diff --git a/servers/otel-collector/otel-collector-config.yaml b/servers/otel-collector/otel-collector-config.yaml index 2c1a4b563..a9a338063 100644 --- a/servers/otel-collector/otel-collector-config.yaml +++ b/servers/otel-collector/otel-collector-config.yaml @@ -46,7 +46,11 @@ processors: - key: host.id from_attribute: aws.ecs.task.id action: upsert +<<<<<<< HEAD # https://opentelemetry.io/docs/specs/semconv/resource/deployment-environment/ +======= + # https://opentelemetry.io/docs/specs/semconv/resource/deployment-environment/ +>>>>>>> 78c069da (fix(collector): move to an otel collector) - key: deployment.environment.name value: ${env:DEPLOYMENT_ENVIRONMENT_NAME} action: upsert diff --git a/servers/parser-graphql-wrapper/src/config/index.ts b/servers/parser-graphql-wrapper/src/config/index.ts index 8faf0d953..10f124fa7 100644 --- a/servers/parser-graphql-wrapper/src/config/index.ts +++ b/servers/parser-graphql-wrapper/src/config/index.ts @@ -14,7 +14,7 @@ export default { graphQLDepth: 8, // very permissive limit on depth tracing release: process.env.GIT_SHA || 'local', serviceName: 'parser-graphql-wrapper', - host: process.env.OTLP_COLLECTOR_HOST || 'localhost', + url: process.env.OTLP_COLLECTOR_URL || 'http://localhost:4318', }, app: { environment: process.env.NODE_ENV || 'development', diff --git a/servers/user-api/src/config/index.ts b/servers/user-api/src/config/index.ts index bb539fea6..35c694aee 100644 --- a/servers/user-api/src/config/index.ts +++ b/servers/user-api/src/config/index.ts @@ -81,7 +81,7 @@ export default { }, serviceName, tracing: { - host: process.env.OTLP_COLLECTOR_HOST || 'localhost', + url: process.env.OTLP_COLLECTOR_URL || 'http://localhost:4318', serviceName: serviceName, release: process.env.GIT_SHA || 'local', }, diff --git a/servers/user-list-search/src/config/index.ts b/servers/user-list-search/src/config/index.ts index 1408424d5..5213e49ae 100644 --- a/servers/user-list-search/src/config/index.ts +++ b/servers/user-list-search/src/config/index.ts @@ -7,7 +7,7 @@ const localAwsEndpoint = export const config = { serviceName: 'user-list-search', tracing: { - host: process.env.OTLP_COLLECTOR_HOST || 'localhost', + url: process.env.OTLP_COLLECTOR_URL || 'http://localhost:4318', release: process.env.GIT_SHA || '', serviceName: 'user-list-search', }, diff --git a/servers/v3-proxy-api/src/config/index.ts b/servers/v3-proxy-api/src/config/index.ts index f95b4b9c7..0db6fc665 100644 --- a/servers/v3-proxy-api/src/config/index.ts +++ b/servers/v3-proxy-api/src/config/index.ts @@ -13,7 +13,7 @@ export default { 9346, 7035, 15449, 22931, 23283, 53720, 60289, 70018, 73360, ], tracing: { - host: process.env.OTLP_COLLECTOR_HOST || 'localhost', + url: process.env.OTLP_COLLECTOR_URL || 'http://localhost:4318', serviceName: 'v3-api-proxy', release: process.env.GIT_SHA || 'local', },