mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
fix: serde default & flatten overlap (#5192)
Related Issues: #5191 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced search event tracking with additional context fields: report key, dashboard folder ID, and dashboard folder name. - **Bug Fixes** - Improved serialization of search event context for better data handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
This commit is contained in:
co-authored by
Taiming Liu
parent
834f6c651b
commit
27375d8ec5
@@ -56,7 +56,7 @@ pub struct Request {
|
||||
#[serde(default)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub search_type: Option<SearchEventType>,
|
||||
#[serde(default, flatten)]
|
||||
#[serde(default)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub search_event_context: Option<SearchEventContext>,
|
||||
}
|
||||
@@ -787,6 +787,7 @@ pub struct SearchEventContext {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub derived_stream_key: Option<String>,
|
||||
#[serde(default)]
|
||||
#[serde(rename = "report_id")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub report_key: Option<String>,
|
||||
#[serde(default)]
|
||||
@@ -796,9 +797,11 @@ pub struct SearchEventContext {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub dashboard_name: Option<String>,
|
||||
#[serde(default)]
|
||||
#[serde(rename = "folder_id")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub dashboard_folder_id: Option<String>,
|
||||
#[serde(default)]
|
||||
#[serde(rename = "folder_name")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub dashboard_folder_name: Option<String>,
|
||||
}
|
||||
@@ -911,7 +914,7 @@ pub struct MultiStreamRequest {
|
||||
#[serde(default)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub search_type: Option<SearchEventType>,
|
||||
#[serde(default, flatten)]
|
||||
#[serde(default)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub search_event_context: Option<SearchEventContext>,
|
||||
#[serde(default)]
|
||||
|
||||
Reference in New Issue
Block a user