logary icon indicating copy to clipboard operation
logary copied to clipboard

InfluxDB target, 'pretty' printed field

Open btrepp opened this issue 7 years ago • 4 comments

It would be nice if the influxdb target had a field for the formatted log string. It sends the template string, and the fields, but it would be nice if there was a entry in the point that had them combined.

This would make it easier to read in tools like Grafana.

This may even apply to different targets aswell.

btrepp avatar May 18 '18 06:05 btrepp

@btrepp This is a good idea. It's also a very easy thing to build and test; especially since a similar formatting is done for gauges in v5/master. I added the "help wanted" tag if someone wants to get into this.

haf avatar May 23 '18 17:05 haf

I'm willing to give this a shot. Do you have any advice about where/how you would want this done?. It could be done on the logging domain objects, or I can focus it just on the influx target.

btrepp avatar May 24 '18 01:05 btrepp

I think the formatted log string can be seen here in the Stackdriver target: https://github.com/logary/logary/blob/master/src/targets/Logary.Targets.Stackdriver/Target_Stackdriver.fs#L208

baronfel avatar May 24 '18 01:05 baronfel

Tests here https://github.com/logary/logary/blob/master/src/tests/Logary.Targets.InfluxDb.Tests/LineProtocol.fs#L183

@baronfel Is right about formatting

Add as field https://github.com/logary/logary/blob/master/src/targets/Logary.Targets.InfluxDb/Targets_InfluxDb.fs#L261

haf avatar May 24 '18 12:05 haf