You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
403 B

[workspace]
members = [
"src/rust/vlcrs-core",
"src/rust/vlcrs-macros",
"src/rust/vlcrs-messages",
"src/rust/vlcrs-utils",
logger: add telegraf tracer The tracer is designed to send the metrics towards a telegraf server using this kind of configuration: [[inputs.socket_listener]] service_address = "tcp://localhost:8094" The telegraf server can then forward the metrics towards an influxdb server for monitoring or directly to grafana live server[^1] for introspection. The influxdb database can also be used to query the metrics after they've been indexed. The application using the tracer can use the VLC_TELEGRAF_ENDPOINT environment variable (eg. VLC_TELEGRAF_ENDPOINT=tcp://127.0.0.1:8094) to set where the tracer will output the traces to. A bunch of notes and improvement left for later: - Unsafe code is still used for accessing the fields data since an union is used and union access is unsafe. It could probably be wrapped from the binding implementation. - There is no way to specify the address using the configuration since vlc_variable is not bound to the Rust bindings and no unsafe extern "C" code is done from the plugin. - The tracer currently panic as the telegraf server dies because it doesn't handle reconnection. Proper reconnection logic with maybe size-limited temporary storing might be a proper workaround for that. - The tracer doesn't use the timestamp provided by VLC right now, proper time conversion is required for it to work. - There's no proper tags for the metrics being sent, which is an issue given that tags are providing indexing on the data. The tags should be generated from the string values of the tracer. Maybe an additional "Role" should be added in the trace entry for that purpose. [^1]: https://grafana.com/blog/2021/08/16/streaming-real-time-telegraf-metrics-using-grafana-live/
1 year ago
"modules/logger/telegraf-rs/"
]
resolver = "2"
exclude = ["contrib"]
[workspace.package]
version = "4.0.0"
license = "LGPL-2.1-or-later"
[workspace.dependencies]
logger: add telegraf tracer The tracer is designed to send the metrics towards a telegraf server using this kind of configuration: [[inputs.socket_listener]] service_address = "tcp://localhost:8094" The telegraf server can then forward the metrics towards an influxdb server for monitoring or directly to grafana live server[^1] for introspection. The influxdb database can also be used to query the metrics after they've been indexed. The application using the tracer can use the VLC_TELEGRAF_ENDPOINT environment variable (eg. VLC_TELEGRAF_ENDPOINT=tcp://127.0.0.1:8094) to set where the tracer will output the traces to. A bunch of notes and improvement left for later: - Unsafe code is still used for accessing the fields data since an union is used and union access is unsafe. It could probably be wrapped from the binding implementation. - There is no way to specify the address using the configuration since vlc_variable is not bound to the Rust bindings and no unsafe extern "C" code is done from the plugin. - The tracer currently panic as the telegraf server dies because it doesn't handle reconnection. Proper reconnection logic with maybe size-limited temporary storing might be a proper workaround for that. - The tracer doesn't use the timestamp provided by VLC right now, proper time conversion is required for it to work. - There's no proper tags for the metrics being sent, which is an issue given that tags are providing indexing on the data. The tags should be generated from the string values of the tracer. Maybe an additional "Role" should be added in the trace entry for that purpose. [^1]: https://grafana.com/blog/2021/08/16/streaming-real-time-telegraf-metrics-using-grafana-live/
1 year ago
vlcrs-core = { path = "src/rust/vlcrs-core" }
vlcrs-macros = { path = "src/rust/vlcrs-macros" }