pub struct ModelOperationOptions {
pub provider_name: String,
pub request_model: String,
pub request_options: RequestOptions,
pub request_attributes: Vec<KeyValue>,
}Expand description
Options for recording an upstream model SDK call.
Fields§
§provider_name: StringUpstream model provider name.
request_model: StringRequested model name.
request_options: RequestOptionsCommon model request options to record.
request_attributes: Vec<KeyValue>Additional span attributes for the request.
Implementations§
Source§impl ModelOperationOptions
impl ModelOperationOptions
Sourcepub fn new(
provider_name: impl Into<String>,
request_model: impl Into<String>,
) -> Self
pub fn new( provider_name: impl Into<String>, request_model: impl Into<String>, ) -> Self
Creates model-operation options for a provider and model.
Sourcepub fn with_request_options(self, request_options: RequestOptions) -> Self
pub fn with_request_options(self, request_options: RequestOptions) -> Self
Sets common model request options.
Sourcepub fn with_request_attribute(self, attribute: KeyValue) -> Self
pub fn with_request_attribute(self, attribute: KeyValue) -> Self
Adds one request span attribute.
Trait Implementations§
Source§impl Clone for ModelOperationOptions
impl Clone for ModelOperationOptions
Source§fn clone(&self) -> ModelOperationOptions
fn clone(&self) -> ModelOperationOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelOperationOptions
impl Debug for ModelOperationOptions
Source§impl Default for ModelOperationOptions
impl Default for ModelOperationOptions
Source§fn default() -> ModelOperationOptions
fn default() -> ModelOperationOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModelOperationOptions
impl RefUnwindSafe for ModelOperationOptions
impl Send for ModelOperationOptions
impl Sync for ModelOperationOptions
impl Unpin for ModelOperationOptions
impl UnsafeUnpin for ModelOperationOptions
impl UnwindSafe for ModelOperationOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Wrap the input message
T in a tonic::Request