-
Notifications
You must be signed in to change notification settings - Fork 611
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
Conversation
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: CONTAINER_NAME | ||
value: "userservice" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Note - Cloud Monitoring exporters are no longer part of opentelemetry-python. When upgrading open-telemetry python, need to separately add the exporters. |
No description provided.