Class: Fluent::Plugin::SentryOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::Plugin::SentryOutput
- Defined in:
- lib/fluent/plugin/out_raven.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/fluent/plugin/out_raven.rb', line 29 def configure(conf) super Raven.configure do |config| config.dsn = dsn config.current_environment = environment end end |
#start ⇒ Object
38 39 40 |
# File 'lib/fluent/plugin/out_raven.rb', line 38 def start super end |
#write(chunk) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/fluent/plugin/out_raven.rb', line 42 def write(chunk) tag = chunk..tag chunk.each do |time, record| Raven. record['message'], logger: 'fluent-sentry-logger', level: record['level'] || @default_level, tags: { worker: record['worker'], tag: tag } end end |