Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Stackdriver exporter bug in distribution metric #918

Closed

Description

@marianhromiak

Hi,
when I tried example for Cloud Monitoring exporter for OpenTelemetry it doesn't work.

Describe your environment
Platform: 'Linux-5.3.0-53-generic-x86_64-with-Ubuntu-18.04-bionic'
Version: Python 3.6.9
Installed packages:

Package                                 Version
--------------------------------------- ----------
aiocontextvars                          0.2.2
cachetools                              4.1.0
certifi                                 2020.4.5.2
chardet                                 3.0.4
click                                   7.1.2
contextvars                             2.4
ddtrace                                 0.38.1
ddtrace-aiomisc                         1.0.3
Flask                                   1.1.2
google-api-core                         1.19.1
google-auth                             1.16.1
google-cloud-core                       1.3.0
google-cloud-monitoring                 0.36.0
google-cloud-trace                      0.23.0
googleapis-common-protos                1.52.0
grpcio                                  1.29.0
idna                                    2.9
immutables                              0.14
itsdangerous                            1.1.0
Jinja2                                  2.11.2
kubernetes                              11.0.0
MarkupSafe                              1.1.1
msgpack                                 1.0.0
oauthlib                                3.1.0
opencensus                              0.7.7
opencensus-context                      0.1.1
opencensus-ext-flask                    0.7.3
opencensus-ext-httplib                  0.7.3
opencensus-ext-postgresql               0.1.2
opencensus-ext-requests                 0.7.3
opencensus-ext-stackdriver              0.7.2
opencensus-ext-threading                0.1.2
opentelemetry-api                       0.9b0
opentelemetry-exporter-cloud-monitoring 0.9b0
opentelemetry-ext-datadog               0.9b0
opentelemetry-sdk                       0.9b0
pip                                     20.1.1
protobuf                                3.12.2
psycopg2                                2.8.5
psycopg2-binary                         2.8.5
pyasn1                                  0.4.8
pyasn1-modules                          0.2.8
python-dateutil                         2.8.1
pytz                                    2020.1
PyYAML                                  5.3.1
requests                                2.23.0
requests-oauthlib                       1.3.0
rsa                                     4.0
setuptools                              46.4.0
six                                     1.15.0
urllib3                                 1.25.9
websocket-client                        0.57.0
Werkzeug                                1.0.1
wheel                                   0.34.2
wrapt                                   1.12.1

Steps to reproduce.
Use distribution aggregation for metric. Push some data for export to SD/Cloud monitoring

What is the expected behavior?
You can see mean value for distributed metric in Metric explorer.

What is the actual behavior?
You see constant 0 as mean value in Metric explorer.

Additional context.
It seems missing mean field assigment in _convert_point method in StackDriver exporter.
https://github.com/census-instrumentation/opencensus-python/blob/master/contrib/opencensus-ext-stackdriver/opencensus/ext/stackdriver/stats_exporter/__init__.py#L203

Activity

  1. marianhromiak commented on Jun 22, 2020

    @marianhromiak
    ContributorAuthor

    I've created PR, which fix this issue:
    #919

  2. aabmass commented on Jun 25, 2020

    @aabmass
    Member

    @marianhromiak good to close this issue?

  3. marianhromiak commented on Jun 26, 2020

    @marianhromiak
    ContributorAuthor

    Yes, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions