Skip to content

Commit 7f266dc

Browse files
author
Andrew Xue
committed
move examples
1 parent 6449dd7 commit 7f266dc

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Cloud Trace Exporter Example
2+
============================
3+
4+
These examples show how to use OpenTelemetry to send tracing data to Cloud Trace.
5+
6+
7+
Basic Example
8+
-------------
9+
10+
To use this exporter you first need to:
11+
* A Google Cloud project. You can `create one here. <https://console.cloud.google.com/projectcreate>`_
12+
* Enable Cloud Monitoring API (aka StackDriver Monitoring API) in the project `here. <https://console.cloud.google.com/apis/library?q=cloud_monitoring>`_
13+
* Enable `Default Application Credentials. <https://developers.google.com/identity/protocols/application-default-credentials>`_
14+
15+
* Installation
16+
17+
.. code-block:: sh
18+
19+
pip install opentelemetry-api
20+
pip install opentelemetry-sdk
21+
pip install opentelemetry-ext-cloud-monitoring
22+
23+
* Run example
24+
25+
.. code-block:: sh
26+
27+
python basic_metrics.py
28+
29+
Checking Output
30+
--------------------------
31+
32+
After running any of these examples, to see the results
33+
* Go to `Cloud Monitoring overview <https://console.cloud.google.com/monitoring/metrics-explorer>`_ to see the results.
34+
* In "Find resource type and metric" enter "OpenTelemetry/<your_metric_name"
35+
* You can filter by labels and change the graphical output here as well

0 commit comments

Comments
 (0)