Struct OtelExporter
pub struct OtelExporter<S, H> { /* private fields */ }opentelemetry only.Expand description
http or grpc OTLP exporter
Create via OtelExporter::new_http / OtelExporter::from_env_http for HTTP exporters,
or OtelExporter::new_grpc / OtelExporter::from_env_grpc for gRPC.
Implementations§
§impl<S> OtelExporter<S, MetadataMap>
impl<S> OtelExporter<S, MetadataMap>
pub fn new_grpc(service: S) -> OtelExporter<S, MetadataMap>
pub fn new_grpc(service: S) -> OtelExporter<S, MetadataMap>
Create a new gRPC OTLP exporter wrapping service.
Defaults to http://localhost:4317 with no overrides. Use the various
with_* setters to customise, or OtelExporter::from_env_grpc to
seed values from the standard OTEL_EXPORTER_OTLP_* environment
variables.
pub fn from_env_grpc(
service: S,
) -> Result<OtelExporter<S, MetadataMap>, OtelExporterConfigError>
pub fn from_env_grpc( service: S, ) -> Result<OtelExporter<S, MetadataMap>, OtelExporterConfigError>
Create a new gRPC OTLP exporter wrapping service and seed its
configuration from OTEL_EXPORTER_OTLP_* environment variables.
pub fn with_metadata(
self,
metadata: MetadataMap,
) -> OtelExporter<S, MetadataMap>
pub fn with_metadata( self, metadata: MetadataMap, ) -> OtelExporter<S, MetadataMap>
Override the base OTLP metadata.
pub fn set_metadata(
&mut self,
metadata: MetadataMap,
) -> &mut OtelExporter<S, MetadataMap>
pub fn set_metadata( &mut self, metadata: MetadataMap, ) -> &mut OtelExporter<S, MetadataMap>
Override the base OTLP metadata.
pub fn with_traces_metadata(
self,
metadata: MetadataMap,
) -> OtelExporter<S, MetadataMap>
pub fn with_traces_metadata( self, metadata: MetadataMap, ) -> OtelExporter<S, MetadataMap>
Override the trace-specific OTLP metadata.
pub fn set_traces_metadata(
&mut self,
metadata: MetadataMap,
) -> &mut OtelExporter<S, MetadataMap>
pub fn set_traces_metadata( &mut self, metadata: MetadataMap, ) -> &mut OtelExporter<S, MetadataMap>
Override the trace-specific OTLP metadata.
pub fn with_metrics_metadata(
self,
metadata: MetadataMap,
) -> OtelExporter<S, MetadataMap>
pub fn with_metrics_metadata( self, metadata: MetadataMap, ) -> OtelExporter<S, MetadataMap>
Override the metrics-specific OTLP metadata.
pub fn set_metrics_metadata(
&mut self,
metadata: MetadataMap,
) -> &mut OtelExporter<S, MetadataMap>
pub fn set_metrics_metadata( &mut self, metadata: MetadataMap, ) -> &mut OtelExporter<S, MetadataMap>
Override the metrics-specific OTLP metadata.
pub fn with_logs_metadata(
self,
metadata: MetadataMap,
) -> OtelExporter<S, MetadataMap>
pub fn with_logs_metadata( self, metadata: MetadataMap, ) -> OtelExporter<S, MetadataMap>
Override the logs-specific OTLP metadata.
pub fn set_logs_metadata(
&mut self,
metadata: MetadataMap,
) -> &mut OtelExporter<S, MetadataMap>
pub fn set_logs_metadata( &mut self, metadata: MetadataMap, ) -> &mut OtelExporter<S, MetadataMap>
Override the logs-specific OTLP metadata.
§impl<S> OtelExporter<S, HeaderMap>
impl<S> OtelExporter<S, HeaderMap>
pub fn new_http(service: S) -> OtelExporter<S, HeaderMap>
pub fn new_http(service: S) -> OtelExporter<S, HeaderMap>
Create a new HTTP OTLP exporter wrapping service.
Defaults to http://localhost:4318 with no overrides. Use the various
with_* setters to customise, or OtelExporter::from_env_http to
seed values from the standard OTEL_EXPORTER_OTLP_* environment
variables.
pub fn from_env_http(
service: S,
) -> Result<OtelExporter<S, HeaderMap>, OtelExporterConfigError>
pub fn from_env_http( service: S, ) -> Result<OtelExporter<S, HeaderMap>, OtelExporterConfigError>
Create a new HTTP OTLP exporter wrapping service and seed its
configuration from OTEL_EXPORTER_OTLP_* environment variables.
pub fn with_headers(self, headers: HeaderMap) -> OtelExporter<S, HeaderMap>
pub fn with_headers(self, headers: HeaderMap) -> OtelExporter<S, HeaderMap>
Override the base OTLP HTTP headers.
pub fn set_headers(
&mut self,
headers: HeaderMap,
) -> &mut OtelExporter<S, HeaderMap>
pub fn set_headers( &mut self, headers: HeaderMap, ) -> &mut OtelExporter<S, HeaderMap>
Override the base OTLP HTTP headers.
pub fn with_traces_headers(
self,
headers: HeaderMap,
) -> OtelExporter<S, HeaderMap>
pub fn with_traces_headers( self, headers: HeaderMap, ) -> OtelExporter<S, HeaderMap>
Override the trace-specific OTLP HTTP headers.
pub fn set_traces_headers(
&mut self,
headers: HeaderMap,
) -> &mut OtelExporter<S, HeaderMap>
pub fn set_traces_headers( &mut self, headers: HeaderMap, ) -> &mut OtelExporter<S, HeaderMap>
Override the trace-specific OTLP HTTP headers.
pub fn with_metrics_headers(
self,
headers: HeaderMap,
) -> OtelExporter<S, HeaderMap>
pub fn with_metrics_headers( self, headers: HeaderMap, ) -> OtelExporter<S, HeaderMap>
Override the metrics-specific OTLP HTTP headers.
pub fn set_metrics_headers(
&mut self,
headers: HeaderMap,
) -> &mut OtelExporter<S, HeaderMap>
pub fn set_metrics_headers( &mut self, headers: HeaderMap, ) -> &mut OtelExporter<S, HeaderMap>
Override the metrics-specific OTLP HTTP headers.
pub fn with_logs_headers(self, headers: HeaderMap) -> OtelExporter<S, HeaderMap>
pub fn with_logs_headers(self, headers: HeaderMap) -> OtelExporter<S, HeaderMap>
Override the logs-specific OTLP HTTP headers.
pub fn set_logs_headers(
&mut self,
headers: HeaderMap,
) -> &mut OtelExporter<S, HeaderMap>
pub fn set_logs_headers( &mut self, headers: HeaderMap, ) -> &mut OtelExporter<S, HeaderMap>
Override the logs-specific OTLP HTTP headers.
§impl<S, H> OtelExporter<S, H>where
H: HeaderBag,
impl<S, H> OtelExporter<S, H>where
H: HeaderBag,
pub fn with_endpoint(self, endpoint: Uri) -> OtelExporter<S, H>
pub fn with_endpoint(self, endpoint: Uri) -> OtelExporter<S, H>
Override the base OTLP endpoint.
pub fn set_endpoint(&mut self, endpoint: Uri) -> &mut OtelExporter<S, H>
pub fn set_endpoint(&mut self, endpoint: Uri) -> &mut OtelExporter<S, H>
Override the base OTLP endpoint.
pub fn maybe_with_timeout(self, timeout: Option<Duration>) -> OtelExporter<S, H>
pub fn maybe_with_timeout(self, timeout: Option<Duration>) -> OtelExporter<S, H>
Override the base OTLP timeout.
pub fn maybe_set_timeout(
&mut self,
timeout: Option<Duration>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_timeout( &mut self, timeout: Option<Duration>, ) -> &mut OtelExporter<S, H>
Override the base OTLP timeout.
pub fn with_timeout(self, timeout: Duration) -> OtelExporter<S, H>
pub fn with_timeout(self, timeout: Duration) -> OtelExporter<S, H>
Override the base OTLP timeout.
pub fn set_timeout(&mut self, timeout: Duration) -> &mut OtelExporter<S, H>
pub fn set_timeout(&mut self, timeout: Duration) -> &mut OtelExporter<S, H>
Override the base OTLP timeout.
pub fn without_timeout(self) -> OtelExporter<S, H>
pub fn without_timeout(self) -> OtelExporter<S, H>
Override the base OTLP timeout.
pub fn unset_timeout(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_timeout(&mut self) -> &mut OtelExporter<S, H>
Override the base OTLP timeout.
pub fn maybe_with_compression(
self,
compression: Option<CompressionEncoding>,
) -> OtelExporter<S, H>
pub fn maybe_with_compression( self, compression: Option<CompressionEncoding>, ) -> OtelExporter<S, H>
Override the base OTLP compression.
pub fn maybe_set_compression(
&mut self,
compression: Option<CompressionEncoding>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_compression( &mut self, compression: Option<CompressionEncoding>, ) -> &mut OtelExporter<S, H>
Override the base OTLP compression.
pub fn with_compression(
self,
compression: CompressionEncoding,
) -> OtelExporter<S, H>
pub fn with_compression( self, compression: CompressionEncoding, ) -> OtelExporter<S, H>
Override the base OTLP compression.
pub fn set_compression(
&mut self,
compression: CompressionEncoding,
) -> &mut OtelExporter<S, H>
pub fn set_compression( &mut self, compression: CompressionEncoding, ) -> &mut OtelExporter<S, H>
Override the base OTLP compression.
pub fn without_compression(self) -> OtelExporter<S, H>
pub fn without_compression(self) -> OtelExporter<S, H>
Override the base OTLP compression.
pub fn unset_compression(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_compression(&mut self) -> &mut OtelExporter<S, H>
Override the base OTLP compression.
pub fn maybe_with_traces_endpoint(
self,
endpoint: Option<Uri>,
) -> OtelExporter<S, H>
pub fn maybe_with_traces_endpoint( self, endpoint: Option<Uri>, ) -> OtelExporter<S, H>
Override the trace-specific OTLP endpoint.
pub fn maybe_set_traces_endpoint(
&mut self,
endpoint: Option<Uri>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_traces_endpoint( &mut self, endpoint: Option<Uri>, ) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP endpoint.
pub fn with_traces_endpoint(self, endpoint: Uri) -> OtelExporter<S, H>
pub fn with_traces_endpoint(self, endpoint: Uri) -> OtelExporter<S, H>
Override the trace-specific OTLP endpoint.
pub fn set_traces_endpoint(&mut self, endpoint: Uri) -> &mut OtelExporter<S, H>
pub fn set_traces_endpoint(&mut self, endpoint: Uri) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP endpoint.
pub fn without_traces_endpoint(self) -> OtelExporter<S, H>
pub fn without_traces_endpoint(self) -> OtelExporter<S, H>
Override the trace-specific OTLP endpoint.
pub fn unset_traces_endpoint(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_traces_endpoint(&mut self) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP endpoint.
pub fn maybe_with_traces_timeout(
self,
timeout: Option<Duration>,
) -> OtelExporter<S, H>
pub fn maybe_with_traces_timeout( self, timeout: Option<Duration>, ) -> OtelExporter<S, H>
Override the trace-specific OTLP timeout.
pub fn maybe_set_traces_timeout(
&mut self,
timeout: Option<Duration>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_traces_timeout( &mut self, timeout: Option<Duration>, ) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP timeout.
pub fn with_traces_timeout(self, timeout: Duration) -> OtelExporter<S, H>
pub fn with_traces_timeout(self, timeout: Duration) -> OtelExporter<S, H>
Override the trace-specific OTLP timeout.
pub fn set_traces_timeout(
&mut self,
timeout: Duration,
) -> &mut OtelExporter<S, H>
pub fn set_traces_timeout( &mut self, timeout: Duration, ) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP timeout.
pub fn without_traces_timeout(self) -> OtelExporter<S, H>
pub fn without_traces_timeout(self) -> OtelExporter<S, H>
Override the trace-specific OTLP timeout.
pub fn unset_traces_timeout(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_traces_timeout(&mut self) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP timeout.
pub fn maybe_with_traces_compression(
self,
compression: Option<CompressionEncoding>,
) -> OtelExporter<S, H>
pub fn maybe_with_traces_compression( self, compression: Option<CompressionEncoding>, ) -> OtelExporter<S, H>
Override the trace-specific OTLP compression.
pub fn maybe_set_traces_compression(
&mut self,
compression: Option<CompressionEncoding>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_traces_compression( &mut self, compression: Option<CompressionEncoding>, ) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP compression.
pub fn with_traces_compression(
self,
compression: CompressionEncoding,
) -> OtelExporter<S, H>
pub fn with_traces_compression( self, compression: CompressionEncoding, ) -> OtelExporter<S, H>
Override the trace-specific OTLP compression.
pub fn set_traces_compression(
&mut self,
compression: CompressionEncoding,
) -> &mut OtelExporter<S, H>
pub fn set_traces_compression( &mut self, compression: CompressionEncoding, ) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP compression.
pub fn without_traces_compression(self) -> OtelExporter<S, H>
pub fn without_traces_compression(self) -> OtelExporter<S, H>
Override the trace-specific OTLP compression.
pub fn unset_traces_compression(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_traces_compression(&mut self) -> &mut OtelExporter<S, H>
Override the trace-specific OTLP compression.
pub fn maybe_with_metrics_endpoint(
self,
endpoint: Option<Uri>,
) -> OtelExporter<S, H>
pub fn maybe_with_metrics_endpoint( self, endpoint: Option<Uri>, ) -> OtelExporter<S, H>
Override the metrics-specific OTLP endpoint.
pub fn maybe_set_metrics_endpoint(
&mut self,
endpoint: Option<Uri>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_metrics_endpoint( &mut self, endpoint: Option<Uri>, ) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP endpoint.
pub fn with_metrics_endpoint(self, endpoint: Uri) -> OtelExporter<S, H>
pub fn with_metrics_endpoint(self, endpoint: Uri) -> OtelExporter<S, H>
Override the metrics-specific OTLP endpoint.
pub fn set_metrics_endpoint(&mut self, endpoint: Uri) -> &mut OtelExporter<S, H>
pub fn set_metrics_endpoint(&mut self, endpoint: Uri) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP endpoint.
pub fn without_metrics_endpoint(self) -> OtelExporter<S, H>
pub fn without_metrics_endpoint(self) -> OtelExporter<S, H>
Override the metrics-specific OTLP endpoint.
pub fn unset_metrics_endpoint(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_metrics_endpoint(&mut self) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP endpoint.
pub fn maybe_with_metrics_timeout(
self,
timeout: Option<Duration>,
) -> OtelExporter<S, H>
pub fn maybe_with_metrics_timeout( self, timeout: Option<Duration>, ) -> OtelExporter<S, H>
Override the metrics-specific OTLP timeout.
pub fn maybe_set_metrics_timeout(
&mut self,
timeout: Option<Duration>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_metrics_timeout( &mut self, timeout: Option<Duration>, ) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP timeout.
pub fn with_metrics_timeout(self, timeout: Duration) -> OtelExporter<S, H>
pub fn with_metrics_timeout(self, timeout: Duration) -> OtelExporter<S, H>
Override the metrics-specific OTLP timeout.
pub fn set_metrics_timeout(
&mut self,
timeout: Duration,
) -> &mut OtelExporter<S, H>
pub fn set_metrics_timeout( &mut self, timeout: Duration, ) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP timeout.
pub fn without_metrics_timeout(self) -> OtelExporter<S, H>
pub fn without_metrics_timeout(self) -> OtelExporter<S, H>
Override the metrics-specific OTLP timeout.
pub fn unset_metrics_timeout(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_metrics_timeout(&mut self) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP timeout.
pub fn maybe_with_metrics_compression(
self,
compression: Option<CompressionEncoding>,
) -> OtelExporter<S, H>
pub fn maybe_with_metrics_compression( self, compression: Option<CompressionEncoding>, ) -> OtelExporter<S, H>
Override the metrics-specific OTLP compression.
pub fn maybe_set_metrics_compression(
&mut self,
compression: Option<CompressionEncoding>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_metrics_compression( &mut self, compression: Option<CompressionEncoding>, ) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP compression.
pub fn with_metrics_compression(
self,
compression: CompressionEncoding,
) -> OtelExporter<S, H>
pub fn with_metrics_compression( self, compression: CompressionEncoding, ) -> OtelExporter<S, H>
Override the metrics-specific OTLP compression.
pub fn set_metrics_compression(
&mut self,
compression: CompressionEncoding,
) -> &mut OtelExporter<S, H>
pub fn set_metrics_compression( &mut self, compression: CompressionEncoding, ) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP compression.
pub fn without_metrics_compression(self) -> OtelExporter<S, H>
pub fn without_metrics_compression(self) -> OtelExporter<S, H>
Override the metrics-specific OTLP compression.
pub fn unset_metrics_compression(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_metrics_compression(&mut self) -> &mut OtelExporter<S, H>
Override the metrics-specific OTLP compression.
pub fn maybe_with_logs_endpoint(
self,
endpoint: Option<Uri>,
) -> OtelExporter<S, H>
pub fn maybe_with_logs_endpoint( self, endpoint: Option<Uri>, ) -> OtelExporter<S, H>
Override the logs-specific OTLP endpoint.
pub fn maybe_set_logs_endpoint(
&mut self,
endpoint: Option<Uri>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_logs_endpoint( &mut self, endpoint: Option<Uri>, ) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP endpoint.
pub fn with_logs_endpoint(self, endpoint: Uri) -> OtelExporter<S, H>
pub fn with_logs_endpoint(self, endpoint: Uri) -> OtelExporter<S, H>
Override the logs-specific OTLP endpoint.
pub fn set_logs_endpoint(&mut self, endpoint: Uri) -> &mut OtelExporter<S, H>
pub fn set_logs_endpoint(&mut self, endpoint: Uri) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP endpoint.
pub fn without_logs_endpoint(self) -> OtelExporter<S, H>
pub fn without_logs_endpoint(self) -> OtelExporter<S, H>
Override the logs-specific OTLP endpoint.
pub fn unset_logs_endpoint(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_logs_endpoint(&mut self) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP endpoint.
pub fn maybe_with_logs_timeout(
self,
timeout: Option<Duration>,
) -> OtelExporter<S, H>
pub fn maybe_with_logs_timeout( self, timeout: Option<Duration>, ) -> OtelExporter<S, H>
Override the logs-specific OTLP timeout.
pub fn maybe_set_logs_timeout(
&mut self,
timeout: Option<Duration>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_logs_timeout( &mut self, timeout: Option<Duration>, ) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP timeout.
pub fn with_logs_timeout(self, timeout: Duration) -> OtelExporter<S, H>
pub fn with_logs_timeout(self, timeout: Duration) -> OtelExporter<S, H>
Override the logs-specific OTLP timeout.
pub fn set_logs_timeout(&mut self, timeout: Duration) -> &mut OtelExporter<S, H>
pub fn set_logs_timeout(&mut self, timeout: Duration) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP timeout.
pub fn without_logs_timeout(self) -> OtelExporter<S, H>
pub fn without_logs_timeout(self) -> OtelExporter<S, H>
Override the logs-specific OTLP timeout.
pub fn unset_logs_timeout(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_logs_timeout(&mut self) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP timeout.
pub fn maybe_with_logs_compression(
self,
compression: Option<CompressionEncoding>,
) -> OtelExporter<S, H>
pub fn maybe_with_logs_compression( self, compression: Option<CompressionEncoding>, ) -> OtelExporter<S, H>
Override the logs-specific OTLP compression.
pub fn maybe_set_logs_compression(
&mut self,
compression: Option<CompressionEncoding>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_logs_compression( &mut self, compression: Option<CompressionEncoding>, ) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP compression.
pub fn with_logs_compression(
self,
compression: CompressionEncoding,
) -> OtelExporter<S, H>
pub fn with_logs_compression( self, compression: CompressionEncoding, ) -> OtelExporter<S, H>
Override the logs-specific OTLP compression.
pub fn set_logs_compression(
&mut self,
compression: CompressionEncoding,
) -> &mut OtelExporter<S, H>
pub fn set_logs_compression( &mut self, compression: CompressionEncoding, ) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP compression.
pub fn without_logs_compression(self) -> OtelExporter<S, H>
pub fn without_logs_compression(self) -> OtelExporter<S, H>
Override the logs-specific OTLP compression.
pub fn unset_logs_compression(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_logs_compression(&mut self) -> &mut OtelExporter<S, H>
Override the logs-specific OTLP compression.
pub fn with_temporality(self, temporality: Temporality) -> OtelExporter<S, H>
pub fn with_temporality(self, temporality: Temporality) -> OtelExporter<S, H>
Configure the metric temporality used by this exporter.
pub fn set_temporality(
&mut self,
temporality: Temporality,
) -> &mut OtelExporter<S, H>
pub fn set_temporality( &mut self, temporality: Temporality, ) -> &mut OtelExporter<S, H>
Configure the metric temporality used by this exporter.
pub fn maybe_with_runtime(self, runtime: Option<Handle>) -> OtelExporter<S, H>
pub fn maybe_with_runtime(self, runtime: Option<Handle>) -> OtelExporter<S, H>
Override the tokio runtime used to drive each export.
Constructors capture Handle::try_current() automatically. Use this
to pin the exporter to a specific runtime, or pass None to require
the caller to provide a tokio context for every export.
pub fn maybe_set_runtime(
&mut self,
runtime: Option<Handle>,
) -> &mut OtelExporter<S, H>
pub fn maybe_set_runtime( &mut self, runtime: Option<Handle>, ) -> &mut OtelExporter<S, H>
Override the tokio runtime used to drive each export.
Constructors capture Handle::try_current() automatically. Use this
to pin the exporter to a specific runtime, or pass None to require
the caller to provide a tokio context for every export.
pub fn with_runtime(self, runtime: Handle) -> OtelExporter<S, H>
pub fn with_runtime(self, runtime: Handle) -> OtelExporter<S, H>
Override the tokio runtime used to drive each export.
Constructors capture Handle::try_current() automatically. Use this
to pin the exporter to a specific runtime, or pass None to require
the caller to provide a tokio context for every export.
pub fn set_runtime(&mut self, runtime: Handle) -> &mut OtelExporter<S, H>
pub fn set_runtime(&mut self, runtime: Handle) -> &mut OtelExporter<S, H>
Override the tokio runtime used to drive each export.
Constructors capture Handle::try_current() automatically. Use this
to pin the exporter to a specific runtime, or pass None to require
the caller to provide a tokio context for every export.
pub fn without_runtime(self) -> OtelExporter<S, H>
pub fn without_runtime(self) -> OtelExporter<S, H>
Override the tokio runtime used to drive each export.
Constructors capture Handle::try_current() automatically. Use this
to pin the exporter to a specific runtime, or pass None to require
the caller to provide a tokio context for every export.
pub fn unset_runtime(&mut self) -> &mut OtelExporter<S, H>
pub fn unset_runtime(&mut self) -> &mut OtelExporter<S, H>
Override the tokio runtime used to drive each export.
Constructors capture Handle::try_current() automatically. Use this
to pin the exporter to a specific runtime, or pass None to require
the caller to provide a tokio context for every export.
Trait Implementations§
§impl<S, H> Clone for OtelExporter<S, H>
impl<S, H> Clone for OtelExporter<S, H>
§fn clone(&self) -> OtelExporter<S, H>
fn clone(&self) -> OtelExporter<S, H>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<S, H> Debug for OtelExporter<S, H>
impl<S, H> Debug for OtelExporter<S, H>
§impl<S, H> LogExporter for OtelExporter<S, H>where
H: HeaderBag,
S: Debug + Send + Sync + 'static,
OtelExporter<S, H>: OtlpTransport + Send + Sync,
impl<S, H> LogExporter for OtelExporter<S, H>where
H: HeaderBag,
S: Debug + Send + Sync + 'static,
OtelExporter<S, H>: OtlpTransport + Send + Sync,
§async fn export(&self, batch: LogBatch<'_>) -> Result<(), OTelSdkError>
async fn export(&self, batch: LogBatch<'_>) -> Result<(), OTelSdkError>
§fn shutdown_with_timeout(&self, _timeout: Duration) -> Result<(), OTelSdkError>
fn shutdown_with_timeout(&self, _timeout: Duration) -> Result<(), OTelSdkError>
§fn set_resource(&mut self, resource: &Resource)
fn set_resource(&mut self, resource: &Resource)
§fn shutdown(&self) -> Result<(), OTelSdkError>
fn shutdown(&self) -> Result<(), OTelSdkError>
§impl<S> OtlpTransport for OtelExporter<S, HeaderMap>
impl<S> OtlpTransport for OtelExporter<S, HeaderMap>
async fn send_proto<Req, Resp>( &self, signal: SignalKind, request_body: Req, ) -> Result<Resp, OTelSdkError>
§impl<S> OtlpTransport for OtelExporter<S, MetadataMap>where
S: Debug + Clone + Send + Sync + 'static + GrpcService<Body>,
<S as GrpcService<Body>>::ResponseBody: Body + Send + Sync + 'static,
<<S as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync>>,
impl<S> OtlpTransport for OtelExporter<S, MetadataMap>where
S: Debug + Clone + Send + Sync + 'static + GrpcService<Body>,
<S as GrpcService<Body>>::ResponseBody: Body + Send + Sync + 'static,
<<S as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync>>,
async fn send_proto<Req, Resp>( &self, signal: SignalKind, request_body: Req, ) -> Result<Resp, OTelSdkError>
§impl<S, H> PushMetricExporter for OtelExporter<S, H>where
H: HeaderBag,
S: Debug + Send + Sync + 'static,
OtelExporter<S, H>: OtlpTransport + Send + Sync,
impl<S, H> PushMetricExporter for OtelExporter<S, H>where
H: HeaderBag,
S: Debug + Send + Sync + 'static,
OtelExporter<S, H>: OtlpTransport + Send + Sync,
§async fn export(&self, metrics: &ResourceMetrics) -> Result<(), OTelSdkError>
async fn export(&self, metrics: &ResourceMetrics) -> Result<(), OTelSdkError>
§fn force_flush(&self) -> Result<(), OTelSdkError>
fn force_flush(&self) -> Result<(), OTelSdkError>
§fn shutdown_with_timeout(&self, _timeout: Duration) -> Result<(), OTelSdkError>
fn shutdown_with_timeout(&self, _timeout: Duration) -> Result<(), OTelSdkError>
§fn temporality(&self) -> Temporality
fn temporality(&self) -> Temporality
§fn shutdown(&self) -> Result<(), OTelSdkError>
fn shutdown(&self) -> Result<(), OTelSdkError>
§impl<S, H> SpanExporter for OtelExporter<S, H>where
H: HeaderBag,
S: Debug + Send + Sync + 'static,
OtelExporter<S, H>: OtlpTransport + Send + Sync,
impl<S, H> SpanExporter for OtelExporter<S, H>where
H: HeaderBag,
S: Debug + Send + Sync + 'static,
OtelExporter<S, H>: OtlpTransport + Send + Sync,
§async fn export(&self, batch: Vec<SpanData>) -> Result<(), OTelSdkError>
async fn export(&self, batch: Vec<SpanData>) -> Result<(), OTelSdkError>
§fn shutdown_with_timeout(
&mut self,
_timeout: Duration,
) -> Result<(), OTelSdkError>
fn shutdown_with_timeout( &mut self, _timeout: Duration, ) -> Result<(), OTelSdkError>
§fn force_flush(&mut self) -> Result<(), OTelSdkError>
fn force_flush(&mut self) -> Result<(), OTelSdkError>
§fn set_resource(&mut self, resource: &Resource)
fn set_resource(&mut self, resource: &Resource)
§fn shutdown(&mut self) -> Result<(), OTelSdkError>
fn shutdown(&mut self) -> Result<(), OTelSdkError>
Auto Trait Implementations§
impl<S, H> !Freeze for OtelExporter<S, H>
impl<S, H> RefUnwindSafe for OtelExporter<S, H>where
S: RefUnwindSafe,
H: RefUnwindSafe,
impl<S, H> Send for OtelExporter<S, H>
impl<S, H> Sync for OtelExporter<S, H>
impl<S, H> Unpin for OtelExporter<S, H>
impl<S, H> UnsafeUnpin for OtelExporter<S, H>where
S: UnsafeUnpin,
H: UnsafeUnpin,
impl<S, H> UnwindSafe for OtelExporter<S, H>where
S: UnwindSafe,
H: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§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 rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
§impl<V, F> ValueFormatter<&V> for F
impl<V, F> ValueFormatter<&V> for F
§fn format_value(writer: impl ValueWriter, value: &&V)
fn format_value(writer: impl ValueWriter, value: &&V)
value to writer§impl<V, F> ValueFormatter<Arc<V>> for F
impl<V, F> ValueFormatter<Arc<V>> for F
§fn format_value(writer: impl ValueWriter, value: &Arc<V>)
fn format_value(writer: impl ValueWriter, value: &Arc<V>)
value to writer§impl<V, F> ValueFormatter<Box<V>> for F
impl<V, F> ValueFormatter<Box<V>> for F
§fn format_value(writer: impl ValueWriter, value: &Box<V>)
fn format_value(writer: impl ValueWriter, value: &Box<V>)
value to writer§impl<V, F> ValueFormatter<Cow<'_, V>> for F
impl<V, F> ValueFormatter<Cow<'_, V>> for F
§fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
value to writer§impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
§fn format_value(writer: impl ValueWriter, value: &Option<V>)
fn format_value(writer: impl ValueWriter, value: &Option<V>)
value to writer