Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

monitoring_dashboard: DashboardFilter adding new fields into proto.

Đang mở
#17,951 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
62/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu với packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/types/dashboard_filter.py và so sánh DashboardFilter với tài liệu REST API được liên kết. Xác minh cách các trường hiện có được định nghĩa và cách các kiểu được tạo tự động được kiểm thử; được xem là hoàn tất khi valueType và stringArrayValue có thể được tạo, tuần tự hóa, phân tích cú pháp và cung cấp các giá trị STRING_ARRAY như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

api: monitoring priority: p3 type: feature request
Determine this is the right repository
  • I determined this is the correct repository in which to report this feature request.
Summary of the feature request

DashboardFilter only exposes label_key, template_variable, string_value, and filter_type:
https://github.com/googleapis/google-cloud-python/blob/google-cloud-monitoring-dashboards-v2.22.0/packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/types/dashboard_filter.py

However:

The REST API supports valueType (STRING / STRING_ARRAY) and stringArrayValue for value-only dashboard variables that accept multiple values — documented here: https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v1/projects.dashboards#DashboardFilter

This mismatch means the generated proto/client is behind the actual API surface, and there's no way to construct or parse a STRING_ARRAY-type dashboard filter/variable using the typed Python client — only via raw REST calls.

Desired code experience

file: dashboard_filter.py

class ValueType(proto.Enum):
        r"""The type of the filter value
        Values:
        VALUE_TYPE_UNSPECIFIED (0):
            Value type is unspecified
        STRING (1):
            String type
        STRING_ARRAY (2):
            String array type
        """

        VALUE_TYPE_UNSPECIFIED = 0
        STRING = 1
        STRING_ARRAY = 2

    value_type: ValueType = proto.Field(
        proto.ENUM,
        number=6,
        enum=ValueType,
    )
    stringArrayValue: StringArray = proto.Field(
        proto.MESSAGE,
        number=7,
        message=StringArray,
    )
Expected results

_e.g. dashboardFilter.stringArrayValue should return { values: [] }

API client name and version

google-cloud-monitoring-dashboards v2.22.0

Use case

This feature will allow users to retrieve stored values saved in Dashboard Settings -> Filters/Variables.

Additional context

No response

Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
2 ngày 11 giờ
Pull request đã merge (30 ngày)
142

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của googleapis/google-cloud-python

Tất cả issue của googleapis/google-cloud-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.