Skip to content
Snippets Groups Projects
  • Alexandre Janniaux's avatar
    logger: add telegraf tracer · e8e46b0d
    Alexandre Janniaux authored
    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...
    e8e46b0d
This project manages its dependencies using Cargo. Learn more