generated from SAP/repository-template
    
        
        - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
Labels
area/providerAll Provider related issuesAll Provider related issuesgood first issueNew to this repo? This is a good place to startNew to this repo? This is a good place to startkind/bug
Description
When trying to project the status.conditions field from a custom resource (like a Crossplane Subaccount), the operator fails with the following error:
failed to record metric value(s): errors during metric recording: [projection error for readyStatus: %!w(<nil>)]
Even when accessing a specific field like:
fieldPath: "status.conditions[0].status"
Expected behavior
Support projections that return values from:
- 
JSON arrays with index notation (e.g.,
status.conditions[0].status) - 
Filtered JSONPath (e.g.,
status.conditions[?(@.type=='Ready')].status) 
Reproduction
Here is an example Metric resource that causes the issue:
apiVersion: metrics.openmcp.cloud/v1alpha1
kind: Metric
metadata:
  name: test-subaccount
spec:
  name: test-subaccount
  interval: 1m
  target:
    kind: Subaccount
    group: account.btp.sap.crossplane.io
    version: v1alpha1
  projections:
    - name: readyStatus
      fieldPath: "status.conditions[0].status"Metadata
Metadata
Assignees
Labels
area/providerAll Provider related issuesAll Provider related issuesgood first issueNew to this repo? This is a good place to startNew to this repo? This is a good place to startkind/bug