Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
monitoring/usage
logging/usage
storage/client
trace/index
translate/usage
vision/index

Expand Down
5 changes: 3 additions & 2 deletions docs/trace/apis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ APIs
----

.. autosummary::
:toctree:

.. :toctree::

google.cloud.gapic.trace.v1.trace_service_client

Expand All @@ -14,6 +15,6 @@ API types
~~~~~~~~~

.. autosummary::
:toctree:
.. :toctree::

google.cloud.gapic.trace.v1.enums
25 changes: 20 additions & 5 deletions docs/trace/starting.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Getting started
===============

gapic-google-cloud-trace-v1 will allow you to connect to the `Stackdriver Trace API`_ and access all its methods. In order to achieve this, you need to set up authentication as well as install the library locally.
google-cloud-trace will allow you to connect to the `Stackdriver Trace API`_ and access all its methods. In order to achieve this, you need to set up authentication as well as install the library locally.

.. _`Stackdriver Trace API`: https://developers.google.com/apis-explorer/?hl=en_US#p/cloudtrace/v1/

Expand Down Expand Up @@ -29,7 +29,7 @@ Mac/Linux
pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-cloud-trace-v1
<your-env>/bin/pip install google-cloud-trace

Windows
~~~~~~~
Expand All @@ -39,7 +39,7 @@ Windows
pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install gapic-google-cloud-trace-v1
<your-env>\Scripts\pip.exe install google-cloud-trace


Using the API
Expand Down Expand Up @@ -74,5 +74,20 @@ At this point you are all set to continue.
Examples
~~~~~~~~

To see example usage, please read through the :doc:`API reference </apis>`. The
documentation for each API method includes simple examples.
.. code-block:: python

from google.cloud.trace import client

client = client.Client(project_id='your_project_id')

# Patch traces, traces should be a dict
client.patch_traces(traces=traces)

# Get trace
client.get_trace(trace_id='your_trace_id')

# List traces
traces = client.list_traces()

for trace in traces:
print(trace)