You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
12
+
* Enable Cloud Trace API (listed in the Cloud Console as Stackdriver Trace API) in the project `here <https://console.cloud.google.com/apis/library?q=cloud%20trace&filter=visibility:public>`_.
13
+
* If the page says "API Enabled" then you're done! No need to do anything.
14
+
* Enable Default Application Credentials by creating setting `GOOGLE_APPLICATION_CREDENTIALS <https://cloud.google.com/docs/authentication/getting-started>`_ or by `installing gcloud sdk <https://cloud.google.com/sdk/install>`_ and calling ``gcloud auth application-default login``.
14
15
15
16
* Installation
16
17
@@ -20,15 +21,59 @@ To use this exporter you first need to:
20
21
pip install opentelemetry-sdk
21
22
pip install opentelemetry-exporter-cloud-trace
22
23
23
-
* Run example
24
+
* Run an example locally
24
25
25
-
.. code-block:: sh
26
-
27
-
python basic_trace.py
26
+
.. literalinclude:: basic_trace.py
27
+
:language: python
28
+
:lines: 1-
28
29
29
30
Checking Output
30
31
--------------------------
31
32
32
33
After running any of these examples, you can go to `Cloud Trace overview <https://console.cloud.google.com/traces/list>`_ to see the results.
33
34
34
-
* `More information about exporters in general <https://opentelemetry-python.readthedocs.io/en/stable/getting-started.html#configure-exporters-to-emit-spans-elsewhere>`_
35
+
36
+
Further Reading
37
+
--------------------------
38
+
39
+
* `More information about exporters in general <https://opentelemetry-python.readthedocs.io/en/stable/getting-started.html#configure-exporters-to-emit-spans-elsewhere>`_
40
+
41
+
Troubleshooting
42
+
--------------------------
43
+
44
+
Running basic_trace.py hangs:
45
+
#############################
46
+
* Make sure you've setup Application Default Credentials. Either run ``gcloud auth application-default login`` or set the ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to be a path to a service account token file.
47
+
48
+
Getting error ``google.api_core.exceptions.ResourceExhausted: 429 Resource has been exhausted``:
* Check that you've enabled the `Cloud Trace (Stackdriver Trace) API <https://console.cloud.google.com/apis/library?q=cloud%20trace&filter=visibility:public>`_
0 commit comments