elastic / apm-data

apm-data holds definitions and code for manipulating Elastic APM data
Apache License 2.0
13 stars 26 forks source link

feat: add APMBatch protobuf message #248

Open kruskall opened 7 months ago

kruskall commented 7 months ago

Add a protobuf definition for APMBatch and generate models

inge4pres commented 5 months ago

I noticed we already have a "Batch" type defined here https://github.com/elastic/apm-data/blame/f171078e95faa52f34fc6f91c07c54f3de2cd40c/model/modelpb/batch.go#L46

Is the generated code different with the proposed change?

kruskall commented 5 months ago

I noticed we already have a "Batch" type defined here https://github.com/elastic/apm-data/blame/f171078e95faa52f34fc6f91c07c54f3de2cd40c/model/modelpb/batch.go#L46

Is the generated code different with the proposed change?

Yes. The modelpb.APMBatch in this PR is a protobuf message which can be marshaled/unmarshaled.

the modelpb.Batch type you linked is an alias for a slice of APMEvents and it's what is being passed down to the batch processors.

inge4pres commented 5 months ago

the modelpb.Batch type you linked is an alias for a slice of APMEvents and it's what is being passed down to the batch processors.

Thanks, I'll read further on your previous work to understand how we're going from one to another (the list of APMEvent to the Batch), because we don't want to have a breaking API change correct?