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
The ExponentialHistorgram data point type was somewhat recently added, and does not work with the ConsoleMetricExporter because it is missing a to_json method (which seems to be defined on the other data point types).
This is the stack trace I get locally:
Exception while exporting metrics 'ExponentialHistogram' object has no attribute 'to_json'
Traceback (most recent call last):
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/export/__init__.py", line 523, in _receive_metrics
self._exporter.export(
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/export/__init__.py", line 163, in export
self.out.write(self.formatter(metrics_data))
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/export/__init__.py", line 143, in <lambda>
] = lambda metrics_data: metrics_data.to_json()
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/point.py", line 252, in to_json
"resource_metrics": [
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/point.py", line 253, in <listcomp>
loads(resource_metrics.to_json(indent=indent))
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/point.py", line 233, in to_json
"scope_metrics": [
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/point.py", line 234, in <listcomp>
loads(scope_metrics.to_json(indent=indent))
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/point.py", line 211, in to_json
"metrics": [
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/point.py", line 212, in <listcomp>
loads(metric.to_json(indent=indent))
File "/home/closeio/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/point.py", line 193, in to_json
"data": loads(self.data.to_json(indent=indent)),
AttributeError: 'ExponentialHistogram' object has no attribute 'to_json'
The text was updated successfully, but these errors were encountered:
The
ExponentialHistorgram
data point type was somewhat recently added, and does not work with theConsoleMetricExporter
because it is missing ato_json
method (which seems to be defined on the other data point types).This is the stack trace I get locally:
The text was updated successfully, but these errors were encountered: