Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug using CollectorMetricsExporter with Measure metric #704

Closed
Jasopaum opened this issue May 18, 2020 · 3 comments
Closed

Bug using CollectorMetricsExporter with Measure metric #704

Jasopaum opened this issue May 18, 2020 · 3 comments
Labels
backlog bug Something isn't working

Comments

@Jasopaum
Copy link

Describe your environment
Using Python 3.7 and opentelemetry-ext-otcollector and opentelemetry-sdk version 0.7b1.

Steps to reproduce

metrics.set_meter_provider(MeterProvider())
meter = metrics.get_meter(__name__, True)
exporter = CollectorMetricsExporter(
    endpoint="localhost:55678",
    service_name="basic-service",
)

PushController(meter, exporter, 1)

time_measure = meter.create_metric(
    name="test",
    description="test descr",
    unit="1",
    value_type=int,
    metric_type=Measure,
    label_keys=("service",),
)

time_measure.record(3, {"service": "timer"})
time.sleep(3)

time_measure.record(5, {"service": "timer"})
time.sleep(3)

What is the actual behavior?
This fails silently in the CollectorMetricsExporter.export() method.
I suspect that is comes from the get_collector_point() function which tries to set point.int64_value = metric_record.aggregator.checkpoint where point.int64_value should be an int (protobuf schema) but metric_record.aggregator.checkpoint is a minmaxsumcount tuple for a Measure metric.

@Jasopaum Jasopaum added the bug Something isn't working label May 18, 2020
@lzchen
Copy link
Contributor

lzchen commented Jun 22, 2020

A OTLP metrics exporter is being implemented. As well, there is a proposal to make MinMaxSumCountLast as the default aggregation for ValueRecorder (previously Measure) and the data point type will be added to the protobuf schema.

srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this issue Nov 1, 2020
@github-actions
Copy link

github-actions bot commented Apr 9, 2021

This issue was marked stale due to lack of activity. It will be closed in 30 days.

@codeboten
Copy link
Contributor

The metrics SDK is still experimental and will likely be updated very shortly again. Closing this issue as it's unclear if the bug will still exist when that work is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants