Skip to content
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

enhancements for sentry 8 #6

Open
visualphoenix opened this issue Nov 2, 2015 · 2 comments
Open

enhancements for sentry 8 #6

visualphoenix opened this issue Nov 2, 2015 · 2 comments

Comments

@visualphoenix
Copy link
Contributor

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?

@visualphoenix
Copy link
Contributor Author

Also, do we want to handle backwards compatibility to older Sentry 7.x?

@rpatterson
Copy link

For those looking for a way to capture Sentry events from syslog, you might find my sentry-syslog script helpful. It can be used, for example, as the binary for Rsyslog's omprog output module to send syslog messaages to Sentry as breadcrumbs and events.

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

No branches or pull requests

2 participants