-
-
Notifications
You must be signed in to change notification settings - Fork 185
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 integration_meta key to event #771
Conversation
lib/sentry/event.ex
Outdated
integration_meta: [ | ||
type: :map, | ||
doc: """ | ||
A map to store metadata specific to the integration. | ||
It allows cron integrations, such as the Oban integration, | ||
to store job-related metadata. *Available since v10.1.0*. | ||
""" |
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.
For now this can be doc: false
instead since integrations are all internal to the Sentry SDK.
lib/sentry/event.ex
Outdated
event = | ||
%__MODULE__{ |
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.
Can you not change the formatting of this? Makes it harder to review 🙃
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.
Ah yes! My linter did this..
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.
Silly goose linter
@@ -41,7 +41,9 @@ defmodule Sentry.Integrations.Oban.ErrorReporter do | |||
inspect(job.worker), | |||
Exception.message(exception) | |||
], | |||
extra: Map.take(job, [:args, :attempt, :id, :max_attempts, :meta, :queue, :tags, :worker]) | |||
extra: | |||
Map.take(job, [:args, :attempt, :id, :max_attempts, :meta, :queue, :tags, :worker]), |
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 need tests for this 🧪
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.
on it!
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
-Added an integration_meta key to store the metadata of a cron job, allowing the user to filter what events are reported based on the values.
-Alternate solution to PR #759
-Related to #757