-
-
Notifications
You must be signed in to change notification settings - Fork 521
Add new Sentry.logger #2620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new Sentry.logger #2620
Conversation
3843c19 to
d7546d2
Compare
1468907 to
f887ca7
Compare
No need to do this upfront because it is needed only when a log event actually gets to the envelope
16980a7 to
13863bc
Compare
0692e1a to
d879a8b
Compare
|
@sl0thentr0py this is ready for review. Please ignore ruby-head failed builds. |
sl0thentr0py
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor comments
| end | ||
| end | ||
|
|
||
| TOKEN_REGEXP = /%\{(\w+)\}/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have a clear note in docs that our templates are expected to be like
"This is a template with a %{var}"and not what ruby people are used to
"This is a template with a #{var}"
sl0thentr0py
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
sentry-ruby/lib/sentry/log_event.rb
Outdated
| end | ||
| else | ||
| parameters.each_with_index do |param, index| | ||
| attributes["sentry.message.parameters.#{index}"] = param |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they just changed this to sentry.message.parameter
see getsentry/sentry-python#4387
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something something hardest problem in computer science
|
Do you guys plan to support log drains? https://devcenter.heroku.com/articles/log-drains Trying to understand how |
|
Hey @erickreutz thanks for your interest!
We have docs for logging in Ruby here: https://docs.sentry.io/platforms/ruby/logs/. If you want more details about logs in Sentry, see our product docs: https://docs.sentry.io/product/explore/logs We don't have
Not at the current moment, we are prioritizing getting logging working via our SDKs (so that you can connect your logs and traces together automatically). We're tracking Heroku support in this GH issue: getsentry/sentry#91727. Please leave a comment about your use case, that will help us prioritize this! |
This replaces previous internal
Sentry.loggerwith a public-facing logger that supports structured logging and sending log events to Sentry viaSentry.capture_logAPI.Sample config
Sample results in the UI
Log event with a message template
Positioned parameters
Hash-based parameters
Closes #2604