This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Latest version 0.3b0 raises an error that Envelope is not JSON serializable #91
Closed
Description
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:
to return a dictionary.
return envelope.to_dict()
.
Metadata
Metadata
Assignees
Labels
No labels