google-cloud-logging 0.24.0 → 0.24.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/logging/logger.rb +2 -3
  3. data/lib/google/cloud/logging/service.rb +6 -6
  4. data/lib/google/cloud/logging/v2/config_service_v2_client.rb +66 -35
  5. data/lib/google/cloud/logging/v2/config_service_v2_client_config.json +5 -5
  6. data/lib/google/cloud/logging/v2/doc/google/api/label.rb +2 -2
  7. data/lib/google/cloud/logging/v2/doc/google/api/monitored_resource.rb +2 -2
  8. data/lib/google/cloud/logging/v2/doc/google/logging/type/http_request.rb +2 -2
  9. data/lib/google/cloud/logging/v2/doc/google/logging/v2/log_entry.rb +32 -2
  10. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging.rb +54 -11
  11. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_config.rb +80 -51
  12. data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb +5 -4
  13. data/lib/google/cloud/logging/v2/doc/google/protobuf/any.rb +2 -2
  14. data/lib/google/cloud/logging/v2/doc/google/protobuf/duration.rb +2 -2
  15. data/lib/google/cloud/logging/v2/doc/google/protobuf/timestamp.rb +2 -2
  16. data/lib/google/cloud/logging/v2/logging_service_v2_client.rb +105 -22
  17. data/lib/google/cloud/logging/v2/logging_service_v2_client_config.json +16 -6
  18. data/lib/google/cloud/logging/v2/metrics_service_v2_client.rb +14 -11
  19. data/lib/google/cloud/logging/v2/metrics_service_v2_client_config.json +5 -5
  20. data/lib/google/cloud/logging/version.rb +1 -1
  21. data/lib/google/logging/v2/log_entry_pb.rb +8 -0
  22. data/lib/google/logging/v2/logging_config_services_pb.rb +15 -3
  23. data/lib/google/logging/v2/logging_pb.rb +11 -0
  24. data/lib/google/logging/v2/logging_services_pb.rb +7 -3
  25. metadata +2 -16
@@ -2,11 +2,11 @@
2
2
  "interfaces": {
3
3
  "google.logging.v2.LoggingServiceV2": {
4
4
  "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": []
5
+ "idempotent": [
6
+ "DEADLINE_EXCEEDED",
7
+ "UNAVAILABLE"
8
+ ],
9
+ "non_idempotent": []
10
10
  },
11
11
  "retry_params": {
12
12
  "default": {
@@ -37,7 +37,12 @@
37
37
  "WriteLogEntries": {
38
38
  "timeout_millis": 30000,
39
39
  "retry_codes_name": "non_idempotent",
40
- "retry_params_name": "default"
40
+ "retry_params_name": "default",
41
+ "bundling": {
42
+ "element_count_threshold": 100,
43
+ "request_byte_threshold": 1024,
44
+ "delay_threshold_millis": 10
45
+ }
41
46
  },
42
47
  "ListLogEntries": {
43
48
  "timeout_millis": 30000,
@@ -48,6 +53,11 @@
48
53
  "timeout_millis": 30000,
49
54
  "retry_codes_name": "idempotent",
50
55
  "retry_params_name": "default"
56
+ },
57
+ "ListLogs": {
58
+ "timeout_millis": 30000,
59
+ "retry_codes_name": "idempotent",
60
+ "retry_params_name": "default"
51
61
  }
52
62
  }
53
63
  }
@@ -45,8 +45,6 @@ module Google
45
45
  # The default port of the service.
46
46
  DEFAULT_SERVICE_PORT = 443
47
47
 
48
- CODE_GEN_NAME_VERSION = "gapic/0.1.0".freeze
49
-
50
48
  DEFAULT_TIMEOUT = 30
51
49
 
52
50
  PAGE_DESCRIPTORS = {
@@ -136,10 +134,6 @@ module Google
136
134
  # or the specified config is missing data points.
137
135
  # @param timeout [Numeric]
138
136
  # The default timeout, in seconds, for calls made through this client.
139
- # @param app_name [String]
140
- # The codename of the calling service.
141
- # @param app_version [String]
142
- # The version of the calling service.
143
137
  def initialize \
144
138
  service_path: SERVICE_ADDRESS,
145
139
  port: DEFAULT_SERVICE_PORT,
@@ -148,8 +142,10 @@ module Google
148
142
  scopes: ALL_SCOPES,
149
143
  client_config: {},
150
144
  timeout: DEFAULT_TIMEOUT,
151
- app_name: "gax",
152
- app_version: Google::Gax::VERSION
145
+ app_name: nil,
146
+ app_version: nil,
147
+ lib_name: nil,
148
+ lib_version: ""
153
149
  # These require statements are intentionally placed here to initialize
154
150
  # the gRPC module only when it's required.
155
151
  # See https://github.com/googleapis/toolkit/issues/446
@@ -157,9 +153,16 @@ module Google
157
153
  require "google/logging/v2/logging_metrics_services_pb"
158
154
 
159
155
 
160
- google_api_client = "#{app_name}/#{app_version} " \
161
- "#{CODE_GEN_NAME_VERSION} gax/#{Google::Gax::VERSION} " \
162
- "ruby/#{RUBY_VERSION}".freeze
156
+ if app_name || app_version
157
+ warn "`app_name` and `app_version` are no longer being used in the request headers."
158
+ end
159
+
160
+ google_api_client = "gl-ruby/#{RUBY_VERSION}"
161
+ google_api_client << " #{lib_name}/#{lib_version}" if lib_name
162
+ google_api_client << " gapic/ gax/#{Google::Gax::VERSION}"
163
+ google_api_client << " grpc/#{GRPC::VERSION}"
164
+ google_api_client.freeze
165
+
163
166
  headers = { :"x-goog-api-client" => google_api_client }
164
167
  client_config_file = Pathname.new(__dir__).join(
165
168
  "metrics_service_v2_client_config.json"
@@ -2,11 +2,11 @@
2
2
  "interfaces": {
3
3
  "google.logging.v2.MetricsServiceV2": {
4
4
  "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": []
5
+ "idempotent": [
6
+ "DEADLINE_EXCEEDED",
7
+ "UNAVAILABLE"
8
+ ],
9
+ "non_idempotent": []
10
10
  },
11
11
  "retry_params": {
12
12
  "default": {
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Logging
19
- VERSION = "0.24.0"
19
+ VERSION = "0.24.1"
20
20
  end
21
21
  end
22
22
  end
@@ -20,6 +20,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  optional :http_request, :message, 7, "google.logging.type.HttpRequest"
21
21
  map :labels, :string, :string, 11
22
22
  optional :operation, :message, 15, "google.logging.v2.LogEntryOperation"
23
+ optional :trace, :string, 22
24
+ optional :source_location, :message, 23, "google.logging.v2.LogEntrySourceLocation"
23
25
  oneof :payload do
24
26
  optional :proto_payload, :message, 2, "google.protobuf.Any"
25
27
  optional :text_payload, :string, 3
@@ -32,6 +34,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
32
34
  optional :first, :bool, 3
33
35
  optional :last, :bool, 4
34
36
  end
37
+ add_message "google.logging.v2.LogEntrySourceLocation" do
38
+ optional :file, :string, 1
39
+ optional :line, :int64, 2
40
+ optional :function, :string, 3
41
+ end
35
42
  end
36
43
 
37
44
  module Google
@@ -39,6 +46,7 @@ module Google
39
46
  module V2
40
47
  LogEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntry").msgclass
41
48
  LogEntryOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntryOperation").msgclass
49
+ LogEntrySourceLocation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.LogEntrySourceLocation").msgclass
42
50
  end
43
51
  end
44
52
  end
@@ -37,11 +37,23 @@ module Google
37
37
  rpc :ListSinks, ListSinksRequest, ListSinksResponse
38
38
  # Gets a sink.
39
39
  rpc :GetSink, GetSinkRequest, LogSink
40
- # Creates a sink.
40
+ # Creates a sink that exports specified log entries to a destination. The
41
+ # export of newly-ingested log entries begins immediately, unless the current
42
+ # time is outside the sink's start and end times or the sink's
43
+ # `writer_identity` is not permitted to write to the destination. A sink can
44
+ # export log entries only from the resource owning the sink.
41
45
  rpc :CreateSink, CreateSinkRequest, LogSink
42
- # Updates or creates a sink.
46
+ # Updates a sink. If the named sink doesn't exist, then this method is
47
+ # identical to
48
+ # [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create).
49
+ # If the named sink does exist, then this method replaces the following
50
+ # fields in the existing sink with values from the new sink: `destination`,
51
+ # `filter`, `output_version_format`, `start_time`, and `end_time`.
52
+ # The updated filter might also have a new `writer_identity`; see the
53
+ # `unique_writer_identity` field.
43
54
  rpc :UpdateSink, UpdateSinkRequest, LogSink
44
- # Deletes a sink.
55
+ # Deletes a sink. If the sink has a unique `writer_identity`, then that
56
+ # service account is also deleted.
45
57
  rpc :DeleteSink, DeleteSinkRequest, Google::Protobuf::Empty
46
58
  end
47
59
 
@@ -43,6 +43,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
43
43
  repeated :resource_descriptors, :message, 1, "google.api.MonitoredResourceDescriptor"
44
44
  optional :next_page_token, :string, 2
45
45
  end
46
+ add_message "google.logging.v2.ListLogsRequest" do
47
+ optional :parent, :string, 1
48
+ optional :page_size, :int32, 2
49
+ optional :page_token, :string, 3
50
+ end
51
+ add_message "google.logging.v2.ListLogsResponse" do
52
+ repeated :log_names, :string, 3
53
+ optional :next_page_token, :string, 2
54
+ end
46
55
  end
47
56
 
48
57
  module Google
@@ -55,6 +64,8 @@ module Google
55
64
  ListLogEntriesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListLogEntriesResponse").msgclass
56
65
  ListMonitoredResourceDescriptorsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListMonitoredResourceDescriptorsRequest").msgclass
57
66
  ListMonitoredResourceDescriptorsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListMonitoredResourceDescriptorsResponse").msgclass
67
+ ListLogsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListLogsRequest").msgclass
68
+ ListLogsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.ListLogsResponse").msgclass
58
69
  end
59
70
  end
60
71
  end
@@ -38,12 +38,16 @@ module Google
38
38
  # Writes log entries to Stackdriver Logging. All log entries are
39
39
  # written by this method.
40
40
  rpc :WriteLogEntries, WriteLogEntriesRequest, WriteLogEntriesResponse
41
- # Lists log entries. Use this method to retrieve log entries from Cloud
42
- # Logging. For ways to export log entries, see
41
+ # Lists log entries. Use this method to retrieve log entries from
42
+ # Stackdriver Logging. For ways to export log entries, see
43
43
  # [Exporting Logs](/logging/docs/export).
44
44
  rpc :ListLogEntries, ListLogEntriesRequest, ListLogEntriesResponse
45
- # Lists the monitored resource descriptors used by Stackdriver Logging.
45
+ # Lists the descriptors for monitored resource types used by Stackdriver
46
+ # Logging.
46
47
  rpc :ListMonitoredResourceDescriptors, ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse
48
+ # Lists the logs in projects or organizations.
49
+ # Only logs that have entries are listed.
50
+ rpc :ListLogs, ListLogsRequest, ListLogsResponse
47
51
  end
48
52
 
49
53
  Stub = Service.rpc_stub_class
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.24.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-21 00:00:00.000000000 Z
12
+ date: 2017-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -53,20 +53,6 @@ dependencies:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: 0.8.0
56
- - !ruby/object:Gem::Dependency
57
- name: orderedhash
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - '='
61
- - !ruby/object:Gem::Version
62
- version: 0.0.6
63
- type: :runtime
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - '='
68
- - !ruby/object:Gem::Version
69
- version: 0.0.6
70
56
  - !ruby/object:Gem::Dependency
71
57
  name: minitest
72
58
  requirement: !ruby/object:Gem::Requirement