Update logging protos and README.

pull/45/head
Ethan Bao 9 years ago
parent 3da37eec79
commit 41f2bf6894
  1. 3
      google/logging/README.md
  2. 15
      google/logging/type/http_request.proto
  3. 2
      google/logging/type/log_severity.proto
  4. 18
      google/logging/v2/log_entry.proto
  5. 65
      google/logging/v2/logging.proto
  6. 58
      google/logging/v2/logging_config.proto
  7. 34
      google/logging/v2/logging_metrics.proto

@ -1,2 +1,3 @@
# Introduction
The Google logging service.
The Stackdriver Logging service.

@ -1,4 +1,4 @@
// Copyright (c) 2015, Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -54,10 +54,17 @@ message HttpRequest {
// request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
string remote_ip = 7;
// The IP address (IPv4 or IPv6) of the origin server that the request was
// sent to.
string server_ip = 13;
// The referer URL of the request, as defined in
// [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
string referer = 8;
// Whether or not a cache lookup was attempted.
bool cache_lookup = 11;
// Whether or not an entity was served from cache
// (with or without validation).
bool cache_hit = 9;
@ -65,5 +72,9 @@ message HttpRequest {
// Whether or not the response was validated with the origin server before
// being served from cache. This field is only meaningful if `cache_hit` is
// True.
bool validated_with_origin_server = 10;
bool cache_validated_with_origin_server = 10;
// The number of HTTP response bytes inserted into cache. Set only when a
// cache fill was attempted.
int64 cache_fill_bytes = 12;
}

@ -1,4 +1,4 @@
// Copyright (c) 2015, Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

@ -1,4 +1,4 @@
// Copyright (c) 2015, Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -24,6 +24,7 @@ import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
option cc_enable_arenas = true;
option java_multiple_files = true;
option java_outer_classname = "LogEntryProto";
option java_package = "com.google.logging.v2";
@ -33,9 +34,9 @@ option java_package = "com.google.logging.v2";
message LogEntry {
// Required. The resource name of the log to which this log entry
// belongs. The format of the name is
// `projects/<project-id>/logs/<log-id%gt;`. Examples:
// `"projects/<project-id>/logs/<log-id>"`. Examples:
// `"projects/my-projectid/logs/syslog"`,
// `"projects/1234567890/logs/library.googleapis.com%2Fbook_log"`.
// `"projects/my-projectid/logs/library.googleapis.com%2Fbook_log"`.
//
// The log ID part of resource name must be less than 512 characters
// long and can only include the following characters: upper and
@ -66,17 +67,18 @@ message LogEntry {
}
// Optional. The time the event described by the log entry occurred. If
// omitted, Cloud Logging will use the time the log entry is written.
// omitted, Stackdriver Logging will use the time the log entry is received.
google.protobuf.Timestamp timestamp = 9;
// Optional. The severity of the log entry. The default value is
// `LogSeverity.DEFAULT`.
google.logging.type.LogSeverity severity = 10;
// Optional. A unique ID for the log entry. If you provide this field, the
// logging service considers other log entries in the same log with the same
// ID as duplicates which can be removed.
// If omitted, Cloud Logging will generate a unique ID for this log entry.
// Optional. A unique ID for the log entry. If you provide this
// field, the logging service considers other log entries in the
// same log with the same ID as duplicates which can be removed. If
// omitted, Stackdriver Logging will generate a unique ID for this
// log entry.
string insert_id = 4;
// Optional. Information about the HTTP request associated with this log entry,

@ -1,4 +1,4 @@
// Copyright (c) 2015, Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -19,7 +19,9 @@ package google.logging.v2;
import "google/api/annotations.proto";
import "google/api/monitored_resource.proto";
import "google/logging/v2/log_entry.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
option cc_enable_arenas = true;
@ -37,8 +39,8 @@ service LoggingServiceV2 {
option (google.api.http) = { delete: "/v2beta1/{log_name=projects/*/logs/*}" };
}
// Writes log entries to Cloud Logging.
// All log entries in Cloud Logging are written by this method.
// Writes log entries to Stackdriver Logging. All log entries are
// written by this method.
//
rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) {
option (google.api.http) = { post: "/v2beta1/entries:write" body: "*" };
@ -52,7 +54,7 @@ service LoggingServiceV2 {
option (google.api.http) = { post: "/v2beta1/entries:list" body: "*" };
}
// Lists monitored resource descriptors that are used by Cloud Logging.
// Lists the monitored resource descriptors used by Stackdriver Logging.
rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) {
option (google.api.http) = { get: "/v2beta1/monitoredResourceDescriptors" };
}
@ -85,10 +87,22 @@ message WriteLogEntriesRequest {
// Required. The log entries to write. The log entries must have values for
// all required fields.
//
// To improve throughput and to avoid exceeding the quota limit for calls
// to `entries.write`, use this field to write multiple log entries at once
// rather than // calling this method for each log entry.
repeated LogEntry entries = 4;
// Optional. Whether valid entries should be written even if some other
// entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
// entry is not written, the response status will be the error associated
// with one of the failed entries and include error details in the form of
// WriteLogEntriesPartialErrors.
bool partial_success = 5;
}
// Result returned from WriteLogEntries.
// empty
message WriteLogEntriesResponse {
}
@ -106,25 +120,24 @@ message ListLogEntriesRequest {
string filter = 2;
// Optional. How the results should be sorted. Presently, the only permitted
// values are `"timestamp"` (default) and `"timestamp desc"`. The first
// values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
// option returns entries in order of increasing values of
// `LogEntry.timestamp` (oldest first), and the second option returns entries
// in order of decreasing timestamps (newest first). Entries with equal
// timestamps are returned in order of `LogEntry.insertId`.
string order_by = 3;
// Optional. The maximum number of results to return from this request. Fewer
// results might be returned. You must check for the `nextPageToken` result to
// determine if additional results are available, which you can retrieve by
// passing the `nextPageToken` value in the `pageToken` parameter to the next
// request.
// Optional. The maximum number of results to return from this request.
// You must check for presence of `nextPageToken` to determine if additional
// results are available, which you can retrieve by passing the
// `nextPageToken` value as the `pageToken` parameter in the next request.
int32 page_size = 4;
// Optional. If the `pageToken` request parameter is supplied, then the next
// page of results in the set are retrieved. The `pageToken` parameter must
// be set with the value of the `nextPageToken` result parameter from the
// previous request. The values of `projectIds`, `filter`, and `orderBy` must
// be the same as in the previous request.
// Optional. If the `pageToken` parameter is supplied, then the next page of
// results is retrieved. The `pageToken` parameter must be set to the value
// of the `nextPageToken` from the previous response.
// The values of `projectIds`, `filter`, and `orderBy` must be the same
// as in the previous request.
string page_token = 5;
}
@ -134,24 +147,22 @@ message ListLogEntriesResponse {
repeated LogEntry entries = 1;
// If there are more results than were returned, then `nextPageToken` is
// given a value in the response. To get the next batch of results, call
// this method again using the value of `nextPageToken` as `pageToken`.
// included in the response. To get the next set of results, call this
// method again using the value of `nextPageToken` as `pageToken`.
string next_page_token = 2;
}
// The parameters to ListMonitoredResourceDescriptors
message ListMonitoredResourceDescriptorsRequest {
// Optional. The maximum number of results to return from this request. Fewer
// results might be returned. You must check for the `nextPageToken` result to
// determine if additional results are available, which you can retrieve by
// passing the `nextPageToken` value in the `pageToken` parameter to the next
// request.
// Optional. The maximum number of results to return from this request.
// You must check for presence of `nextPageToken` to determine if additional
// results are available, which you can retrieve by passing the
// `nextPageToken` value as the `pageToken` parameter in the next request.
int32 page_size = 1;
// Optional. If the `pageToken` request parameter is supplied, then the next
// page of results in the set are retrieved. The `pageToken` parameter must
// be set with the value of the `nextPageToken` result parameter from the
// previous request.
// Optional. If the `pageToken` parameter is supplied, then the next page of
// results is retrieved. The `pageToken` parameter must be set to the value
// of the `nextPageToken` from the previous response.
string page_token = 2;
}
@ -161,7 +172,7 @@ message ListMonitoredResourceDescriptorsResponse {
repeated google.api.MonitoredResourceDescriptor resource_descriptors = 1;
// If there are more results than were returned, then `nextPageToken` is
// returned in the response. To get the next batch of results, call this
// included in the response. To get the next set of results, call this
// method again using the value of `nextPageToken` as `pageToken`.
string next_page_token = 2;
}

@ -1,4 +1,4 @@
// Copyright (c) 2015, Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -17,6 +17,7 @@ syntax = "proto3";
package google.logging.v2;
import "google/api/annotations.proto";
import "google/logging/v1/logging_config.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
@ -28,7 +29,7 @@ option java_package = "com.google.logging.v2";
service ConfigServiceV2 {
// Lists sinks.
rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) {
option (google.api.http) = { get: "/v2beta1/{project_name=projects/*}/sinks" };
option (google.api.http) = { get: "/v2beta1/{parent=projects/*}/sinks" };
}
// Gets a sink.
@ -38,7 +39,7 @@ service ConfigServiceV2 {
// Creates a sink.
rpc CreateSink(CreateSinkRequest) returns (LogSink) {
option (google.api.http) = { post: "/v2beta1/{project_name=projects/*}/sinks" body: "sink" };
option (google.api.http) = { post: "/v2beta1/{parent=projects/*}/sinks" body: "sink" };
}
// Creates or updates a sink.
@ -52,7 +53,7 @@ service ConfigServiceV2 {
}
}
// Describes a sink used to export log entries outside Cloud Logging.
// Describes a sink used to export log entries outside Stackdriver Logging.
message LogSink {
// Available log entry formats. Log entries can be written to Cloud
// Logging in either format and can be exported in either format.
@ -81,38 +82,37 @@ message LogSink {
// `"bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset"`.
string destination = 3;
// An [advanced logs filter](/logging/docs/view/advanced_filters)
// that defines the log entries to be exported. The filter must be
// consistent with the log entry format designed by the
// An [advanced logs filter](/logging/docs/view/advanced_filters). Only
// log entries matching that filter are exported. The filter must be
// consistent with the log entry format specified by the
// `outputVersionFormat` parameter, regardless of the format of the
// log entry that was originally written to Cloud Logging.
// Example: `"logName:syslog AND severity>=ERROR"`.
// log entry that was originally written to Stackdriver Logging.
// Example (V2 format):
// `"logName=projects/my-projectid/logs/syslog AND severity>=ERROR"`.
string filter = 5;
// The log entry version used when exporting log entries from this
// sink. This version does not have to correspond to the version of
// the log entry when it was written to Cloud Logging.
// The log entry version to use for this sink's exported log entries.
// This version does not have to correspond to the version of the log entry
// when it was written to Stackdriver Logging.
VersionFormat output_version_format = 6;
}
// The parameters to `ListSinks`.
message ListSinksRequest {
// Required. The resource name of the project containing the sinks.
// Example: `"projects/my-logging-project"`, `"projects/01234567890"`.
string project_name = 1;
// Optional. If the `pageToken` request parameter is supplied, then the next
// page of results in the set are retrieved. The `pageToken` parameter must
// be set with the value of the `nextPageToken` result parameter from the
// previous request. The value of `projectName` must be the same as in the
// previous request.
// Required. The resource name containing the sinks.
// Example: `"projects/my-logging-project"`.
string parent = 1;
// Optional. If the `pageToken` parameter is supplied, then the next page of
// results is retrieved. The `pageToken` parameter must be set to the value
// of the `nextPageToken` from the previous response.
// The value of `parent` must be the same as in the previous request.
string page_token = 2;
// Optional. The maximum number of results to return from this request. Fewer
// results might be returned. You must check for the `nextPageToken` result to
// determine if additional results are available, which you can retrieve by
// passing the `nextPageToken` value in the `pageToken` parameter to the next
// request.
// Optional. The maximum number of results to return from this request.
// You must check for presence of `nextPageToken` to determine if additional
// results are available, which you can retrieve by passing the
// `nextPageToken` value as the `pageToken` parameter in the next request.
int32 page_size = 3;
}
@ -122,7 +122,7 @@ message ListSinksResponse {
repeated LogSink sinks = 1;
// If there are more results than were returned, then `nextPageToken` is
// given a value in the response. To get the next batch of results, call this
// included in the response. To get the next set of results, call this
// method again using the value of `nextPageToken` as `pageToken`.
string next_page_token = 2;
}
@ -136,11 +136,11 @@ message GetSinkRequest {
// The parameters to `CreateSink`.
message CreateSinkRequest {
// The resource name of the project in which to create the sink.
// The resource in which to create the sink.
// Example: `"projects/my-project-id"`.
//
// The new sink must be provided in the request.
string project_name = 1;
string parent = 1;
// The new sink, which must not have an identifier that already
// exists.

@ -1,4 +1,4 @@
// Copyright (c) 2015, Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -26,7 +26,7 @@ option java_package = "com.google.logging.v2";
service MetricsServiceV2 {
// Lists logs-based metrics.
rpc ListLogMetrics(ListLogMetricsRequest) returns (ListLogMetricsResponse) {
option (google.api.http) = { get: "/v2beta1/{project_name=projects/*}/metrics" };
option (google.api.http) = { get: "/v2beta1/{parent=projects/*}/metrics" };
}
// Gets a logs-based metric.
@ -36,7 +36,7 @@ service MetricsServiceV2 {
// Creates a logs-based metric.
rpc CreateLogMetric(CreateLogMetricRequest) returns (LogMetric) {
option (google.api.http) = { post: "/v2beta1/{project_name=projects/*}/metrics" body: "metric" };
option (google.api.http) = { post: "/v2beta1/{parent=projects/*}/metrics" body: "metric" };
}
// Creates or updates a logs-based metric.
@ -71,22 +71,20 @@ message LogMetric {
// The parameters to ListLogMetrics.
message ListLogMetricsRequest {
// Required. The resource name of the project containing the metrics.
// Required. The resource name containing the metrics.
// Example: `"projects/my-project-id"`.
string project_name = 1;
string parent = 1;
// Optional. If the `pageToken` request parameter is supplied, then the next
// page of results in the set are retrieved. The `pageToken` parameter must
// be set with the value of the `nextPageToken` result parameter from the
// previous request. The value of `projectName` must
// be the same as in the previous request.
// Optional. If the `pageToken` parameter is supplied, then the next page of
// results is retrieved. The `pageToken` parameter must be set to the value
// of the `nextPageToken` from the previous response.
// The value of `parent` must be the same as in the previous request.
string page_token = 2;
// Optional. The maximum number of results to return from this request. Fewer
// results might be returned. You must check for the `nextPageToken` result to
// determine if additional results are available, which you can retrieve by
// passing the `nextPageToken` value in the `pageToken` parameter to the next
// request.
// Optional. The maximum number of results to return from this request.
// You must check for presence of `nextPageToken` to determine if additional
// results are available, which you can retrieve by passing the
// `nextPageToken` value as the `pageToken` parameter in the next request.
int32 page_size = 3;
}
@ -95,8 +93,8 @@ message ListLogMetricsResponse {
// A list of logs-based metrics.
repeated LogMetric metrics = 1;
// If there are more results than were returned, then `nextPageToken` is given
// a value in the response. To get the next batch of results, call this
// If there are more results than were returned, then `nextPageToken` is
// included in the response. To get the next set of results, call this
// method again using the value of `nextPageToken` as `pageToken`.
string next_page_token = 2;
}
@ -114,7 +112,7 @@ message CreateLogMetricRequest {
// Example: `"projects/my-project-id"`.
//
// The new metric must be provided in the request.
string project_name = 1;
string parent = 1;
// The new logs-based metric, which must not have an identifier that
// already exists.

Loading…
Cancel
Save