Skip to content

feat: log otel bootstrap errors via nest logger - #1727

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
shogun444:feat/otel-bootstrap-logger
Sep 28, 2026
Merged

RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
shogun444:feat/otel-bootstrap-logger

Conversation

@shogun444

Copy link
Copy Markdown
Contributor

Description

Replaces direct console.error calls during OpenTelemetry bootstrap and shutdown with a NestJS Logger instance to ensure SDK lifecycle failures are properly structured and surfaced according to application logging standards.

Closes #1536

Changes

  • Structured Logging for OpenTelemetry (src/tracing/opentelemetry.ts):
    • Initialized a NestJS Logger('OpenTelemetry') instance.
    • Replaced raw console.error calls for SDK startup failures and SIGINT/SIGTERM shutdown errors with logger.error(message, error).
    • Removed redundant eslint-disable no-console rule.
  • Kept OpenTelemetry internal diagnostic logger (diag) and SDK/exporter initialization intact.

Verification

  • pnpm run typecheck: Exit 0 (clean).
  • pnpm run lint:ci -- src/tracing/opentelemetry.ts: Exit 0 (clean).
  • pnpm jest src/logging --runInBand --forceExit: 4 suites, 61 tests passed.

Acceptance Criteria Checklist

  • Tracing start/shutdown failures emitted via logger, not console.error
  • CI checks passing
  • Starred the repository

@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@shogun444 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 19e91b9 into rinafcode:main Sep 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenTelemetry bootstrap uses console.error instead of the app logger

2 participants