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
{{ message }}
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
When trying the sample from https://github.com/microsoft/opentelemetry-azure-monitor-python/blob/master/azure_monitor/examples/metrics/observer.py I get the error
TypeError: Object of type 'Envelope' is not JSON serializable.
.My current hack/workaround is to update this function
def _metric_to_envelope( self, metric_record: MetricRecord ) -> protocol.Envelope:
in this file https://github.com/microsoft/opentelemetry-azure-monitor-python/blob/master/azure_monitor/src/azure_monitor/export/metrics/__init__.py
to return a dictionary.
return envelope.to_dict()
.The text was updated successfully, but these errors were encountered: