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 — Mismatch between 'CreateMetricRequest' and 'MetricsServiceV2Api.create_metric' · Issue #1891 · googleapis/google-cloud-python

Mismatch between 'CreateMetricRequest' and 'MetricsServiceV2Api.create_metric' #1891

New issue
Copy link
New issue
Copy link
Closed
Closed
Mismatch between 'CreateMetricRequest' and 'MetricsServiceV2Api.create_metric'#1891
Copy link
Assignees
tseaver
Labels
api: loggingIssues related to the Cloud Logging API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@tseaver
tseaver
opened on Jun 22, 2016
Issue body actions

@bjwatson, @tbetbetbe PTAL. Needs to have #1888 merged here; after that, reproduce via:

$ git clone [email protected]:GoogleCloudPlatform/gcloud
$ cd gcloud
$ tox -e system-tests --notest
$ .tox/system-tests/bin/python

and then:

>>> from google.logging.v2.metrics_service_v2_api import MetricsServiceV2Api
>>> from gcloud.logging._gax import _MetricssAPI
>>> from gcloud.logging import Client
>>> client = Client()
>>> client._metrics_api = _MetricssAPI(MetricsServiceV2Api())
>>> metric = client.metric('gcloud-issue-xxxx-metric', 'logName=gcloud-issue-xxxx')
>>> metric.exists()
False
>>> metric.create()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/logging/metric.py", line 113, in create
    self.project, self.name, self.filter_, self.description)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/logging/_gax.py", line 322, in metric_create
    self._gax_api.create_log_metric(parent, metric_pb, options)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/py27/lib/python2.7/site-packages/google/logging/v2/metrics_service_v2_api.py", line 302, in create_log_metric
    metric=metric)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/py27/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 496, in init
    field = _GetFieldByName(message_descriptor, field_name)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/py27/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 560, in _GetFieldByName
    (message_descriptor.name, field_name))
ValueError: Protocol message CreateLogMetricRequest has no "parent" field.

Clearly similar to #1890.

Activity

  1. tseaver
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: loggingIssues related to the Cloud Logging API.
    on Jun 22, 2016
  2. bjwatson commented on Jun 25, 2016

    @bjwatson
    bjwatson
    on Jun 25, 2016
    More actions

    Seems to also be fixed by #1904

  3. tseaver commented on Jun 25, 2016

    @tseaver
    tseaver
    on Jun 25, 2016
    ContributorAuthor
    More actions

    Via #1904.

  4. tseaver
    closed this as completedon Jun 25, 2016
  5. JustinBeckwith
    assigned
    tseaver
    on Feb 1, 2021
  6. parthea
    added a commit that references this issue on Jul 6, 2023

    Moved the imports and region tags inside the functions [(#1891)](Goo…

    b9fa5cd
  7. parthea
    added a commit that references this issue on Nov 24, 2025

    chore(deps): update all dependencies (#1891)

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

    chore: librarian release pull request: 20251215T132028Z (#1891)

    7e645c2

    chore(deps): update all dependencies (#1891)

    73553ac
  9. parthea
    added a commit that references this issue on Apr 1, 2026

    feat: Add concat pushdown for hybrid engine (#1891)

    16b1d02
  10. parthea
    added a commit that references this issue on Sep 8, 2026

    docs: migrate code from googleapis/python-bigquery (#18303)

    23f9a74
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: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

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.