diff --git a/docs/examples/cloud_monitoring/README.rst b/docs/examples/cloud_monitoring/README.rst index 429caf9e..4e5e6d36 100644 --- a/docs/examples/cloud_monitoring/README.rst +++ b/docs/examples/cloud_monitoring/README.rst @@ -8,9 +8,12 @@ Basic Example ------------- To use this exporter you first need to: - * `Create a Google Cloud project `_. - * Enable the Cloud Monitoring API (aka Stackdriver Monitoring API) in the project `here `_. - * Enable `Default Application Credentials `_. + +* `Create a Google Cloud project `_. +* Set up `Application Default Credentials + `_ by `installing + gcloud `_ and running ``gcloud auth + application-default login``. * Installation @@ -30,9 +33,10 @@ Viewing Output -------------------------- After running the example: - * Go to the `Cloud Monitoring Metrics Explorer page `_. - * In "Select a Metric" enter "workload.googleapis.com/request_counter". - * You can filter by labels and change the graphical output here as well. + +* Go to the `Cloud Monitoring Metrics Explorer page `_. +* In "Select a Metric" enter "workload.googleapis.com/request_counter". +* You can filter by labels and change the graphical output here as well. Troubleshooting -------------------------- @@ -42,7 +46,7 @@ Troubleshooting 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: - * You are restarting the server more than once every 5 seconds. - * You have a multiple exporters (possibly on different threads) writing to the same tuple. +* You are restarting the server more than once every 5 seconds. +* You have a multiple exporters (possibly on different threads) writing to the same tuple. 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. diff --git a/docs/examples/cloud_resource_detector/README.rst b/docs/examples/cloud_resource_detector/README.rst index 24e0e973..e30d5ae2 100644 --- a/docs/examples/cloud_resource_detector/README.rst +++ b/docs/examples/cloud_resource_detector/README.rst @@ -9,12 +9,14 @@ Basic Example ------------- To use this feature you first need to: - * Create a Google Cloud project. You can `create one here `_. - * (If you want to send resource info to Cloud Trace) Enable `Cloud Trace API `_ (listed in the Cloud Console as Stackdriver Trace API) in the project. - * (If you want to send resource info to Cloud Monitoring) Enable the `Cloud Monitoring API `_ (aka Stackdriver Monitoring API) in the project. - * Enable Default Application Credentials by creating setting `GOOGLE_APPLICATION_CREDENTIALS `_ or by `installing gcloud sdk `_ and calling ``gcloud auth application-default login``. - * Setup a Google tool like `Google Compute Engine `_ (GCE) or `Google Kubernetes Engine `_ (GKE). - * Run the below example in the Google tool. + +* Create a Google Cloud project. You can `create one here `_. +* Set up `Application Default Credentials + `_ by `installing + gcloud `_ and running ``gcloud auth + application-default login``. +* Setup a Google tool like `Google Compute Engine `_ (GCE) or `Google Kubernetes Engine `_ (GKE). +* Run the below example in the Google tool. * Installation @@ -40,9 +42,10 @@ Checking Output -------------------------- After running the metrics example: - * Go to the `Cloud Monitoring Metrics Explorer page `_. - * In "Find resource type and metric" enter "OpenTelemetry/request_counter_with_resource". - * You can filter by resource info and change the graphical output here as well. + +* Go to the `Cloud Monitoring Metrics Explorer page `_. +* In "Find resource type and metric" enter "OpenTelemetry/request_counter_with_resource". +* You can filter by resource info and change the graphical output here as well. Or, if you ran the tracing example, you can go to `Cloud Trace overview `_ to see the results. diff --git a/docs/examples/cloud_trace_exporter/README.rst b/docs/examples/cloud_trace_exporter/README.rst index 16b17296..5e944f41 100644 --- a/docs/examples/cloud_trace_exporter/README.rst +++ b/docs/examples/cloud_trace_exporter/README.rst @@ -8,9 +8,13 @@ Basic Example ------------- To use this exporter you first need to: - * Create a Google Cloud project. You can `create one here `_. - * Enable Cloud Trace API (listed in the Cloud Console as Stackdriver Trace API) in the project `here `_. If the page says "API Enabled" then you're done! No need to do anything. - * Enable Default Application Credentials by creating setting `GOOGLE_APPLICATION_CREDENTIALS `_ or by `installing gcloud sdk `_ and calling ``gcloud auth application-default login``. + +* Create a Google Cloud project. You can `create one here `_. +* Set up `Application Default Credentials + `_ by `installing + gcloud `_ and running ``gcloud auth + application-default login``. + * Installation @@ -51,16 +55,19 @@ Troubleshooting Running basic_trace.py hangs: ############################# - * 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. + +* 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. Getting error ``google.api_core.exceptions.ResourceExhausted: 429 Resource has been exhausted``: ################################################################################################ - * Check that you've enabled the `Cloud Trace (Stackdriver Trace) API `_ + +* Check that you've enabled the `Cloud Trace (Stackdriver Trace) API `_ bash: pip: command not found: ############################# - * `Install pip `_ - * If your machine uses python2 by default, pip will also be the python2 version. Try using ``pip3`` instead of ``pip``. + +* `Install pip `_ +* If your machine uses python2 by default, pip will also be the python2 version. Try using ``pip3`` instead of ``pip``. pip install is hanging ###################### diff --git a/docs/examples/cloud_trace_propagator/README.rst b/docs/examples/cloud_trace_propagator/README.rst index a540af2c..e3beab05 100644 --- a/docs/examples/cloud_trace_propagator/README.rst +++ b/docs/examples/cloud_trace_propagator/README.rst @@ -9,9 +9,13 @@ Basic Example ------------- To use this feature you first need to: - * Create a Google Cloud project. You can `create one here `_. - * Enable Cloud Trace API (listed in the Cloud Console as Stackdriver Trace API) in the project `here `_. If the page says "API Enabled" then you're done! No need to do anything. - * Enable Default Application Credentials by creating setting `GOOGLE_APPLICATION_CREDENTIALS `_ or by `installing gcloud sdk `_ and calling ``gcloud auth application-default login``. + +* Create a Google Cloud project. You can `create one here `_. +* Set up `Application Default Credentials + `_ by `installing + gcloud `_ and running ``gcloud auth + application-default login``. + * Installation diff --git a/docs/examples/flask_e2e/README.rst b/docs/examples/flask_e2e/README.rst index b00d35d4..cded5604 100644 --- a/docs/examples/flask_e2e/README.rst +++ b/docs/examples/flask_e2e/README.rst @@ -9,9 +9,12 @@ script that uses ``requests`` to call the Flask app and propagate context with t propagator. To run this example you first need to: - * Create a Google Cloud project. You can `create one here `_. - * Enable Cloud Trace API (listed in the Cloud Console as Stackdriver Trace API) in the project `here `_. If the page says "API Enabled" then you're done! No need to do anything. - * Enable Default Application Credentials by creating setting `GOOGLE_APPLICATION_CREDENTIALS `_ or by `installing gcloud sdk `_ and calling ``gcloud auth application-default login``. + +* Create a Google Cloud project. You can `create one here `_. +* Set up `Application Default Credentials + `_ by `installing + gcloud `_ and running ``gcloud auth + application-default login``. It is also recommended to create a fresh virtualenv for running this example: diff --git a/docs/examples/prometheus_exemplars/README.rst b/docs/examples/prometheus_exemplars/README.rst index 3d5000ff..56e8a3d1 100644 --- a/docs/examples/prometheus_exemplars/README.rst +++ b/docs/examples/prometheus_exemplars/README.rst @@ -37,10 +37,13 @@ traces to `Google Cloud Trace `_. } To run this example you first need to: - * Create a Google Cloud project. You can `create one here `_. - * Enable Cloud Trace API (listed in the Cloud Console as Stackdriver Trace API) in the project `here `_. If the page says "API Enabled" then you're done! No need to do anything. - * Enable Default Application Credentials by creating setting `GOOGLE_APPLICATION_CREDENTIALS `_ or by `installing gcloud sdk `_ and calling ``gcloud auth application-default login``. - * Have docker and docker compose installed on your machine + +* Create a Google Cloud project. You can `create one here `_. +* Set up `Application Default Credentials + `_ by `installing + gcloud `_ and running ``gcloud auth + application-default login``. +* Have docker and docker compose installed on your machine Attaching Prometheus Exemplars ------------------------------