lua-resty-influx icon indicating copy to clipboard operation
lua-resty-influx copied to clipboard

[feature request] Support for different stamps on buffer interface

Open edubart opened this issue 5 years ago • 1 comments

Currently when calling ibuf.buffer method ngx.now() * 1000 is used as stamp, would be nice to add an option to make us able to specify a different timestamp, maybe be trying to use data.stamp first on the following method:

function _M.buffer(data)
	local influx_data = {
		_measurement = lp.quote_measurement(data.measurement),
		_tag_set = lp.build_tag_set(data.tags),
		_field_set = lp.build_field_set(data.fields),
		_stamp = ngx.now() * 1000
	}

I need this for a specific use case, meanwhile I am hacking by overwriting that method on my app.

edubart avatar Jul 27 '18 18:07 edubart

Hi, sorry for the incredibly delayed response. I don't think I'll have time to work on this in the future, but patches are definitely welcome!

p0pr0ck5 avatar May 06 '19 18:05 p0pr0ck5