google-cloud-trace 0.37.0 → 0.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 384b1cafe16ad5de310f82ade0a2fe59941cb76ca5cd9a23dabceb3d59df0d5d
4
- data.tar.gz: 74c9edde35e5de3a9b780a3e352a4713b09b90d84a351686b43d02b24ead6bea
3
+ metadata.gz: fb504eda6827a2043808556ae16548e74e495428bd812e03978dcce06395458a
4
+ data.tar.gz: 451e718b271274eb29e194dbcb0de641834f67e7d41d424cacecbe48de885b6f
5
5
  SHA512:
6
- metadata.gz: 01a6f53b2db9df587f396421db83b4861beae464f5fb36cddfbe7b7457750f8e760bfcfdb994a374aa583e253fabc2ebb3806aa75faaa1f47460dbcbc509634e
7
- data.tar.gz: 237e306b7ea598485bfa475740cfd8e956ed62d52e8f16d5aa67b2ffe752c837bd96a3e7bbd6ff40ea8a030b7fd91b21da169ab02e4c2166f5829cbdc7e2cbd2
6
+ metadata.gz: bb1bef8801444f3cda27c7a3882ec5efb10ddc7cb0ce5981278a710f505bc96b6c5808d6f4e7f6f4c3607fb2f2b04f9846a55495791862f618687e6d68b5c0e5
7
+ data.tar.gz: 715289c04a4e7450c42c9d050688477272d690bd622c97a45c0e94b5d6c2bfac4294b20d43b15363fddd4791034572ba00dc3c81e2236d768ec52aca52e048a8
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 0.37.1 / 2020-01-23
4
+
5
+ #### Documentation
6
+
7
+ * Update Status documentation
8
+
3
9
  ### 0.37.0 / 2019-12-19
4
10
 
5
11
  #### Features
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -17,67 +17,19 @@ module Google
17
17
  module Rpc
18
18
  # The `Status` type defines a logical error model that is suitable for
19
19
  # different programming environments, including REST APIs and RPC APIs. It is
20
- # used by [gRPC](https://github.com/grpc). The error model is designed to be:
20
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
21
+ # three pieces of data: error code, error message, and error details.
21
22
  #
22
- # * Simple to use and understand for most users
23
- # * Flexible enough to meet unexpected needs
24
- #
25
- # = Overview
26
- #
27
- # The `Status` message contains three pieces of data: error code, error
28
- # message, and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes
30
- # if needed. The error message should be a developer-facing English message
31
- # that helps developers *understand* and *resolve* the error. If a localized
32
- # user-facing error message is needed, put the localized message in the error
33
- # details or localize it in the client. The optional error details may contain
34
- # arbitrary information about the error. There is a predefined set of error
35
- # detail types in the package `google.rpc` that can be used for common error
36
- # conditions.
37
- #
38
- # = Language mapping
39
- #
40
- # The `Status` message is the logical representation of the error model, but it
41
- # is not necessarily the actual wire format. When the `Status` message is
42
- # exposed in different client libraries and different wire protocols, it can be
43
- # mapped differently. For example, it will likely be mapped to some exceptions
44
- # in Java, but more likely mapped to some error codes in C.
45
- #
46
- # = Other uses
47
- #
48
- # The error model and the `Status` message can be used in a variety of
49
- # environments, either with or without APIs, to provide a
50
- # consistent developer experience across different environments.
51
- #
52
- # Example uses of this error model include:
53
- #
54
- # * Partial errors. If a service needs to return partial errors to the client,
55
- # it may embed the `Status` in the normal response to indicate the partial
56
- # errors.
57
- #
58
- # * Workflow errors. A typical workflow has multiple steps. Each step may
59
- # have a `Status` message for error reporting.
60
- #
61
- # * Batch operations. If a client uses batch request and batch response, the
62
- # `Status` message should be used directly inside batch response, one for
63
- # each error sub-response.
64
- #
65
- # * Asynchronous operations. If an API call embeds asynchronous operation
66
- # results in its response, the status of those operations should be
67
- # represented directly using the `Status` message.
68
- #
69
- # * Logging. If some API errors are stored in logs, the message `Status` could
70
- # be used directly after any stripping needed for security/privacy reasons.
23
+ # You can find out more about this error model and how to work with it in the
24
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
71
25
  # @!attribute [rw] code
72
26
  # @return [Integer]
73
- # The status code, which should be an enum value of
74
- # {Google::Rpc::Code}.
27
+ # The status code, which should be an enum value of {Google::Rpc::Code}.
75
28
  # @!attribute [rw] message
76
29
  # @return [String]
77
30
  # A developer-facing error message, which should be in English. Any
78
31
  # user-facing error message should be localized and sent in the
79
- # {Google::Rpc::Status#details} field, or localized
80
- # by the client.
32
+ # {Google::Rpc::Status#details} field, or localized by the client.
81
33
  # @!attribute [rw] details
82
34
  # @return [Array<Google::Protobuf::Any>]
83
35
  # A list of messages that carry the error details. There is a common set of
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -70,6 +70,12 @@ module Google
70
70
 
71
71
  private_constant :PROJECT_PATH_TEMPLATE
72
72
 
73
+ SPAN_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
74
+ "projects/{project}/traces/{trace}/spans/{span}"
75
+ )
76
+
77
+ private_constant :SPAN_PATH_TEMPLATE
78
+
73
79
  # Returns a fully-qualified project resource name string.
74
80
  # @param project [String]
75
81
  # @return [String]
@@ -79,6 +85,19 @@ module Google
79
85
  )
80
86
  end
81
87
 
88
+ # Returns a fully-qualified span resource name string.
89
+ # @param project [String]
90
+ # @param trace [String]
91
+ # @param span [String]
92
+ # @return [String]
93
+ def self.span_path project, trace, span
94
+ SPAN_PATH_TEMPLATE.render(
95
+ :"project" => project,
96
+ :"trace" => trace,
97
+ :"span" => span
98
+ )
99
+ end
100
+
82
101
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
83
102
  # Provides the means for authenticating requests made by the client. This parameter can
84
103
  # be many types.
@@ -334,9 +353,7 @@ module Google
334
353
  # require "google/cloud/trace"
335
354
  #
336
355
  # trace_client = Google::Cloud::Trace.new(version: :v2)
337
- #
338
- # # TODO: Initialize `name`:
339
- # name = ''
356
+ # formatted_name = Google::Cloud::Trace::V2::TraceServiceClient.span_path("[PROJECT]", "[TRACE]", "[SPAN]")
340
357
  #
341
358
  # # TODO: Initialize `span_id`:
342
359
  # span_id = ''
@@ -349,7 +366,7 @@ module Google
349
366
  #
350
367
  # # TODO: Initialize `end_time`:
351
368
  # end_time = {}
352
- # response = trace_client.create_span(name, span_id, display_name, start_time, end_time)
369
+ # response = trace_client.create_span(formatted_name, span_id, display_name, start_time, end_time)
353
370
 
354
371
  def create_span \
355
372
  name,
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Trace
19
- VERSION = "0.37.0".freeze
19
+ VERSION = "0.37.1".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-trace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.37.0
4
+ version: 0.37.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-20 00:00:00.000000000 Z
11
+ date: 2020-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core