-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hello,
I'm enhancing the plugin for sentry 8.x support. Part of sentry8 support includes some protocol changes.
https://docs.getsentry.com/on-premise/clientdev/attributes
Some of these changes involve sending arrays and hashes. Upstream, fluentd record_transformer (for instance) converts all record values to strings.
Option 1:
<filter **>
type record_transformer
enable_ruby
<record>
fingerprint ${require 'json' ; ["{{ default }}", "http://example.com/my.url"].to_json}
</record>
</filter>
def notify_sentry(tag, time, record)
...
event.fingerprint = JSON.parse(record['fingerprint']) if record['fingerprint']
...
Option 2
<filter **>
type record_transformer
enable_ruby
<record>
fingerprint ${["{{ default }}", "http://example.com/my.url"]}
</record>
</filter>
And then we do
def notify_sentry(tag, time, record)
...
event.fingerprint = eval(record['fingerprint']) if record['fingerprint']
...
I prefer option 1 because eval is evil. But I am unsure if we should force json. Yaml would work too. Thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels