Skip to content

Add Telemetry integration#887

Merged
whatyouhide merged 4 commits into
masterfrom
al/telemetry-integration
May 21, 2025
Merged

Add Telemetry integration#887
whatyouhide merged 4 commits into
masterfrom
al/telemetry-integration

Conversation

@whatyouhide
Copy link
Copy Markdown
Collaborator

@whatyouhide whatyouhide commented May 15, 2025

I think this would be a really helpful addition!

Corresponding docs PR.

Copy link
Copy Markdown
Collaborator

@solnic solnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indeed a very useful thing to have! Left a couple of comments, otherwise LGTM 🚀

Comment thread lib/sentry/integrations/telemetry.ex Outdated
interpolation_parameters: [inspect(metadata[:handler_id])]
)

Sentry.capture_message("Telemetry handler %s failed", options)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a warning or even an error?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already an error that gets reported to Sentry. Not sure what you mean here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@whatyouhide oh I just assumed that capture_message doesn't send an error by default, and sends an info-level message instead. IIRC Sentry displays and manages these messages differently, especially when it comes to notifications.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're thinking about logging. These get displayed as errors.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@whatyouhide messages in Sentry do have levels too, and our SDK supports level option in capture_message. I just checked and luckily the default level is error.

One thing I noticed is that the UI displays "(no error message)" which may be a little confusing for the users.

image

@whatyouhide whatyouhide merged commit 84e61f5 into master May 21, 2025
5 checks passed
@whatyouhide whatyouhide deleted the al/telemetry-integration branch May 21, 2025 13:19
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.

2 participants