Skip to content

Impelement GAX logging API helper.#1884

Merged
tseaver merged 3 commits intogoogleapis:masterfrom
tseaver:logging-gax_logging_api_helper
Jun 22, 2016
Merged

Impelement GAX logging API helper.#1884
tseaver merged 3 commits intogoogleapis:masterfrom
tseaver:logging-gax_logging_api_helper

Conversation

@tseaver
Copy link
Contributor

@tseaver tseaver commented Jun 22, 2016

No description provided.

@tseaver tseaver added the api: logging Issues related to the Cloud Logging API. label Jun 22, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 22, 2016

import json

# pylint: disable=import-error

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@daspecster
Copy link
Contributor

How do we feel about the pragma/pylint overrides?

@tseaver
Copy link
Contributor Author

tseaver commented Jun 22, 2016

@daspecster

How do we feel about the pragma/pylint overrides?

I have very little respect the opinions involved in numerical limits in pylintrc_default / pylintrc_testing, especially where we dial up and down the numbers over time. @dhermes has a different opinion about the numerical limits.

In testcase methods, too-many-lines is completely bogus: adding an assertion to a testcase which pushes it over some arbitrary limit does not magically make the method "wrong" -- it clearly improves it.

For functions like _log_entry_mapping_to_pb, too-many-branches is equally wrong: chopping that function up in to pieces to satisfy that opinion would make it harder to read and understand.

For the import issues: if we ever get to the point that grpico and friends are universally installable / importable, we can likely remove those.

:type entries: sequence of mapping
:param entries: the log entry resources to log.

:type logger_name: string

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@daspecster
Copy link
Contributor

Is this meant to be used with _LoggingAPI in /gcloud/logging/connection.py?

I guess I'm trying to understand how people would use these together in practice?

@tseaver
Copy link
Contributor Author

tseaver commented Jun 22, 2016

@daspecster

Is this meant to be used with _LoggingAPI in /gcloud/logging/connection.py?

I guess I'm trying to understand how people would use these together in practice?

The class in this PR is the GAX -protobuf-over-gRPC alternative to that class, which is the JSON-over-HTTP version providing the same API. Only one of the two will be used in any given instance, based on a) importability of the gRPC-related modules, and b) an environment variable switch. That bit will get wired in in a subsequent PR, after implementing GAX versions of the _SinksAPI and _MetricsAPI helpers.

@daspecster
Copy link
Contributor

Thanks! LGTM!

@tseaver tseaver merged commit 1124e87 into googleapis:master Jun 22, 2016
@tseaver tseaver deleted the logging-gax_logging_api_helper branch June 22, 2016 20:16
parthea pushed a commit that referenced this pull request Mar 2, 2026
…onatedCredentials (#1884)

This PR addresses a bug in ImpersonatedCredentials that causes a issues
when the source_credential is of a type that does not implement the
private _refresh_token method (for example, a custom credential type).
parthea pushed a commit that referenced this pull request Mar 2, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.7.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator:latest
<details><summary>google-auth: 2.44.0</summary>

##
[2.44.0](googleapis/google-auth-library-python@v2.43.0...v2.44.0)
(2025-12-12)

### Features

* MDS connections use mTLS (#1856)
([0387bb95](googleapis/google-auth-library-python@0387bb95))

* support Python 3.14 (#1822)
([0f7097e7](googleapis/google-auth-library-python@0f7097e7))

* add ecdsa p-384 support (#1872)
([39c381a5](googleapis/google-auth-library-python@39c381a5))

* Add shlex to correctly parse executable commands with spaces (#1855)
([cf6fc3cc](googleapis/google-auth-library-python@cf6fc3cc))

* Implement token revocation in STS client and add revoke() metho…
(#1849)
([d5638986](googleapis/google-auth-library-python@d5638986))

### Bug Fixes

* Add temporary patch to workload cert logic to accomodate Cloud Run
mis-configuration (#1880)
([78de7907](googleapis/google-auth-library-python@78de7907))

* Delegate workload cert and key default lookup to helper function
(#1877)
([b0993c7e](googleapis/google-auth-library-python@b0993c7e))

* Use public refresh method for source credentials in
ImpersonatedCredentials (#1884)
([e0c3296f](googleapis/google-auth-library-python@e0c3296f))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: logging Issues related to the Cloud Logging API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants