pub struct TelemetryWorkerBuilder {
pub host: Host,
pub application: Application,
pub runtime_id: Option<String>,
pub dependencies: Store<Dependency>,
pub integrations: Store<Integration>,
pub configurations: Store<Configuration>,
pub endpoints: HashSet<Endpoint>,
pub native_deps: bool,
pub rust_shared_lib_deps: bool,
pub config: Config,
pub flavor: TelemetryWorkerFlavor,
}Fields§
§host: Host§application: Application§runtime_id: Option<String>§dependencies: Store<Dependency>§integrations: Store<Integration>§configurations: Store<Configuration>§endpoints: HashSet<Endpoint>§native_deps: bool§config: Config§flavor: TelemetryWorkerFlavorImplementations§
Source§impl TelemetryWorkerBuilder
impl TelemetryWorkerBuilder
Sourcepub fn new_fetch_host(
service_name: String,
language_name: String,
language_version: String,
tracer_version: String,
) -> Self
pub fn new_fetch_host( service_name: String, language_name: String, language_version: String, tracer_version: String, ) -> Self
Creates a new telemetry worker builder and infer host information automatically
Sourcepub fn new(
hostname: String,
service_name: String,
language_name: String,
language_version: String,
tracer_version: String,
) -> Self
pub fn new( hostname: String, service_name: String, language_name: String, language_version: String, tracer_version: String, ) -> Self
Creates a new telemetry worker builder with the given hostname
Sourcepub fn build_worker(
self,
tokio_runtime: Handle,
) -> (TelemetryWorkerHandle, TelemetryWorker)
pub fn build_worker( self, tokio_runtime: Handle, ) -> (TelemetryWorkerHandle, TelemetryWorker)
Build the corresponding worker and it’s handle. The runtime handle is wrapped in the worker handle and should be the one used to run the worker task.
Sourcepub fn spawn(self) -> (TelemetryWorkerHandle, JoinHandle<()>)
pub fn spawn(self) -> (TelemetryWorkerHandle, JoinHandle<()>)
Spawns a telemetry worker task in the current tokio runtime The worker will capture a reference to the runtime and use it to run its tasks
Sourcepub fn run(self) -> Result<TelemetryWorkerHandle>
pub fn run(self) -> Result<TelemetryWorkerHandle>
Spawns a telemetry worker in a new thread and returns a handle to interact with it
Auto Trait Implementations§
impl !Freeze for TelemetryWorkerBuilder
impl RefUnwindSafe for TelemetryWorkerBuilder
impl Send for TelemetryWorkerBuilder
impl Sync for TelemetryWorkerBuilder
impl Unpin for TelemetryWorkerBuilder
impl UnsafeUnpin for TelemetryWorkerBuilder
impl UnwindSafe for TelemetryWorkerBuilder
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
Mutably borrows from an owned value. Read more