otlp2pipeline 0.3.2

OTLP ingestion worker for Cloudflare Pipelines and AWS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// src/pipeline/sender.rs
use serde_json::Value;
use std::collections::HashMap;

/// Result of sending to multiple pipelines
#[derive(Debug, Default)]
pub struct SendResult {
    pub succeeded: HashMap<String, usize>,
    pub failed: HashMap<String, String>,
}

/// Trait for sending batches to pipelines (abstracts HTTP client)
#[cfg_attr(not(target_arch = "wasm32"), async_trait::async_trait)]
#[cfg_attr(target_arch = "wasm32", async_trait::async_trait(?Send))]
pub trait PipelineSender {
    async fn send_all(&self, grouped: HashMap<String, Vec<Value>>) -> SendResult;
}