Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Logging: Add LoggingV2Servicer, LogSinks, logging_metrics, and log_entry. Add LogSeverity and HttpRequest types (via synth). #9262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions 33 logging/google/cloud/logging_v2/gapic/config_service_v2_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,11 @@
import google.api_core.path_template
import grpc

from google.api import monitored_resource_pb2
from google.cloud.logging_v2.gapic import config_service_v2_client_config
from google.cloud.logging_v2.gapic import enums
from google.cloud.logging_v2.gapic.transports import config_service_v2_grpc_transport
from google.cloud.logging_v2.proto import log_entry_pb2
from google.cloud.logging_v2.proto import logging_config_pb2
from google.cloud.logging_v2.proto import logging_config_pb2_grpc
from google.cloud.logging_v2.proto import logging_pb2
from google.cloud.logging_v2.proto import logging_pb2_grpc
from google.protobuf import empty_pb2
from google.protobuf import field_mask_pb2

Expand All @@ -48,10 +44,7 @@


class ConfigServiceV2Client(object):
"""
Service for configuring sinks used to export log entries out of
Logging.
"""
"""Service for configuring sinks used to route log entries."""

SERVICE_ADDRESS = "logging.googleapis.com:443"
"""The default address of the service."""
Expand Down Expand Up @@ -593,8 +586,10 @@ def update_sink(
"""
Updates a sink. This method replaces the following fields in the
existing sink with values from the new sink: ``destination``, and
``filter``. The updated sink might also have a new ``writer_identity``;
see the ``unique_writer_identity`` field.
``filter``.

The updated sink might also have a new ``writer_identity``; see the
``unique_writer_identity`` field.

Example:
>>> from google.cloud import logging_v2
Expand Down Expand Up @@ -625,11 +620,10 @@ def update_sink(

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.logging_v2.types.LogSink`
unique_writer_identity (bool): Optional. See
`sinks.create <https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create>`__
for a description of this field. When updating a sink, the effect of
this field on the value of ``writer_identity`` in the updated sink
depends on both the old and new values of this field:
unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When
updating a sink, the effect of this field on the value of
``writer_identity`` in the updated sink depends on both the old and new
values of this field:

- If the old and new values of this field are both false or both true,
then there is no change to the sink's ``writer_identity``.
Expand Down Expand Up @@ -1106,10 +1100,11 @@ def update_exclusion(

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.logging_v2.types.LogExclusion`
update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Required. A nonempty list of fields to change in the existing exclusion.
New values for the fields are taken from the corresponding fields in the
``LogExclusion`` included in this request. Fields not mentioned in
``update_mask`` are not changed and are ignored in the request.
update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Required. A non-empty list of fields to change in the existing
exclusion. New values for the fields are taken from the corresponding
fields in the ``LogExclusion`` included in this request. Fields not
mentioned in ``update_mask`` are not changed and are ignored in the
request.

For example, to change the filter and description of an exclusion,
specify an ``update_mask`` of ``"filter,description"``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@
from google.cloud.logging_v2.gapic import logging_service_v2_client_config
from google.cloud.logging_v2.gapic.transports import logging_service_v2_grpc_transport
from google.cloud.logging_v2.proto import log_entry_pb2
from google.cloud.logging_v2.proto import logging_config_pb2
from google.cloud.logging_v2.proto import logging_config_pb2_grpc
from google.cloud.logging_v2.proto import logging_pb2
from google.cloud.logging_v2.proto import logging_pb2_grpc
from google.protobuf import empty_pb2
from google.protobuf import field_mask_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-logging").version
Expand Down Expand Up @@ -374,8 +377,8 @@ def write_log_entries(
Log entries with timestamps that are more than the `logs retention
period <https://cloud.google.com/logging/quota-policy>`__ in the past or
more than 24 hours in the future will not be available when calling
``entries.list``. However, those log entries can still be exported with
`LogSinks <https://cloud.google.com/logging/docs/api/tasks/exporting-logs>`__.
``entries.list``. However, those log entries can still be `exported with
LogSinks <https://cloud.google.com/logging/docs/api/tasks/exporting-logs>`__.

To improve throughput and to avoid exceeding the `quota
limit <https://cloud.google.com/logging/quota-policy>`__ for calls to
Expand Down Expand Up @@ -486,8 +489,9 @@ def list_log_entries(
metadata=None,
):
"""
Lists log entries. Use this method to retrieve log entries from Logging.
For ways to export log entries, see `Exporting
Lists log entries. Use this method to retrieve log entries that
originated from a project/folder/organization/billing account. For ways
to export log entries, see `Exporting
Logs <https://cloud.google.com/logging/docs/export>`__.

Example:
Expand Down Expand Up @@ -526,9 +530,7 @@ def list_log_entries(
Projects listed in the ``project_ids`` field are added to this list.
project_ids (list[str]): Deprecated. Use ``resource_names`` instead. One or more project
identifiers or project numbers from which to retrieve log entries.
Example: ``"my-project-1A"``. If present, these project identifiers are
converted to resource name format and added to the list of resources in
``resource_names``.
Example: ``"my-project-1A"``.
filter_ (str): Optional. A filter that chooses which log entries to return. See
`Advanced Logs
Filters <https://cloud.google.com/logging/docs/view/advanced_filters>`__.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ def update_sink(self):

Updates a sink. This method replaces the following fields in the
existing sink with values from the new sink: ``destination``, and
``filter``. The updated sink might also have a new ``writer_identity``;
see the ``unique_writer_identity`` field.
``filter``.

The updated sink might also have a new ``writer_identity``; see the
``unique_writer_identity`` field.

Returns:
Callable: A callable which accepts the appropriate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ def write_log_entries(self):
def list_log_entries(self):
"""Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`.

Lists log entries. Use this method to retrieve log entries from Logging.
For ways to export log entries, see `Exporting
Lists log entries. Use this method to retrieve log entries that
originated from a project/folder/organization/billing account. For ways
to export log entries, see `Exporting
Logs <https://cloud.google.com/logging/docs/export>`__.

Returns:
Expand Down
Empty file.
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.