diff --git a/app/client/packages/rts/src/instrumentation.ts b/app/client/packages/rts/src/instrumentation.ts deleted file mode 100644 index 05769222ee80..000000000000 --- a/app/client/packages/rts/src/instrumentation.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - BatchSpanProcessor, - NodeTracerProvider, -} from "@opentelemetry/sdk-trace-node"; -import { Resource } from "@opentelemetry/resources"; -import { - ATTR_DEPLOYMENT_NAME, - ATTR_SERVICE_INSTANCE_ID, -} from "@opentelemetry/semantic-conventions/incubating"; -import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions"; -import { registerInstrumentations } from "@opentelemetry/instrumentation"; -import { HttpInstrumentation } from "@opentelemetry/instrumentation-http"; -import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http"; - -const APPSMITH_NEW_RELIC_OTEL_EXPORTER_OTLP_ENDPOINT = - process.env.APPSMITH_NEW_RELIC_OTEL_EXPORTER_OTLP_ENDPOINT || - "http://localhost:4318"; - -const provider = new NodeTracerProvider({ - resource: new Resource({ - [ATTR_DEPLOYMENT_NAME]: `${process.env.APPSMITH_DEPLOYMENT_NAME || "self-hosted"}`, - [ATTR_SERVICE_INSTANCE_ID]: `${process.env.HOSTNAME || "appsmith-0"}`, - [ATTR_SERVICE_NAME]: "appsmith-rts", - }), -}); - -const nrTracesExporter = new OTLPTraceExporter({ - url: `${APPSMITH_NEW_RELIC_OTEL_EXPORTER_OTLP_ENDPOINT}/v1/traces`, - headers: { - "api-key": `${process.env.APPSMITH_NEW_RELIC_OTLP_LICENSE_KEY}`, - }, -}); - -registerInstrumentations({ - instrumentations: [new HttpInstrumentation()], -}); - -const batchSpanProcessor = new BatchSpanProcessor( - nrTracesExporter, - //Optional BatchSpanProcessor Configurations - { - // The maximum queue size. After the size is reached spans are dropped. - maxQueueSize: 100, - // The maximum batch size of every export. It must be smaller or equal to maxQueueSize. - maxExportBatchSize: 50, - // The interval between two consecutive exports - scheduledDelayMillis: 500, - // How long the export can run before it is cancelled - exportTimeoutMillis: 30000, - }, -); - -provider.addSpanProcessor(batchSpanProcessor); -provider.register(); diff --git a/app/client/packages/rts/src/server.ts b/app/client/packages/rts/src/server.ts index 665fc6ae69c2..0d29730ca50c 100644 --- a/app/client/packages/rts/src/server.ts +++ b/app/client/packages/rts/src/server.ts @@ -1,4 +1,3 @@ -import "./instrumentation"; import http from "http"; import express from "express"; import type { LogLevelDesc } from "loglevel"; diff --git a/app/server/appsmith-server/src/main/resources/application.properties b/app/server/appsmith-server/src/main/resources/application.properties index ee5af36ee784..712eed456c1a 100644 --- a/app/server/appsmith-server/src/main/resources/application.properties +++ b/app/server/appsmith-server/src/main/resources/application.properties @@ -85,26 +85,6 @@ appsmith.cloud_services.signature_base_url = ${APPSMITH_CLOUD_SERVICES_SIGNATURE appsmith.cloud_services.template_upload_auth_header = ${APPSMITH_CLOUD_SERVICES_TEMPLATE_UPLOAD_AUTH:} github_repo = ${APPSMITH_GITHUB_REPO:} -# The following configurations are to help support prometheus scraping for monitoring -management.endpoints.web.exposure.include=prometheus,metrics -management.tracing.enabled=${APPSMITH_TRACING_ENABLED:false} -management.otlp.tracing.endpoint=${APPSMITH_NEW_RELIC_OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4318}/v1/traces -management.otlp.tracing.headers.api-key=${APPSMITH_NEW_RELIC_OTLP_LICENSE_KEY:} -management.opentelemetry.resource-attributes.service.name=appsmith-server -management.opentelemetry.resource-attributes.service.instance.id=${HOSTNAME:appsmith-0} -management.opentelemetry.resource-attributes.deployment.name=${APPSMITH_DEPLOYMENT_NAME:self-hosted} -management.tracing.sampling.probability=${APPSMITH_SAMPLING_PROBABILITY:0.1} -management.prometheus.metrics.export.descriptions=true -management.metrics.distribution.slo.http.server.requests=100,200,500,1000,2000,5000,10000,20000,30000 -management.metrics.distribution.slo.appsmith=100,200,500,1000,2000,5000,10000,20000,30000 - -# Observability and Micrometer related configs -# Keeping this license key around, until later -appsmith.observability.metrics.enabled=${APPSMITH_MICROMETER_METRICS_ENABLED:false} -appsmith.observability.tracing.detail.enabled=${APPSMITH_ENABLE_TRACING_DETAIL:false} -appsmith.observability.metrics.detail.enabled=${APPSMITH_ENABLE_METRICS_DETAIL:false} -appsmith.observability.metrics.interval.millis=${APPSMITH_METRICS_INTERVAL_MILLIS:60000} - # Support disabling signup with an environment variable signup.disabled = ${APPSMITH_SIGNUP_DISABLED:false} signup.allowed-domains=${APPSMITH_SIGNUP_ALLOWED_DOMAINS:}