Skip to content

feat(sqsdlq-otel): implement Dead Letter Queue and OpenTelemetry tracing#5

Open
berkdurmus wants to merge 1 commit intofeat/api-sqsfrom
feat/sqsdlq-otel
Open

feat(sqsdlq-otel): implement Dead Letter Queue and OpenTelemetry tracing#5
berkdurmus wants to merge 1 commit intofeat/api-sqsfrom
feat/sqsdlq-otel

Conversation

@berkdurmus
Copy link
Owner

This PR introduces two major features to improve the trace-station API's reliability and observability:

Dead Letter Queue (DLQ) Implementation

  • Added DLQ configuration and auto-setup in the SQS service
  • Implemented message redriving capability to move failed messages from DLQ back to main queue
  • Added new API endpoints to view and manage failed messages
  • Added comprehensive documentation in DEAD_LETTER_QUEUE.md
  • Configured maximum retry count (default: 3 attempts) before messages move to DLQ

OpenTelemetry Tracing Implementation

  • Added complete tracing setup with auto-instrumentation for Node.js libraries
  • Implemented custom tracing for SQS operations and trace processing
  • Added graceful shutdown for proper tracing cleanup
  • Created detailed documentation in OPENTELEMETRY.md
  • Fixed TypeScript errors related to deprecated semantic conventions:
    • Replaced SemanticResourceAttributes with individual attribute constants
    • Used proper entry points for stable and incubating attributes

Additional Features

  • Added support for mock mode in both features via environment variables:
    • MOCK_SQS=true for local development without AWS
    • MOCK_TRACING=true for local development without an OpenTelemetry collector

These changes enhance the API by improving reliability through better error handling with DLQ and providing observability through distributed tracing.

@berkdurmus berkdurmus added the enhancement New feature or request label May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant