apm-agent-dotnet icon indicating copy to clipboard operation
apm-agent-dotnet copied to clipboard

Public API is to permissive than what APM Server receives

Open glucaci opened this issue 3 years ago • 1 comments

This is kind of a bug that over the IPayloadSender an user can queue a ITransaction, ISpan, IMetricSet or IError but when the data is send to APM Server is always checking that is an Elastic.Apm implementation.

https://github.com/elastic/apm-agent-dotnet/blob/95ad7d6af4e4a1f968b76a5dd586978f4e23d8c3/src/Elastic.Apm/Report/PayloadSenderV2.cs#L292-L306

We should be more restrictive or to enforce somehow the Elastic serialization on those types.

glucaci avatar Mar 22 '21 15:03 glucaci

This is somewhat related to https://github.com/elastic/apm-agent-dotnet/issues/267.

One idea we have is that we generate C# types based on the APM Server schema and make those public, although it's not high prio right now.

gregkalapos avatar Mar 22 '21 17:03 gregkalapos