Skip to content

Alerting: Support Telegram image caption configuration - #129330

Open
zebrapurring wants to merge 2 commits into
grafana:mainfrom
zebrapurring:telegram-image-captions
Open

Alerting: Support Telegram image caption configuration#129330
zebrapurring wants to merge 2 commits into
grafana:mainfrom
zebrapurring:telegram-image-captions

Conversation

@zebrapurring

Copy link
Copy Markdown

What is this feature?

Adds an opt-in send_message_as_caption setting to Telegram contact points.

When enabled, notifications containing exactly one screenshot and a message within Telegram's 1024-character caption limit are sent as a single photo with the alert text as its caption.

Notifications with no screenshot, multiple screenshots, or longer messages continue using the existing separate-message behavior.

Why do we need this feature?

Grafana currently sends Telegram alert text and its screenshot as separate messages. This makes alerts harder to scan and can separate the screenshot from its context in busy channels.

Using Telegram's native photo caption support keeps the alert text and screenshot together without truncating messages or changing existing behavior by default.

Who is this feature for?

Grafana Alerting users who send panel screenshots through Telegram contact points and want each alert and its screenshot delivered as one message.

Which issue(s) does this PR fix?:

Related to grafana/alerting#123
Historical context: #10631
Depends on grafana/alerting#642

Special notes for your reviewer:

The setting is disabled by default.

The combined delivery path is used only for one unique screenshot and a caption of at most 1024 Unicode characters. All other cases fall back to the existing delivery flow. Parse mode, protected content, silent notifications, and Telegram message thread IDs are preserved.

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle. Not applicable; this is an opt-in contact-point setting disabled by default.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc. The setting is described in the contact-point schema and UI; no separate documentation change is included.

@zebrapurring
zebrapurring requested a review from a team as a code owner July 27, 2026 15:43
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Signed commits report

All 2 commits between main and telegram-image-captions have verified signatures. ✅

@github-actions github-actions Bot added this to the 13.2.x milestone Jul 27, 2026
@cla-assistant

cla-assistant Bot commented Jul 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the pr/external This PR is from external contributor label Jul 27, 2026
@zebrapurring
zebrapurring force-pushed the telegram-image-captions branch from 3d72c80 to 3a70085 Compare July 27, 2026 16:00
Preserve the Telegram caption setting across contact point provisioning and exports. Update JSON, YAML, and HCL snapshots for the new field.
Add the opt-in Telegram image caption setting to the notifier metadata used by the alerting UI.
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions!

@github-actions github-actions Bot added the stale Issue with no recent activity label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/alerting Grafana Alerting area/backend area/frontend pr/external This PR is from external contributor stale Issue with no recent activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant