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

Integrate protobuf definitions for model types in apm-server #52

Closed
3 tasks done
simitt opened this issue Jun 8, 2023 · 2 comments
Closed
3 tasks done

Integrate protobuf definitions for model types in apm-server #52

simitt opened this issue Jun 8, 2023 · 2 comments
Assignees
Milestone

Comments

@simitt
Copy link
Contributor

simitt commented Jun 8, 2023

Follow up on #36

Phase 2

@simitt simitt added this to the 8.9 milestone Jun 8, 2023
@kruskall
Copy link
Member

kruskall commented Jun 19, 2023

For the testplan or whoever ends up testing this, here are a few things to test/look out for:

  • models are no longer using map[string]any directly, instead the data from APM Agents is mapped to structpb.Struct and then converted to map[string]any in modeljson. There is an additional point of failure in this approach because the creation of structpb.Struct could fail. If that happens, we lose data.
  • protobuf models are using pointers everywhere. Look out for nil pointer dereference. event.Foo.Bar was safe before but now it's not.
  • IPs are stored as strings as opposed to netip.Addr. Make sure we are not converting an invalid IP (invalidNetip.String() will produce "invalid ip", we probably shouldn't encode that).
  • protobuf models are passing by reference (they are not safe to copy), if we need a copy we should use proto.Clone

@kruskall
Copy link
Member

The listed tasks have been completed. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants