Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM][Otel] Refactor the normalize function into per data structure serialization logic #192749

Closed
jennypavlova opened this issue Sep 12, 2024 · 2 comments
Assignees
Labels
enhancement New value added to drive a business result OpenTelemetry Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@jennypavlova
Copy link
Member

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 query

normalize 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:

  • All normalization should be replaced with a mapper function to a corresponding type (transaction, span, error, etc)
  • We should test that it works the same for apm server using apm indices and for Otel data using otel indices
@jennypavlova jennypavlova added enhancement New value added to drive a business result Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Sep 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@miloszmarcinkowski
Copy link
Contributor

Linked PR: jennypavlova#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result OpenTelemetry Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

No branches or pull requests

4 participants