apm-agent-dotnet
apm-agent-dotnet copied to clipboard
Public API is to permissive than what APM Server receives
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.
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.