langfuse_client_base/models/otel_resource.rs
1/*
2 * langfuse
3 *
4 * ## Authentication Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings: - username: Langfuse Public Key - password: Langfuse Secret Key ## Exports - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml
5 *
6 * The version of the OpenAPI document:
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OtelResource : Resource attributes identifying the source of telemetry
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
16pub struct OtelResource {
17 /// Resource attributes like service.name, service.version, etc.
18 #[serde(
19 rename = "attributes",
20 default,
21 with = "::serde_with::rust::double_option",
22 skip_serializing_if = "Option::is_none"
23 )]
24 pub attributes: Option<Option<Vec<models::OtelAttribute>>>,
25}
26
27impl OtelResource {
28 /// Resource attributes identifying the source of telemetry
29 pub fn new() -> OtelResource {
30 OtelResource { attributes: None }
31 }
32}