Commit graph

52 commits

Author SHA1 Message Date
Nawaz Dhandala
f49b1995df
feat(telemetry): add new Telemetry service (OTel, Syslog, Fluent, Metrics, Traces) and unified ingestion pipeline
- Add Telemetry service entrypoint
  - Telemetry/Index.ts: app bootstrap, routes mounting, infrastructure init and Telemetry SDK init.

- Unified queue + worker
  - Telemetry/Jobs/TelemetryIngest/ProcessTelemetry.ts: single worker that dispatches queued jobs to specific processors (logs, traces, metrics, syslog, fluent logs).
  - Telemetry/Services/Queue/TelemetryQueueService.ts: central queue API and job payload types.
  - Per-type Queue wrappers (LogsQueueService, MetricsQueueService, TracesQueueService, FluentLogsQueueService, SyslogQueueService).

- OpenTelemetry ingestion middleware and proto support
  - Telemetry/Middleware/OtelRequestMiddleware.ts: detect OTLP endpoint (logs/traces/metrics), decode protobuf bodies using protobufjs and set product type.
  - Telemetry/ProtoFiles/OTel/v1/*.proto: include common.proto, logs.proto, metrics.proto, resource.proto, traces.proto for OTLP v1 messages.

- Ingest services
  - Telemetry/Services/OtelLogsIngestService.ts: parse incoming OTLP logs, map attributes, convert timestamps, batch insert logs.
  - Telemetry/Services/OtelTracesIngestService.ts: parse OTLP traces, build span rows, extract exceptions, batch insert spans and exceptions, save telemetry exception summary.
  - Telemetry/Services/OtelMetricsIngestService.ts: parse OTLP metrics, normalize datapoints, batch insert metrics and index metric name -> service map.
  - Telemetry/Services/SyslogIngestService.ts: syslog ingestion endpoints, parser integration, map syslog fields to attributes and logs.
  - Telemetry/Services/FluentLogsIngestService.ts: ingest Fluentd style logs, normalize entries and insert into log backend.
  - Telemetry/Services/OtelIngestBaseService.ts: helpers to resolve service name from attributes/headers.

- Syslog parser and utilities
  - Telemetry/Utils/SyslogParser.ts: robust RFC5424 and RFC3164 parser, structured data extraction and sanitization.
  - Telemetry/Tests/Utils/SyslogParser.test.ts: unit tests for parser behavior.

- Telemetry exception utilities
  - Telemetry/Utils/Exception.ts: generate exception fingerprint and upsert telemetry exception status (saveOrUpdateTelemetryException).

- Queue & job integration
  - New integration with Common/Server/Infrastructure/Queue and QueueWorker, job id generation and telemetry job types.
  - Telemetry services add ingestion jobs instead of processing synchronously.

- Config, build and dev tooling
  - Add Telemetry/package.json, package-lock.json, tsconfig.json, nodemon.json, jest config.
  - New script configs and dependencies (protobufjs, ts-node, jest, nodemon, etc).

- Docker / environment updates
  - docker-compose.base.yml, docker-compose.dev.yml, docker-compose.yml: rename service from open-telemetry-ingest -> telemetry and wire TELEMETRY_* envs.
  - config.example.env: rename and consolidate environment variables (OPEN_TELEMETRY_* -> TELEMETRY_*, update hostnames and ports).
  - Tests/Scripts/status-check.sh: update ready-check target to telemetry/status/ready.

- Other
  - Telemetry/Services/Queue/*: export helpers and legacy-compatible job interface shims.
  - Memory cleanup and batching safeguards across ingest services.
  - Logging and capture spans added to key code paths.

BREAKING CHANGES / MIGRATION NOTES:
- Environment variables and docker service names changed:
  - Replace OPEN_TELEMETRY_... vars with TELEMETRY_... (PORT, HOSTNAME, CONCURRENCY, DISABLE_TELEMETRY, etc).
  - docker-compose entries moved from "open-telemetry-ingest" to "telemetry" and image name changed to oneuptime/telemetry.
  - Update any deployment automation and monitoring checks referencing the old service name or endpoints.
- Consumers: OTLP endpoints and behavior remain supported, but ingestion is now queued and processed asynchronously.

Testing / Running:
- Install deps in Telemetry/ (npm install) after syncing Common workspace.
- Run dev: npx nodemon (nodemon.json) or build & start using provided scripts.
- Run tests with jest (Telemetry test suite includes SyslogParser unit tests).

Files added/modified (high level):
- Added many files under Telemetry/: Index, Jobs, Middleware, ProtoFiles, Services, Utils, Tests, package and config artifacts.
- Modified docker-compose.* and config.example.env and status check script to use new TELEMETRY service/vars.
2025-11-07 21:36:47 +00:00
Simon Larsen
69ae1eb310
chore(ci/infra): remove FluentIngest from workflows, charts and compose; bump OpenTelemetryIngest deps
- Remove FluentIngest CI jobs and release/test deploy steps (build.yml, compile.yml, release.yml, test-release.yaml)
- Delete test.fluent-ingest workflow
- Remove Fluent-related env vars/hostnames from config.example.env, docker-compose.base.yml, HelmChart templates and EnvironmentConfig.ts
- Remove fluent-ingest service block from docker-compose.base.yml
- Bump Playwright and TypeORM versions in OpenTelemetryIngest package-lock.json
2025-11-07 18:46:27 +00:00
Nawaz Dhandala
9544dc2a6c
chore(env): use explicit callback body for prefix startsWith check in getFrontendEnvVars 2025-11-04 16:47:07 +00:00
Simon Larsen
5f1f0cde4a
fix(env): restrict frontend env vars and use sanitized getFrontendEnvVars in env.js
Add getFrontendEnvVars with an allow-list and allowed prefixes to EnvironmentConfig to avoid exposing the entire process.env to the browser. Update StartServer to use getFrontendEnvVars when rendering /env.js and embed the serialized env object directly.
2025-11-04 16:08:47 +00:00
Nawaz Dhandala
5851286548
feat(coressl): add automated Let's Encrypt provisioning for primary host
- add ProvisionPrimaryDomain worker job to order/renew ACME certificates for the HOST
- register job import in Worker Routes
- add ProvisionSsl env flag in Common/Server/EnvironmentConfig
- expose PROVISION_SSL in Helm chart (values.yaml, values.schema.json, _helpers.tpl)
2025-11-03 20:48:07 +00:00
Nawaz Dhandala
d84cfe9b09
refactor(enterprise): register EnterpriseLicense migration and clean up license validation/env config; refactor(edition-label): adjust alert formatting 2025-11-03 18:35:00 +00:00
Nawaz Dhandala
12ff3062de
feat(enterprise): add server license validation endpoint and integrate UI
- Add POST /global-config/license handler to validate enterprise license via
  EnterpriseLicenseValidationUrl and store results in GlobalConfig.
- Introduce EnterpriseLicenseValidationUrl in EnvironmentConfig.
- Update EditionLabel to call /global-config/license (POST) for validation,
  remove direct ModelAPI update and ObjectID usage, and replace inline messages
  with Alert component. Minor styling and import cleanup.
2025-11-03 18:21:23 +00:00
Simon Larsen
87d709dd05
feat(enterprise): add EnterpriseLicense model, service and API; register model/service and add IsEnterpriseEdition env flag 2025-11-03 12:19:55 +00:00
Nawaz Dhandala
34737fbba4
feat(telemetry): account for Exceptions in usage billing and add avg exception row size
- Update TelemetryUsageBilling description to include Exceptions.
- Add AverageExceptionRowSizeInBytes env/config (env example, docker-compose, Helm values & schema).
- Use ExceptionInstanceService in TelemetryUsageBillingService to include exception row counts when estimating bytes for Traces.
- Add helper to read average exception row size and adjust billing calculations.
2025-10-27 16:26:46 +00:00
Nawaz Dhandala
e6fd4b8304
refactor(types): add explicit typings for env parser and telemetry billing
Add a full function signature for parsePositiveNumberFromEnv and strengthen typing in TelemetryUsageBillingService: import TelemetryServiceModel, type telemetryServices as Array<TelemetryServiceModel>, and annotate count results as PositiveNumber for traces, logs and metrics to improve type-safety and readability.
2025-10-23 20:02:57 +01:00
Nawaz Dhandala
4a3a743dcd
chore(format): normalize multiline argument formatting in EnvironmentConfig and TelemetryUsageBillingService 2025-10-23 19:53:09 +01:00
Nawaz Dhandala
b1bc02cec4
feat(env): add average telemetry row size env vars with validation
- introduce parsePositiveNumberFromEnv helper in EnvironmentConfig.ts
- add AverageSpan/Log/MetricRowSizeInBytes exports with positive-number parsing and defaults
- document AVERAGE_* vars in config.example.env and expose them in docker-compose.base.yml
2025-10-23 19:49:24 +01:00
Nawaz Dhandala
73cc5f8f9e
fix: update route handling in EnvironmentConfig for consistency 2025-10-16 15:04:52 +01:00
Nawaz Dhandala
b67c702d4d
Refactor Microsoft Teams integration components and improve code readability
- Removed unnecessary blank lines in Workspace.ts and MicrosoftTeamsIntegration.tsx.
- Reformatted function parameters for better readability in WorkspaceType.ts.
- Simplified imports in MicrosoftTeamsIntegration.tsx and NotificationRuleForm.tsx.
- Enhanced conditional checks for better clarity in NotificationRuleForm.tsx and NotificationRuleViewElement.tsx.
- Improved formatting and consistency in MicrosoftTeamsIntegrationDocumentation.tsx.
- Updated state management and conditional rendering in WorkspaceNotificationRulesTable.tsx.
- Ensured consistent use of line breaks and indentation across various components for improved maintainability.
2025-09-29 16:59:33 +01:00
Simon Larsen
25d5cc2a47
refactor: Remove HomeClientUrl export from EnvironmentConfig for code clarity 2025-09-26 14:38:40 +01:00
Simon Larsen
b6802bf949
Merge branch 'master' into v4-ms-teams 2025-09-26 14:23:46 +01:00
Simon Larsen
d838d377a0
feat: Add HomeClientUrl to EnvironmentConfig and update RSS feed URL generation to use HttpProtocol 2025-09-23 20:22:56 +01:00
Simon Larsen
80388adb59
refactor: Implement JWT validation for Bot Framework authentication in MicrosoftTeamsAPI 2025-09-17 21:23:32 +01:00
Simon Larsen
9925a6a5a5
feat: Update MicrosoftTeamsAPI and EnvironmentConfig to improve app manifest handling and add HomeClientUrl 2025-09-16 21:17:51 +01:00
Simon Larsen
0e5c0d1509
feat: Add Microsoft Teams integration with configuration and action types 2025-09-16 09:32:43 +01:00
Nawaz Dhandala
170bfa8515
refactor: Improve code formatting and consistency across SCIM-related files 2025-08-05 11:03:00 +01:00
Simon Larsen
2f517d8dcc
feat: Update SCIM documentation URLs to use environment configuration 2025-08-05 11:00:18 +01:00
Simon Larsen
a59c98d7e6
feat: Add VAPID configuration for web push notifications in EnvironmentConfig and update PushNotificationService 2025-07-16 20:28:39 +01:00
Simon Larsen
8e788d0acc
refactor: move ConfigLogLevel to a separate file and update imports 2025-05-27 20:46:30 +01:00
Simon Larsen
81a7dcbab6
refactor: Update import paths for consistency across various components 2025-05-21 16:46:53 +01:00
Simon Larsen
0488770151
refactor: Update import paths to use relative paths for consistency across DatabaseConfig, EnvironmentConfig, DataSourceOptions, and various AnalyticsDatabase types 2025-05-21 15:04:22 +01:00
Simon Larsen
54c526ffed
Refactor import paths in utility files to use relative paths instead of absolute paths. This change enhances module resolution and maintains consistency across the codebase. Updated imports in Execute.ts, Express.ts, Greenlock.ts, JsonToCsv.ts, JsonWebToken.ts, LocalFile.ts, Logger.ts, various Monitor criteria files, Realtime.ts, Response.ts, StartServer.ts, Stream.ts, Telemetry.ts, TwoFactorAuth.ts, VMAPI.ts, VMRunner.ts, and Workspace files. 2025-05-21 13:55:49 +01:00
Simon Larsen
8581864d17
refactor: Clean up code formatting and improve readability across multiple files 2025-04-23 13:18:51 +01:00
Simon Larsen
6eda76709e
feat: Update nodemon configuration and add webpack-cli to dependencies; enhance MasterPage to set favicon dynamically 2025-04-23 10:42:51 +01:00
Simon Larsen
2ae0d139ea
refactor: simplify WorkflowTimeoutInMs declaration in EnvironmentConfig 2025-02-20 14:02:49 +00:00
Simon Larsen
1507583cf3
feat: add workflow timeout configuration and update related files 2025-02-20 14:00:28 +00:00
Simon Larsen
e9b7368cf1
refactor: clean up code by removing unnecessary whitespace and improving formatting 2025-02-05 13:58:27 +00:00
Simon Larsen
b007cb8bbd
feat: implement Slack integration settings page and enhance auth token services for user and project 2025-02-05 13:43:22 +00:00
Simon Larsen
b02fed6e5b
feat: add Slack App configuration to environment and UI settings 2025-02-04 14:33:48 +00:00
Simon Larsen
985b5410f6
refactor: clean up formatting and improve code readability in environment config and project service 2025-02-03 17:54:41 +00:00
Simon Larsen
d1dd57deec
feat: add Slack webhook notifications for user creation, project management, and subscription updates 2025-02-03 17:50:34 +00:00
Simon Larsen
70aae7c59a
fix: update RedisIPFamily initialization to handle undefined environment variable 2024-12-24 20:13:21 +00:00
Jules Lefebvre
8704f47b44
feat(common/infra): allow to chose redis ip familly
Introduce a new environment variable (`REDIS_IP_FAMILY`) to choose witch version
of the IP protocol to use in Redis.
2024-12-24 13:06:39 +01:00
Simon Larsen
0848dfc5d6
Refactor EnvironmentConfig and StatusPageService for improved readability and consistency 2024-12-16 10:25:26 +00:00
Simon Larsen
88cf2c3cb0
Add configuration options to disable automatic alert and incident creation 2024-12-16 09:57:24 +00:00
Simon Larsen
d27c161665
Add OFF log level to ConfigLogLevel enum and update documentation in values.yaml 2024-11-22 13:00:06 +00:00
Simon Larsen
815ae7161d
Rename Ingestor to ProbeIngest; update configurations, routes, and Docker support; add new request types and workflows 2024-11-21 17:18:22 +00:00
Simon Larsen
3a1f5c7120
Refactor OpenTelemetry Ingest Dockerfile and configuration; update environment variables and docker-compose for new service integration 2024-11-21 17:08:35 +00:00
Simon Larsen
eec51342de
Add configuration files for OpenTelemetry Ingest, including .gitignore, .dockerignore, and nodemon.json; refactor code for consistency and clarity 2024-11-21 16:42:29 +00:00
Simon Larsen
945cef653c
Add Incoming Request Ingest service with configuration, Docker support, and tests 2024-11-21 14:41:37 +00:00
Simon Larsen
9244e49e6b
Add Fluent Ingest service with configuration, Docker support, and tests 2024-11-21 13:31:11 +00:00
Simon Larsen
1a15cb31f7
Add WorkflowHostname configuration and update WorkflowService to use it 2024-09-18 12:36:44 +01:00
Simon Larsen
86168a50ee
Add Worker service configuration, deployment setup, and Nginx routing 2024-09-16 08:42:50 -07:00
Simon Larsen
f728a94a80
Add Home service configuration and deployment setup 2024-09-16 08:11:21 -07:00
Simon Larsen
cc7696f481
refactor: Update telemetry exception view layout components 2024-08-26 08:58:45 +01:00