sonyxperiadev / lumber-mill

Where logs are cut into lumber
Apache License 2.0
12 stars 6 forks source link

Graphite carbon and events considerations #19

Closed jrask closed 7 years ago

jrask commented 8 years ago
 graphite.carbon (
    host: 'localhost',
    port: 2003,
    dry: dry,
    metrics: [
        'something.{metric}': '{value}'
    ]
)
 graphite.events (
    host: 'localhost',
    port: 80,
    dry: dry,
    event: [
        what: '{shortMessage}',
        data: '{message}',
        tags:['{level}','error']
    ]
)
jrask commented 8 years ago

Beginning to dislike the configuration options with groovy.. they are nice to look at but it is hard to write them without code completion.. Considering trying this out as an alternative.

graphite.carbon()
   .host("localhost")
   .port(2003)
   .metric("something.{metric}", "{value}")
   .metric("something2.{metric}", "{value}")
   .build()
graphite.events()
   .host("localhost")
   .port(2003)
   .what("{shortMessage}")
   .data("{message}")
   .tag("{level}")
   .tag("error")
   .build()