agardnerIT / tracepusher

Generate and push OpenTelemetry Trace data to an OTEL collector in JSON format
Apache License 2.0
53 stars 11 forks source link

Set dropped attribute count correctly #31

Closed agardnerIT closed 1 year ago

agardnerIT commented 1 year ago

tracepusher v0.6.0 and lower silently drops invalid attributes without noting them in the span fields.

The code which does this ignoring is: https://github.com/agardnerIT/tracepusher/blob/504aa02eb4a5b565a3c1c66bfa1c016aeb8c2666/tracepusher.py#L42

The droppedAttributesCount is hardcoded to 0: https://github.com/agardnerIT/tracepusher/blob/504aa02eb4a5b565a3c1c66bfa1c016aeb8c2666/tracepusher.py#L190

Instead of this behaviour, if an attribute is ignored, the droppedAttributesCount should accurately reflect the number of dropped attributes.

agardnerIT commented 1 year ago

Solved by https://github.com/agardnerIT/tracepusher/commit/9e1db490787a81bf28c3b75ab51e42f88c155703