Skip to content
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

[Bug]: displayName is ignored on log-based metric #650

Closed
1 task done
shmuelarditi opened this issue Nov 5, 2024 · 1 comment
Closed
1 task done

[Bug]: displayName is ignored on log-based metric #650

shmuelarditi opened this issue Nov 5, 2024 · 1 comment
Labels
bug Something isn't working needs:triage

Comments

@shmuelarditi
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

logging.gcp.upbound.io/Metric/v1beta2

Resource MRs required to reproduce the bug

No response

Steps to Reproduce

Can be reproduced by deploying the example, or your own log based metric.

Deploy this:

apiVersion: logging.gcp.upbound.io/v1beta2
kind: Metric
metadata:
  annotations:
    meta.upbound.io/example-id: logging/v1beta2/metric
  labels:
    testing.upbound.io/example-name: logging_metric
  name: logging-metric
spec:
  forProvider:
    bucketOptions:
      linearBuckets:
        numFiniteBuckets: 3
        offset: 1
        width: 1
    filter: resource.type=gae_app AND severity>=ERROR
    labelExtractors:
      mass: EXTRACT(jsonPayload.request)
      sku: EXTRACT(jsonPayload.id)
    metricDescriptor:
      displayName: My metric
      labels:
      - description: amount of matter
        key: mass
        valueType: STRING
      - description: Identifying number for item
        key: sku
        valueType: INT64
      metricKind: DELTA
      unit: "1"
      valueType: DISTRIBUTION
    valueExtractor: EXTRACT(jsonPayload.request)

What happened?

When creating the log based metric in GCP, it uses the metadata.name field as the name in the UI
instead of the displayName..

Relevant Error Output Snippet

No response

Crossplane Version

1.17.0

Provider Version

1.8.3

Kubernetes Version

v1.30.5

Kubernetes Distribution

GKE

Additional Info

No response

@shmuelarditi shmuelarditi added bug Something isn't working needs:triage labels Nov 5, 2024
@mergenci
Copy link
Collaborator

mergenci commented Nov 5, 2024

Reported behavior is the expected behavior. According to Terraform documentation display_name is not the resource name or resource ID, but a description to help human workflows.

@mergenci mergenci closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage
Projects
None yet
Development

No branches or pull requests

2 participants