pub struct Receivers {
pub logs: Ingest<ExportLogsServiceRequest>,
pub traces: Ingest<ExportTraceServiceRequest>,
pub metrics: Ingest<ExportMetricsServiceRequest>,
pub max_request_bytes: usize,
}Expand description
One write handle per signal. The type parameter is what keeps a metrics
request from being handed to the logs flusher; Ingest is generic precisely
so that the mistake is a compile error rather than a corrupt block.
Fields§
§logs: Ingest<ExportLogsServiceRequest>§traces: Ingest<ExportTraceServiceRequest>§metrics: Ingest<ExportMetricsServiceRequest>§max_request_bytes: usizeThe largest export either listener will decode, in bytes.
One number for both, because a batch that a collector sends happily over
4317 and that fails over 4318 is the worst kind of bug to be handed: it
depends on a transport nobody changed. Applied three times — as the
axum body limit, as tonic’s max_decoding_message_size, and as the
ceiling on what a gzip body may inflate to.
Implementations§
Source§impl Receivers
accept_compressed on every service, because the spec says MUST and the
stock exporter says default.
impl Receivers
accept_compressed on every service, because the spec says MUST and the
stock exporter says default.
Without it tonic answers a compressed request with UNIMPLEMENTED, and
OTLP calls that a permanent failure: the exporter drops the batch instead of
retrying it. send_compressed is deliberately absent — the response is an
empty message, and gzipping nothing costs a round of deflate per export.
max_decoding_message_size is set from the same field the HTTP listener
uses; tonic’s own default is 4 MiB and axum’s is 2 MiB, and leaving the two
listeners disagreeing means a batch size that works on one port and fails
on the other.
pub fn logs_server(&self) -> LogsServiceServer<Self>
pub fn traces_server(&self) -> TraceServiceServer<Self>
pub fn metrics_server(&self) -> MetricsServiceServer<Self>
Trait Implementations§
Source§impl LogsService for Receivers
impl LogsService for Receivers
fn export<'life0, 'async_trait>(
&'life0 self,
request: Request<ExportLogsServiceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ExportLogsServiceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl MetricsService for Receivers
impl MetricsService for Receivers
fn export<'life0, 'async_trait>(
&'life0 self,
request: Request<ExportMetricsServiceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ExportMetricsServiceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl TraceService for Receivers
impl TraceService for Receivers
fn export<'life0, 'async_trait>(
&'life0 self,
request: Request<ExportTraceServiceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ExportTraceServiceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for Receivers
impl RefUnwindSafe for Receivers
impl Send for Receivers
impl Sync for Receivers
impl Unpin for Receivers
impl UnsafeUnpin for Receivers
impl UnwindSafe for Receivers
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].