Skip to content

feat: OpenTelemetry instrumentation#67

Draft
lorenzocorallo wants to merge 3 commits intomainfrom
opentel
Draft

feat: OpenTelemetry instrumentation#67
lorenzocorallo wants to merge 3 commits intomainfrom
opentel

Conversation

@lorenzocorallo
Copy link
Member

No description provided.

lorenzocorallo and others added 2 commits March 10, 2026 14:34
Implement full OpenTelemetry instrumentation for the LGTM stack:

- Auto-instrumentation: HTTP (tRPC + Telegram API), Redis, Pino log correlation
- Manual spans: grammY update processing, command execution, automoderation checks
- Custom sampler: always trace commands/automod, sample storage at configurable rate
- Metrics: command counts, automod actions, update counts, storage buffer size, tRPC duration
- tRPC custom link for procedure-level duration histograms
- Environment config: OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME, OTEL_STORAGE_SAMPLE_RATE
- Graceful OTel SDK shutdown integrated with bot termination handler
- SDK loaded via --import flag for proper auto-instrumentation patching

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore removed inline documentation, reduce automoderation tracing noise, improve handled-error recording, and align env/version handling with runtime constraints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 851a6157-b885-47c5-a097-86a318aaaebc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

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.

1 participant