You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible currently to take a Instream.Series implementation and encode it to string?
The use-case is to send metrics from server to a metrics poller. Meaning that the poller will actually insert the data in database and all I have to do is send series encoded as string.
The text was updated successfully, but these errors were encountered:
Depending on the string format you need you should receive something usable by taking the following steps (both last v1.0.0 release and current development version):
# create/query your point with valuespoint=%MySeries{}# convert it to a plain mapdata=%{measurement: MySeries.__meta__(:measurement),fields: Map.from_struct(point.fields),tags: Map.from_struct(point.tags),timestamp: timestamp}# convert it to InfluxDB line formatline=Instream.Encoder.Line.encode(data)
I will update the line format encoder to not require the conversion to plain maps and have public documentation.
Untested but if you want to generate a JSON string the following could work if you are using :jason:
It is possible currently to take a
Instream.Series
implementation and encode it to string?The use-case is to send metrics from server to a metrics poller. Meaning that the poller will actually insert the data in database and all I have to do is send series encoded as string.
The text was updated successfully, but these errors were encountered: