You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During testing, I've run into issues with OTLP export when an instrument is recorded without attributes.
For example, when record is called on a histogram without attributes: histogram.record(123)
This error is logged:
E, [2024-08-01T13:41:56.081704 #86303] ERROR -- : OpenTelemetry error: unexpected error in OTLP::MetricsExporter#encode - undefined method map' for nil`
Which comes from this LOC because hdp.attributes is nil.
I haven't been able to track down a specific line in the spec that explains whether attributes must be present, but my hunch is that they're optional.
After this discussion, @xuan-cao-swi and I think the best approach would be to update update the default value of the attributes argument on the record methods to be an empty hash.
Looking at the code, it seems like histogram and up_down_counter need to be fixed, but there may be other areas that need updates as well.
The text was updated successfully, but these errors were encountered:
During testing, I've run into issues with OTLP export when an instrument is recorded without attributes.
For example, when record is called on a histogram without attributes:
histogram.record(123)
This error is logged:
Which comes from this LOC because
hdp.attributes
isnil
.I haven't been able to track down a specific line in the spec that explains whether attributes must be present, but my hunch is that they're optional.
After this discussion, @xuan-cao-swi and I think the best approach would be to update update the default value of the attributes argument on the record methods to be an empty hash.
Looking at the code, it seems like histogram and up_down_counter need to be fixed, but there may be other areas that need updates as well.
The text was updated successfully, but these errors were encountered: