Skip to content

Improve framework logging and diagnostics context #26

Description

@iriswolf

Source feedback

A user reviewing the alpha said logs should be improved. Multiple conversations also showed that production users will ask what failed, which handler ran, and why an update was skipped or rejected.

Current state

TeleFlow has middleware and transport logs, but the logging contract needs a deliberate audit before 1.0 so diagnostics feel enterprise-ready and consistent.

Target state

Define stable logging events and diagnostic context for update processing, routing, filters, middleware, handlers, callbacks, Telegram client calls, rate limits, and exception paths.

Acceptance criteria

  • The audit lists current log events and missing runtime scenarios.
  • Logs include useful context without leaking bot tokens, callback payload secrets, or user-provided sensitive data by default.
  • Event IDs and message templates are stable enough for production log search.
  • Handler failures, Telegram API failures, routing misses, filter rejections, and rate-limit rejections have clear log semantics.
  • Tests cover log emission for critical failure paths where practical.
  • EN/RU docs include a logging guide and production recommendations.

Non-goals

  • Do not build full OpenTelemetry here; that is tracked separately.
  • Do not add noisy per-update logs that make production logs unusable by default.

Metadata

Metadata

Assignees

Labels

area:clientTelegram Bot API client, transport, defaults, and request executionarea:frameworkHandler framework, dispatcher, filters, callbacks, and contextsenhancementNew feature or requestpriority:p1High priority workstatus:needs-designNeeds API, architecture, or behavior design before implementation

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions