diff --git a/docs/index.rst b/docs/index.rst index ee47a2ac378f..b9fdb6bc20a2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,6 +17,7 @@ monitoring/usage logging/usage storage/client + trace/index translate/usage vision/index diff --git a/docs/trace/apis.rst b/docs/trace/apis.rst index 80a8d50c0c60..03c170783e06 100644 --- a/docs/trace/apis.rst +++ b/docs/trace/apis.rst @@ -5,7 +5,8 @@ APIs ---- .. autosummary:: - :toctree: + +.. :toctree:: google.cloud.gapic.trace.v1.trace_service_client @@ -14,6 +15,6 @@ API types ~~~~~~~~~ .. autosummary:: - :toctree: +.. :toctree:: google.cloud.gapic.trace.v1.enums diff --git a/docs/trace/starting.rst b/docs/trace/starting.rst index 245fcfd68a87..0fbd7c108048 100644 --- a/docs/trace/starting.rst +++ b/docs/trace/starting.rst @@ -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/ @@ -29,7 +29,7 @@ Mac/Linux pip install virtualenv virtualenv source /bin/activate - /bin/pip install gapic-google-cloud-trace-v1 + /bin/pip install google-cloud-trace Windows ~~~~~~~ @@ -39,7 +39,7 @@ Windows pip install virtualenv virtualenv \Scripts\activate - \Scripts\pip.exe install gapic-google-cloud-trace-v1 + \Scripts\pip.exe install google-cloud-trace Using the API @@ -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 `. 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)