From 33d6f870604f451fd3e04dd8a1be8147b9dff3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?France=CC=81=20Wilke?= <francewilke@gmail.com> Date: Tue, 15 Aug 2023 19:39:06 +0200 Subject: [PATCH] Use flat_object for API logs headers and query params --- api_logs/api-logs.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api_logs/api-logs.go b/api_logs/api-logs.go index e0e446d..3ea8a07 100644 --- a/api_logs/api-logs.go +++ b/api_logs/api-logs.go @@ -194,14 +194,14 @@ type ApiLog struct { } type ApiLogRequest struct { - Headers map[string]string `json:"headers,omitempty"` // NOTE: Once we're on OpenSearch 2.7, we should add search:"flattened" here - QueryParameters map[string]string `json:"query_parameters,omitempty"` + Headers map[string]string `json:"headers,omitempty" search:"flattened"` + QueryParameters map[string]string `json:"query_parameters,omitempty" search:"flattened"` BodySize int `json:"body_size" search:"long"` // set even when body is truncated/omitted Body string `json:"body,omitempty"` // json body as a string } type ApiLogResponse struct { - Headers map[string]string `json:"headers,omitempty"` // NOTE: Once we're on OpenSearch 2.7, we should add search:"flattened" here - BodySize int `json:"body_size"` // set even when body is truncated/omitted - Body string `json:"body,omitempty"` // json content as a string + Headers map[string]string `json:"headers,omitempty" search:"flattened"` + BodySize int `json:"body_size"` // set even when body is truncated/omitted + Body string `json:"body,omitempty"` // json content as a string } -- GitLab