Skip to content

Commit

Permalink
Render 'identity.authenticate' meter name with correct status
Browse files Browse the repository at this point in the history
jsonpath-rw-ext uses operator.add for "+" and operator.sub for "-". operator.add can do string concatenation, but operator.sub cannot do string subtraction. so the original hack does not work, perhaps we should use sub to get an empty string.

Closes-Bug: 2032882

Change-Id: I9183a4a9f9cc345d8b4508bd7de1afa0eccd89d1
(cherry picked from commit 144827d304bbd7ffc9aa8165a4725d6fd00d73cc)
(cherry picked from commit a0c5638)
  • Loading branch information
douyuan authored and yadneshk committed Aug 24, 2023
1 parent 5968c82 commit c8c44a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ceilometer/data/meters.d/meters.yaml
Expand Up @@ -383,7 +383,7 @@ metric:

# Identity
# NOTE(gordc): hack because jsonpath-rw-ext can't concat starting with string.
- name: $.payload.outcome - $.payload.outcome + 'identity.authenticate.' + $.payload.outcome
- name: $.payload.outcome.`sub(/.*/, )` + 'identity.authenticate.' + $.payload.outcome
type: 'delta'
unit: 'user'
volume: 1
Expand Down

0 comments on commit c8c44a5

Please sign in to comment.