pub struct CollectorConfig {
pub image: String,
pub otlp_grpc_port: u16,
pub otlp_http_port: u16,
}Expand description
Strongly-typed configuration of the bundled OpenTelemetry collector.
All fields are public so callers can override individual knobs (image tag, port mapping) without recreating the whole value.
Fields§
§image: StringContainer image of the collector.
otlp_grpc_port: u16Host-side OTLP gRPC port published by the collector.
otlp_http_port: u16Host-side OTLP HTTP port published by the collector.
Implementations§
Source§impl CollectorConfig
impl CollectorConfig
Sourcepub fn defaults() -> Self
pub fn defaults() -> Self
Sane defaults: official upstream image, OTLP gRPC on :4317,
OTLP HTTP on :4318.
Sourcepub fn hostname(&self, project: &str) -> String
pub fn hostname(&self, project: &str) -> String
Hostname that dependents must use to reach the collector from
inside the project network. Mirrors the
<project>_<resource> container name convention used by
lightshuttle-runtime.
Sourcepub fn to_container_spec(&self, project: &str) -> ContainerSpec
pub fn to_container_spec(&self, project: &str) -> ContainerSpec
Build a ContainerSpec runnable by lightshuttle-runtime.
The collector is started in --config=builtin:default-config
mode and listens on the OTLP gRPC and HTTP ports defined by
this configuration.
Trait Implementations§
Source§impl Clone for CollectorConfig
impl Clone for CollectorConfig
Source§fn clone(&self) -> CollectorConfig
fn clone(&self) -> CollectorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CollectorConfig
impl Debug for CollectorConfig
Source§impl Default for CollectorConfig
impl Default for CollectorConfig
impl Eq for CollectorConfig
Source§impl PartialEq for CollectorConfig
impl PartialEq for CollectorConfig
Source§fn eq(&self, other: &CollectorConfig) -> bool
fn eq(&self, other: &CollectorConfig) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CollectorConfig
Auto Trait Implementations§
impl Freeze for CollectorConfig
impl RefUnwindSafe for CollectorConfig
impl Send for CollectorConfig
impl Sync for CollectorConfig
impl Unpin for CollectorConfig
impl UnsafeUnpin for CollectorConfig
impl UnwindSafe for CollectorConfig
Blanket Implementations§
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request