https://github.com/risingwavelabs/otlp-embedded
A simple in-memory implementation of the OpenTelemetry trace collector with a Web UI for visualizing the traces that can be embedded into other Rust applications.
https://github.com/risingwavelabs/otlp-embedded
Last synced: 6 months ago
JSON representation
A simple in-memory implementation of the OpenTelemetry trace collector with a Web UI for visualizing the traces that can be embedded into other Rust applications.
- Host: GitHub
- URL: https://github.com/risingwavelabs/otlp-embedded
- Owner: risingwavelabs
- License: apache-2.0
- Created: 2023-08-07T12:14:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T08:43:21.000Z (about 1 year ago)
- Last Synced: 2025-04-04T21:47:29.717Z (6 months ago)
- Language: Rust
- Homepage:
- Size: 2.58 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `otlp-embedded`
A simple in-memory implementation of the OpenTelemetry trace collector
with a Web UI for visualizing the traces that can be embedded into other
Rust applications.## Example
```rust ignore
use otlp_embedded::{ui_app, State, TraceServiceImpl, TraceServiceServer};#[tokio::main]
async fn main() {
let state = State::new(Config {
max_length: 100,
max_memory_usage: 1 << 27, // 128 MiB
});
let state_clone = state.clone();tokio::spawn(async {
axum::Server::bind(&"0.0.0.0:10188".parse().unwrap())
.serve(ui_app(state, "/").into_make_service())
.await
.unwrap();
});tonic::transport::Server::builder()
.add_service(TraceServiceServer::new(TraceServiceImpl::new(state_clone)))
.serve("0.0.0.0:43177".parse().unwrap())
.await
.unwrap();
}
```