Skip to content
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

docs: add install reference for cloud trace exporter (opentelemetry) #127

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/opentelemetry-tracing.rst
@@ -1,15 +1,19 @@
Tracing with OpenTelemetry
==================================
==========================

This library uses `OpenTelemetry <https://opentelemetry.io/>`_ to automatically generate traces providing insight on calls to Cloud Spanner.
For information on the benefits and utility of tracing, see the `Cloud Trace docs <https://cloud.google.com/trace/docs/overview>`_.

To take advantage of these traces, we first need to install opentelemetry:
To take advantage of these traces, we first need to install OpenTelemetry:

.. code-block:: sh

pip install opentelemetry-api opentelemetry-sdk opentelemetry-instrumentation

We also need to tell OpenTelemetry which exporter to use. For example, to export python-spanner traces to `Cloud Tracing <https://cloud.google.com/trace>`_, add the following lines to your application:
# [Optional] Installs the cloud monitoring exporter, however you can use any exporter of your choice
pip install opentelemetry-exporter-google-cloud

We also need to tell OpenTelemetry which exporter to use. To export spanner traces to `Cloud Tracing <https://cloud.google.com/trace>`_, add the following lines to your application:
cnnradams marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand Down