GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Should entry metadata be stored on the logger, or passed explicity? · Issue #1566 · googleapis/google-cloud-python

Should entry metadata be stored on the logger, or passed explicity? #1566

New issue
Copy link
New issue
Copy link
Closed
Closed
Should entry metadata be stored on the logger, or passed explicity?#1566
Copy link
Assignees
tseaver
Labels
api: loggingIssues related to the Cloud Logging API.type: questionRequest for information or clarification. Not an issue.

Description

@tseaver
tseaver
opened on Mar 3, 2016
Issue body actions

The entries.write API takes a number of optional, non-payload variables for each entry:

  • resource is a MonitoredResource: AFAICT, we should always be passing it as {"type": "global"} (the others are generated by the various API backends).
  • labels is an arbitrary key-value mapping (distinct from the structPayload).
  • severity is an enumerated value, defaulting to LogSeverity.DEFAULT.
  • insertId for de-duplication (set by the backend if not passed).
  • httpRequest is a struct describing the HTTP request associated with the entry.
  • operation is a struct allowing multiple entries to be grouped into an "operation".

resource and labels can also be passed as top-level defaults.

My question is: how should we expose these options? Should we capture values on the logger itself (e.g., when constructing it)? Should we allow passing them as explicit arguments to the individual log_text/log_struct calls? Some of them should clearly be per-entry (httpRequest, insertId, severity). operation might map best onto a batch-like entity (see #1565). labels and resource (assuming we allow it) seem like they are better associated with the logger.

Activity

  1. tseaver
    added
    type: questionRequest for information or clarification. Not an issue.
    api: loggingIssues related to the Cloud Logging API.
    on Mar 3, 2016
  2. jgeewax commented on Mar 7, 2016

    @jgeewax
    jgeewax
    on Mar 7, 2016
    Contributor
    More actions

    Can we do an inherit-down model? Where we define things that may want to be shared on the logger, and the methods inside can override that default?

  3. tseaver commented on Mar 30, 2016

    @tseaver
    tseaver
    on Mar 30, 2016
    ContributorAuthor
    More actions

    operation now tracked as #1676. Other features added in #1668, #1669.

  4. tseaver
    closed this as completedon Mar 30, 2016
  5. JustinBeckwith
    assigned
    tseaver
    on Feb 1, 2021
  6. parthea
    added a commit that references this issue on Sep 22, 2023

    docs: add samples from python-docs-samples/tasks (#36)

    19a15ff
  7. parthea
    added 3 commits that reference this issue on Nov 24, 2025

    chore: support url schema in api endpoint (#1566)

    6e8ef10

    chore: Add aiohttp requirements test constraint. (#1566)

    fd35fd5

    feat: Add support for asynchronous `AuthorizedSession` api (#1577)

    0d38ef8
  8. parthea
    added 2 commits that reference this issue on Mar 2, 2026

    feat(gapic): support mTLS certificates when available (#1566)

    8c2f20f

    chore: librarian release pull request: 20251216T133533Z (#1567)

    e63a4ae
  9. parthea
    added a commit that references this issue on Mar 9, 2026

    feat(experimental): add checksum for bidi reads operation (#1566)

    a162d7f
  10. parthea
    added a commit that references this issue on Apr 1, 2026

    chore: add `include_internal_calls` param to logger (#1566)

    15adc5c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: loggingIssues related to the Cloud Logging API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.