Struct Open Inference Config

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

1pub struct OpenInferenceConfig { /* private fields */ }

Configuration for the OpenInference subscriber.

Implementations

impl OpenInferenceConfig

impl OpenInferenceConfig

new

pub fn new() -> Self

Creates a config with sensible defaults.

with_transport

pub fn with_transport(self, transport: OtlpTransport) -> Self

Selects the OTLP transport.

with_service_name

pub fn with_service_name(self, service_name: impl Into<String>) -> Self

Sets the service.name resource attribute.

with_endpoint

pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self

Overrides the OTLP endpoint. If unset, exporter defaults and OTEL_* env vars apply.

with_header

pub fn with_header(
    self,
    key: impl Into<String>,
    value: impl Into<String>,
) -> Self

Adds a header/metadata entry for the exporter.

with_resource_attribute

pub fn with_resource_attribute(
    self,
    key: impl Into<String>,
    value: impl Into<String>,
) -> Self

Adds a resource attribute as a string key/value pair.

with_timeout

pub fn with_timeout(self, timeout: Duration) -> Self

Sets the OTLP request timeout.

with_service_namespace

pub fn with_service_namespace(self, namespace: impl Into<String>) -> Self

Sets the service namespace resource attribute.

with_service_version

pub fn with_service_version(self, version: impl Into<String>) -> Self

Sets the service version resource attribute.

with_instrumentation_scope

pub fn with_instrumentation_scope(self, scope: impl Into<String>) -> Self

Sets the instrumentation scope name used for emitted spans.

Trait Implementations

impl Clone for OpenInferenceConfig

impl Clone for OpenInferenceConfig

clone

fn clone(&self) -> OpenInferenceConfig

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for OpenInferenceConfig

impl Debug for OpenInferenceConfig

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for OpenInferenceConfig

impl Default for OpenInferenceConfig

default

fn default() -> Self