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

Python Monitoring instrumentation - Proof of Concept #269

Closed

Conversation

sunny3728
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 17, 2020
@sunny3728 sunny3728 marked this pull request as draft July 17, 2020 20:31
fieldRef:
fieldPath: metadata.namespace
- name: CONTAINER_NAME
value: "userservice"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained in this issue census-instrumentation/opencensus-python#796 (comment)
the stackdriver exporter needs these env vars explicitly declared

from flask import Flask, jsonify, request
import bleach
from opentelemetry import trace
from opentelemetry import metrics, trace
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the contacts service, I tried to instrument metrics reported by the sqlalchemy-easy-profile using opentelemetry. However, the Cloud Monitoring exporter doesn't fully support all metric types yet

from flask import Flask, jsonify, request
import bleach
from opencensus.ext.stackdriver import stats_exporter
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because opentelemetry's cloud monitoring support is incomplete, I tried using OpenCensus to export the sqlachemy metrics in the userservice, which worked as expected.

@askmeegs askmeegs changed the title Metrics testing Python Monitoring instrumentation - Proof of Concept Jul 30, 2020
@askmeegs
Copy link
Collaborator

Note - Cloud Monitoring exporters are no longer part of opentelemetry-python. When upgrading open-telemetry python, need to separately add the exporters.
https://github.com/GoogleCloudPlatform/opentelemetry-operations-python

@askmeegs askmeegs closed this Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants