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
Copy file name to clipboardExpand all lines: docs/examples/cloud_monitoring/README.rst
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,12 @@ Basic Example
8
8
-------------
9
9
10
10
To use this exporter you first need to:
11
-
* `Create a Google Cloud project <https://console.cloud.google.com/projectcreate>`_.
12
-
* Enable the Cloud Monitoring API (aka Stackdriver Monitoring API) in the project `here <https://console.cloud.google.com/apis/library?q=cloud_monitoring>`_.
* `Create a Google Cloud project <https://console.cloud.google.com/projectcreate>`_.
13
+
* Set up `Application Default Credentials
14
+
<https://cloud.google.com/docs/authentication/provide-credentials-adc>`_ by `installing
15
+
gcloud <https://cloud.google.com/sdk/install>`_ and running ``gcloud auth
16
+
application-default login``.
14
17
15
18
* Installation
16
19
@@ -30,9 +33,10 @@ Viewing Output
30
33
--------------------------
31
34
32
35
After running the example:
33
-
* Go to the `Cloud Monitoring Metrics Explorer page <https://console.cloud.google.com/monitoring/metrics-explorer>`_.
34
-
* In "Select a Metric" enter "workload.googleapis.com/request_counter".
35
-
* You can filter by labels and change the graphical output here as well.
36
+
37
+
* Go to the `Cloud Monitoring Metrics Explorer page <https://console.cloud.google.com/monitoring/metrics-explorer>`_.
38
+
* In "Select a Metric" enter "workload.googleapis.com/request_counter".
39
+
* You can filter by labels and change the graphical output here as well.
36
40
37
41
Troubleshooting
38
42
--------------------------
@@ -42,7 +46,7 @@ Troubleshooting
42
46
43
47
Currently, Cloud Monitoring allows one write every 5 seconds for any unique tuple (metric_name, metric_label_value_1, metric_label_value_2, ...). The exporter should rate limit on its own but issues arise if:
44
48
45
-
* You are restarting the server more than once every 5 seconds.
46
-
* You have a multiple exporters (possibly on different threads) writing to the same tuple.
49
+
* You are restarting the server more than once every 5 seconds.
50
+
* You have a multiple exporters (possibly on different threads) writing to the same tuple.
47
51
48
52
For both cases, you can pass ``add_unique_identifier=True`` to the CloudMonitoringMetricsExporter constructor. This adds a UUID label_value, making the tuple unique again. For the first case, you can also choose to just wait longer than 5 seconds between restarts.
Copy file name to clipboardExpand all lines: docs/examples/cloud_resource_detector/README.rst
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,14 @@ Basic Example
9
9
-------------
10
10
11
11
To use this feature you first need to:
12
-
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
13
-
* (If you want to send resource info to Cloud Trace) Enable `Cloud Trace API <https://console.cloud.google.com/apis/library?q=cloud%20trace&filter=visibility:public>`_ (listed in the Cloud Console as Stackdriver Trace API) in the project.
14
-
* (If you want to send resource info to Cloud Monitoring) Enable the `Cloud Monitoring API <https://console.cloud.google.com/apis/library?q=cloud_monitoring>`_ (aka Stackdriver Monitoring API) in the project.
15
-
* 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``.
16
-
* Setup a Google tool like `Google Compute Engine <https://cloud.google.com/compute/docs/quickstart-linux>`_ (GCE) or `Google Kubernetes Engine <https://cloud.google.com/kubernetes-engine/docs/quickstart>`_ (GKE).
17
-
* Run the below example in the Google tool.
12
+
13
+
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
14
+
* Set up `Application Default Credentials
15
+
<https://cloud.google.com/docs/authentication/provide-credentials-adc>`_ by `installing
16
+
gcloud <https://cloud.google.com/sdk/install>`_ and running ``gcloud auth
17
+
application-default login``.
18
+
* Setup a Google tool like `Google Compute Engine <https://cloud.google.com/compute/docs/quickstart-linux>`_ (GCE) or `Google Kubernetes Engine <https://cloud.google.com/kubernetes-engine/docs/quickstart>`_ (GKE).
19
+
* Run the below example in the Google tool.
18
20
19
21
* Installation
20
22
@@ -40,9 +42,10 @@ Checking Output
40
42
--------------------------
41
43
42
44
After running the metrics example:
43
-
* Go to the `Cloud Monitoring Metrics Explorer page <https://console.cloud.google.com/monitoring/metrics-explorer>`_.
44
-
* In "Find resource type and metric" enter "OpenTelemetry/request_counter_with_resource".
45
-
* You can filter by resource info and change the graphical output here as well.
45
+
46
+
* Go to the `Cloud Monitoring Metrics Explorer page <https://console.cloud.google.com/monitoring/metrics-explorer>`_.
47
+
* In "Find resource type and metric" enter "OpenTelemetry/request_counter_with_resource".
48
+
* You can filter by resource info and change the graphical output here as well.
46
49
47
50
Or, if you ran the tracing example, you can go to `Cloud Trace overview <https://console.cloud.google.com/traces/list>`_ to see the results.
Copy file name to clipboardExpand all lines: docs/examples/cloud_trace_exporter/README.rst
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,13 @@ Basic Example
8
8
-------------
9
9
10
10
To use this exporter you first need to:
11
-
* Create 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>`_. If the page says "API Enabled" then you're done! No need to do anything.
13
-
* 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``.
11
+
12
+
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
13
+
* Set up `Application Default Credentials
14
+
<https://cloud.google.com/docs/authentication/provide-credentials-adc>`_ by `installing
15
+
gcloud <https://cloud.google.com/sdk/install>`_ and running ``gcloud auth
16
+
application-default login``.
17
+
14
18
15
19
* Installation
16
20
@@ -51,16 +55,19 @@ Troubleshooting
51
55
52
56
Running basic_trace.py hangs:
53
57
#############################
54
-
* 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.
58
+
59
+
* 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.
55
60
56
61
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>`_
63
+
64
+
* Check that you've enabled the `Cloud Trace (Stackdriver Trace) API <https://console.cloud.google.com/apis/library?q=cloud%20trace&filter=visibility:public>`_
Copy file name to clipboardExpand all lines: docs/examples/cloud_trace_propagator/README.rst
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,13 @@ Basic Example
9
9
-------------
10
10
11
11
To use this feature you first need to:
12
-
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
13
-
* 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>`_. 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``.
12
+
13
+
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
14
+
* Set up `Application Default Credentials
15
+
<https://cloud.google.com/docs/authentication/provide-credentials-adc>`_ by `installing
16
+
gcloud <https://cloud.google.com/sdk/install>`_ and running ``gcloud auth
Copy file name to clipboardExpand all lines: docs/examples/flask_e2e/README.rst
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,12 @@ script that uses ``requests`` to call the Flask app and propagate context with t
9
9
propagator.
10
10
11
11
To run this example you first need to:
12
-
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
13
-
* 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>`_. 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``.
12
+
13
+
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
14
+
* Set up `Application Default Credentials
15
+
<https://cloud.google.com/docs/authentication/provide-credentials-adc>`_ by `installing
16
+
gcloud <https://cloud.google.com/sdk/install>`_ and running ``gcloud auth
17
+
application-default login``.
15
18
16
19
It is also recommended to create a fresh virtualenv for running this example:
Copy file name to clipboardExpand all lines: docs/examples/prometheus_exemplars/README.rst
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,10 +37,13 @@ traces to `Google Cloud Trace <https://cloud.google.com/trace/docs/overview>`_.
37
37
}
38
38
39
39
To run this example you first need to:
40
-
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
41
-
* 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>`_. If the page says "API Enabled" then you're done! No need to do anything.
42
-
* 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``.
43
-
* Have docker and docker compose installed on your machine
40
+
41
+
* Create a Google Cloud project. You can `create one here <https://console.cloud.google.com/projectcreate>`_.
42
+
* Set up `Application Default Credentials
43
+
<https://cloud.google.com/docs/authentication/provide-credentials-adc>`_ by `installing
44
+
gcloud <https://cloud.google.com/sdk/install>`_ and running ``gcloud auth
45
+
application-default login``.
46
+
* Have docker and docker compose installed on your machine
0 commit comments