in my project I needed to send metrics to influxdb, I found that there are many libraries that have not been updated for a long time, those that I tried cannot be compiled in the latest versions of erlang, I am currently working on 27.3.4. What can you advise?
Have you considered OpenTelemetry ?
No, I haven’t watched it. I don’t understand how it will help me connect to influxdb
The TL;DR here is that you can use the otel lib to emit various types of telemetry from your application, allowing your application to remain agnostic as to exactly what and where you might like to send metrics.
You can read more about the OpenTelemetry Project here.
It looks like InfluxDB supports otel
it doesn’t seem like it would be easy to use this in erlang. i’m looking for a simpler and lighter solution
What’s the problem with the existing libraries? If I recall correctly I wrote one of the early versions, a and it was basically just an http client
I was under the impression that the Erlang Opentelemetry library was far from complete (and/or easy to use)? See for example the thread: Opentelemetry log example?
I pushed a dependency update to the influxdb
library here: GitHub - kopera/erlang-influxdb: Erlang/Elixir InfluxDB client
Could you try to use the master branch and report back? I don’t have a setup to test this immediately, but if it works for you I can publish it to hex.pm
As far as I can see, you do not have the ability to specify the API version and set an authorization token.
I see. Sorry but I don’t have much immediate bandwidth available to update the library. It, however, shouldn’t be too hard to improve on