[APM][Otel] Refactor the normalize function into per data structure serialization logic #192749
Labels
enhancement
New value added to drive a business result
OpenTelemetry
Team:obs-ux-infra_services
Observability Infrastructure & Services User Experience Team
In this issue we are adding a function to normalize the fields - It is because the elasticsearch fields API is returning a different data structure than the
_source
we used before.In the first version, we ended up with a generic normalization function which we want to refactor here. We want to have different mappers for every type used to map only the fields needed in the type:
Example TransactionRaw
Response example:
with
_source
:{......trace: {id: 123},......}
with
fields
:{.....'trace.id': ['123'],.....}
// not something we can change with the querynormalize so we have something like (it could be a separate function per type replacing the current normalization) :
Transaction mapper->
{
processor: [event.processor][0];
timestamp: [timestamp.us][0];
trace: { id: [trace.id][0] };
....APMBaseDoc fields,
....
}
This will improve the structure and make sure that we have only the fields needed in the type and the corresponding values.
AC:
apm
indices and for Otel data usingotel
indicesThe text was updated successfully, but these errors were encountered: