Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

examples/opencensus/python-app not work by google.protobuf.internal.well_known_types.ParseError #37

Open
afiram opened this issue Sep 5, 2019 · 4 comments

Comments

@afiram
Copy link

afiram commented Sep 5, 2019

$ cd examples/opencensus
$ docker-compose up 
...
python-app_1       | Performing system checks...
python-app_1       |
python-app_1       | Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f4d2bf08268>
python-app_1       | Traceback (most recent call last):
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/utils/autoreload.py", line 228, in wrapper
python-app_1       |     fn(*args, **kwargs)
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 125, in inner_run
python-app_1       |     self.check(display_num_errors=True)
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 359, in check
python-app_1       |     include_deployment_checks=include_deployment_checks,
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 346, in _run_checks
python-app_1       |     return checks.run_checks(**kwargs)
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/core/checks/registry.py", line 81, in run_checks
python-app_1       |     new_errors = check(app_configs=app_configs)
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/core/checks/urls.py", line 16, in check_url_config
python-app_1       |     return check_resolver(resolver)
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/core/checks/urls.py", line 26, in check_resolver
python-app_1       |     return check_method()
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 254, in check
python-app_1       |     for pattern in self.url_patterns:
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
python-app_1       |     res = instance.__dict__[self.name] = self.func(instance)
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 405, in url_patterns
python-app_1       |     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
python-app_1       |     res = instance.__dict__[self.name] = self.func(instance)
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 398, in urlconf_module
python-app_1       |     return import_module(self.urlconf_name)
python-app_1       |   File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
python-app_1       |     return _bootstrap._gcd_import(name[level:], package, level)
python-app_1       |   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
python-app_1       |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
python-app_1       |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
python-app_1       |   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
python-app_1       |   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
python-app_1       |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
python-app_1       |   File "/code/app/urls.py", line 19, in <module>
python-app_1       |     import app.views
python-app_1       |   File "/code/app/views.py", line 5, in <module>
python-app_1       |     from opencensus.trace.exporters.ocagent import trace_exporter
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/opencensus/trace/exporters/ocagent/trace_exporter.py", line 30, in <module>
python-app_1       |     from opencensus.trace.exporters.ocagent import utils
python-app_1       |   File "/usr/local/lib/python3.6/site-packages/opencensus/trace/exporters/ocagent/utils.py", line 17, in <module>
python-app_1       |     from google.protobuf.internal.well_known_types import ParseError
pip freeze|grep proto
googleapis-common-protos==1.6.0
protobuf==3.9.1
@lmolkova
Copy link
Member

lmolkova commented Sep 6, 2019

Locaforwarder is not supported and tis repo is being archived.

Please follow this doc to configure your application to send data to Azure monitor: https://docs.microsoft.com/en-us/azure/azure-monitor/app/opencensus-python

@afiram
Copy link
Author

afiram commented Sep 6, 2019

@lmolkova ok, thanks!
so I have a question, is OpenCensus Azure Monitor Exporters full suport live metric stream ?

LocalForwarder supported LiveStream
refs: https://github.com/microsoft/ApplicationInsights-Home/issues/315#issuecomment-452119768

and, opencensus/ext/azure/ is refs dc.services.visualstudio.com but rt.services.visualstudio.com not.

# ~/.ghq/github.com/Microsoft/ApplicationInsights-LocalForwarder
$ ag visualstudio.com src/Library/OpenCensusTelemetryConverter.cs
327:            return host != null && (host.StartsWith("dc.services.visualstudio.com")
328:                   || host.StartsWith("rt.services.visualstudio.com"));

# .ghq/github.com/census-instrumentation/opencensus-python
$ grep -Rn visualstudio.com contrib/opencensus-ext-azure/opencensus/ext/azure/
contrib/opencensus-ext-azure/opencensus/ext/azure/common/__init__.py:24:        endpoint='https://dc.services.visualstudio.com/v2/track',

@afiram afiram mentioned this issue Sep 6, 2019
@lmolkova
Copy link
Member

lmolkova commented Sep 6, 2019

so I have a question, is OpenCensus Azure Monitor Exporters full suport live metric stream ?

Not at the moment. We are looking into this and plan to support live stream, no ETA for now

@UtheMan
Copy link

UtheMan commented Sep 12, 2019

Hi, What about the go sample?
The official doc still links to this LocalForwarder (https://docs.microsoft.com/en-us/azure/azure-monitor/app/opencensus-go). would that work or there is no supported way to forward opencensus metrics to azure monitor at the moment?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants