mirror of
https://github.com/katanemo/plano.git
synced 2026-06-23 15:38:07 +02:00
add custom trace attributes
This commit is contained in:
parent
d70f79b41c
commit
3a663aa780
10 changed files with 764 additions and 409 deletions
|
|
@ -90,8 +90,24 @@ pub struct Overrides {
|
|||
pub struct Tracing {
|
||||
pub sampling_rate: Option<f64>,
|
||||
pub trace_arch_internal: Option<bool>,
|
||||
pub random_sampling: Option<u32>,
|
||||
pub opentracing_grpc_endpoint: Option<String>,
|
||||
pub custom_attributes: Option<Vec<CustomTraceAttribute>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct CustomTraceAttribute {
|
||||
pub key: String,
|
||||
#[serde(rename = "type")]
|
||||
pub value_type: CustomTraceAttributeType,
|
||||
pub header: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum CustomTraceAttributeType {
|
||||
Str,
|
||||
Bool,
|
||||
Float,
|
||||
Int,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash, Default)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue