diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4fcfdf7a..2b6f9781 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.9.0" + ".": "1.9.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b7ae12d..d25fec27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://pypi.org/project/google-cloud-trace/#history +## [1.9.1](https://github.com/googleapis/python-trace/compare/v1.9.0...v1.9.1) (2023-01-23) + + +### Bug Fixes + +* Add context manager return types ([170efe4](https://github.com/googleapis/python-trace/commit/170efe461a6dddb8e4aac8b0797fca234b88a9ba)) + + +### Documentation + +* Add documentation for enums ([170efe4](https://github.com/googleapis/python-trace/commit/170efe461a6dddb8e4aac8b0797fca234b88a9ba)) + ## [1.9.0](https://github.com/googleapis/python-trace/compare/v1.8.0...v1.9.0) (2023-01-10) diff --git a/google/cloud/trace/gapic_version.py b/google/cloud/trace/gapic_version.py index 163d1511..13f1b4a7 100644 --- a/google/cloud/trace/gapic_version.py +++ b/google/cloud/trace/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "1.9.1" # {x-release-please-version} diff --git a/google/cloud/trace_v1/gapic_version.py b/google/cloud/trace_v1/gapic_version.py index 163d1511..13f1b4a7 100644 --- a/google/cloud/trace_v1/gapic_version.py +++ b/google/cloud/trace_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "1.9.1" # {x-release-please-version} diff --git a/google/cloud/trace_v1/services/trace_service/client.py b/google/cloud/trace_v1/services/trace_service/client.py index 554f3cd7..a0560e2f 100644 --- a/google/cloud/trace_v1/services/trace_service/client.py +++ b/google/cloud/trace_v1/services/trace_service/client.py @@ -766,7 +766,7 @@ def sample_patch_traces(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "TraceServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/trace_v1/types/trace.py b/google/cloud/trace_v1/types/trace.py index c7257d6f..2eca4b04 100644 --- a/google/cloud/trace_v1/types/trace.py +++ b/google/cloud/trace_v1/types/trace.py @@ -157,6 +157,18 @@ class TraceSpan(proto.Message): class SpanKind(proto.Enum): r"""Type of span. Can be used to specify additional relationships between spans in addition to a parent/child relationship. + + Values: + SPAN_KIND_UNSPECIFIED (0): + Unspecified. + RPC_SERVER (1): + Indicates that the span covers server-side + handling of an RPC or other remote network + request. + RPC_CLIENT (2): + Indicates that the span covers the + client-side wrapper around an RPC or other + remote request. """ SPAN_KIND_UNSPECIFIED = 0 RPC_SERVER = 1 @@ -276,7 +288,24 @@ class ListTracesRequest(proto.Message): """ class ViewType(proto.Enum): - r"""Type of data returned for traces in the list.""" + r"""Type of data returned for traces in the list. + + Values: + VIEW_TYPE_UNSPECIFIED (0): + Default is ``MINIMAL`` if unspecified. + MINIMAL (1): + Minimal view of the trace record that + contains only the project and trace IDs. + ROOTSPAN (2): + Root span view of the trace record that + returns the root spans along with the minimal + trace data. + COMPLETE (3): + Complete view of the trace record that contains the actual + trace data. This is equivalent to calling the REST ``get`` + or RPC ``GetTrace`` method using the ID of each listed + trace. + """ VIEW_TYPE_UNSPECIFIED = 0 MINIMAL = 1 ROOTSPAN = 2 diff --git a/google/cloud/trace_v2/gapic_version.py b/google/cloud/trace_v2/gapic_version.py index 163d1511..13f1b4a7 100644 --- a/google/cloud/trace_v2/gapic_version.py +++ b/google/cloud/trace_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.0" # {x-release-please-version} +__version__ = "1.9.1" # {x-release-please-version} diff --git a/google/cloud/trace_v2/services/trace_service/client.py b/google/cloud/trace_v2/services/trace_service/client.py index ae916a51..a3c32ec2 100644 --- a/google/cloud/trace_v2/services/trace_service/client.py +++ b/google/cloud/trace_v2/services/trace_service/client.py @@ -651,7 +651,7 @@ def sample_create_span(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "TraceServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/trace_v2/types/trace.py b/google/cloud/trace_v2/types/trace.py index d65a0556..66095978 100644 --- a/google/cloud/trace_v2/types/trace.py +++ b/google/cloud/trace_v2/types/trace.py @@ -121,6 +121,36 @@ class Span(proto.Message): class SpanKind(proto.Enum): r"""Type of span. Can be used to specify additional relationships between spans in addition to a parent/child relationship. + + Values: + SPAN_KIND_UNSPECIFIED (0): + Unspecified. Do NOT use as default. + Implementations MAY assume SpanKind.INTERNAL to + be default. + INTERNAL (1): + Indicates that the span is used internally. + Default value. + SERVER (2): + Indicates that the span covers server-side + handling of an RPC or other remote network + request. + CLIENT (3): + Indicates that the span covers the + client-side wrapper around an RPC or other + remote request. + PRODUCER (4): + Indicates that the span describes producer + sending a message to a broker. Unlike client and + server, there is no direct critical path latency + relationship between producer and consumer spans + (e.g. publishing a message to a pubsub service). + CONSUMER (5): + Indicates that the span describes consumer + receiving a message from a broker. Unlike client + and server, there is no direct critical path + latency relationship between producer and + consumer spans (e.g. receiving a message from a + pubsub service subscription). """ SPAN_KIND_UNSPECIFIED = 0 INTERNAL = 1 @@ -234,7 +264,16 @@ class MessageEvent(proto.Message): """ class Type(proto.Enum): - r"""Indicates whether the message was sent or received.""" + r"""Indicates whether the message was sent or received. + + Values: + TYPE_UNSPECIFIED (0): + Unknown event type. + SENT (1): + Indicates a sent message. + RECEIVED (2): + Indicates a received message. + """ TYPE_UNSPECIFIED = 0 SENT = 1 RECEIVED = 2 @@ -330,6 +369,16 @@ class Link(proto.Message): class Type(proto.Enum): r"""The relationship of the current span relative to the linked span: child, parent, or unspecified. + + Values: + TYPE_UNSPECIFIED (0): + The relationship of the two spans is unknown. + CHILD_LINKED_SPAN (1): + The linked span is a child of the current + span. + PARENT_LINKED_SPAN (2): + The linked span is a parent of the current + span. """ TYPE_UNSPECIFIED = 0 CHILD_LINKED_SPAN = 1 diff --git a/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v1.json b/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v1.json index 192e3071..f71110a5 100644 --- a/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v1.json +++ b/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-trace", - "version": "1.9.0" + "version": "1.9.1" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v2.json b/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v2.json index 56de73fc..b020b84a 100644 --- a/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v2.json +++ b/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-trace", - "version": "1.9.0" + "version": "1.9.1" }, "snippets": [ { diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index 89cb815c..dd3c7330 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1 +1 @@ -pytest==7.2.0 \ No newline at end of file +pytest==7.2.1 \ No newline at end of file diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 3e6d2bec..280c4dd9 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-trace==1.8.0 \ No newline at end of file +google-cloud-trace==1.9.0 \ No newline at end of file