| Crates.io | spotflow-logger |
| lib.rs | spotflow-logger |
| version | 0.1.1 |
| created_at | 2025-09-26 12:54:25.881727+00 |
| updated_at | 2025-09-26 12:59:52.61841+00 |
| description | Unofficial logging crate with tracing API for Spotflow Observability Platform |
| homepage | |
| repository | https://github.com/tlevora/spotflow-logger |
| max_upload_size | |
| id | 1855850 |
| size | 56,657 |
An unofficial Spotflow Observability Platform client.
This crate provides a simple API for logging messages to the Spotflow Observability Platform.
It could be used directly or as an integration with tracing crate.
For tracing it provides a tracing-subscriber Layer.
Current implementation is std and requires async environment.
let (spotflow_logger, spotflow_task, spotflow_stopper) = SpotflowLogger::builder()
// name of device to be displayed in Spotflow Observability Platform
.set_device_id("test1")
// spotflow ingest key from https://app.spotflow.io/ingest-keys
.set_password(mqtt_password)
.build();
// spawn task handling MQTT communication with spotflow platform
let spotflow_task = task::spawn(spotflow_task);
// register client with tracing-subscriber
tracing_subscriber::registry()
.with(LevelFilter::INFO)
.with(spotflow_logger)
.init();
tracing::info!("test message");
// send a request to finish `spotflow_task`
spotflow_stopper.stop().unwrap();
// join the `spotflow_task`
_ = spotflow_task.await;
The entry point to this crate is [SpotflowLogger::builder], which creates a
[SpotflowLoggerBuilder] instance.
Currently there are following issues:
Errors during log line send or processing are suppressed.
MQTT QoS is forced to be AtMostOnce.
TRACE log level is mapped to DEBUG since spotflow does not support TRACE.
Some large integral types like u128 are not supported for cbor.
Tracing span and instrument are not supported.
no_std environment is not supported.
Following features are supported: