Skip to content

Benchmark the shipper output's conversion from publisher.Event #32081

@cmacknz

Description

@cmacknz

When beats are run under agent, they will soon be able to use the the new Elastic agent data shipper. Events are sent to the shipper using the shipper gRPC output which involves conversion from publisher.Event to the shipper event format.

func toShipperEvent(e publisher.Event) (*sc.Event, error) {
meta, err := convertMapStr(e.Content.Meta)
if err != nil {
return nil, fmt.Errorf("failed to convert event metadata to protobuf: %w", err)

Write a set of Go benchmarks for this conversion and attempt to minimize the the overhead of this conversion process. This conversion will be directly in the data path of every beat and we should be careful to avoid introducing performance regressions when using the shipper. At a minimum the benchmarks should help developers avoid making the current performance worse as the protocol evolves.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions