-
Notifications
You must be signed in to change notification settings - Fork 20
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
MGDSTRM-10557: Expose strimzi oauth metrics prometheus in order to assist investigating a slow authentication issue #910
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -305,3 +305,64 @@ data: | |
pattern: >- | ||
kafka.server<type=KafkaServer, name=BrokerState><>Value: (\d+) | ||
type: GAUGE | ||
# OAuth Metrics - from https://raw.githubusercontent.com/strimzi/strimzi-kafka-oauth/main/testsuite/docker/kafka/config/metrics-config.yml | ||
- pattern: "strimzi.oauth<type=(.+), context=(.+), kind=(.+), host=\"(.+)\", path=\"(.+)\", (.+)=(.+), (.+)=(.+), (.+)=(.+)><>(count|totalTimeMs):" | ||
name: "strimzi_oauth_$1_$12" | ||
type: COUNTER | ||
labels: | ||
context: "$2" | ||
kind: "$3" | ||
host: "$4" | ||
path: "$5" | ||
"$6": "$7" | ||
"$8": "$9" | ||
"$10": "$11" | ||
- pattern: "strimzi.oauth<type=(.+), context=(.+), kind=(.+), host=\"(.+)\", path=\"(.+)\", (.+)=(.+), (.+)=(.+)><>(count|totalTimeMs):" | ||
name: "strimzi_oauth_$1_$10" | ||
type: COUNTER | ||
labels: | ||
context: "$2" | ||
kind: "$3" | ||
host: "$4" | ||
path: "$5" | ||
"$6": "$7" | ||
"$8": "$9" | ||
- pattern: "strimzi.oauth<type=(.+), context=(.+), kind=(.+), host=\"(.+)\", path=\"(.+)\", (.+)=(.+)><>(count|totalTimeMs):" | ||
name: "strimzi_oauth_$1_$8" | ||
type: COUNTER | ||
labels: | ||
context: "$2" | ||
kind: "$3" | ||
host: "$4" | ||
path: "$5" | ||
"$6": "$7" | ||
Comment on lines
+309
to
+338
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if these three entries are redundant? The 3 patterns below look like more generalised forms that would also cover these cases? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, they won't be redundant. They are matching different forms. The number of groups is different in each case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had counted the number of groups in each case, and they appeared to be the same is what I meant. 🙂 It seems like the actual difference is that the above 3 entries are counters, while the below 3 are gauges. Here's a diff tool view with the above on the left, and the below on the right. Lines with differences are those in blue, with the actual differences on those lines highlighted in a slightly lighter blue: |
||
- pattern: "strimzi.oauth<type=(.+), context=(.+), kind=(.+), host=\"(.+)\", path=\"(.+)\", (.+)=(.+), (.+)=(.+), (.+)=(.+)><>(.+):" | ||
name: "strimzi_oauth_$1_$12" | ||
type: GAUGE | ||
labels: | ||
context: "$2" | ||
kind: "$3" | ||
host: "$4" | ||
path: "$5" | ||
"$6": "$7" | ||
"$8": "$9" | ||
"$10": "$11" | ||
- pattern: "strimzi.oauth<type=(.+), context=(.+), kind=(.+), host=\"(.+)\", path=\"(.+)\", (.+)=(.+), (.+)=(.+)><>(.+):" | ||
name: "strimzi_oauth_$1_$10" | ||
type: GAUGE | ||
labels: | ||
context: "$2" | ||
kind: "$3" | ||
host: "$4" | ||
path: "$5" | ||
"$6": "$7" | ||
"$8": "$9" | ||
- pattern: "strimzi.oauth<type=(.+), context=(.+), kind=(.+), host=\"(.+)\", path=\"(.+)\", (.+)=(.+)><>(.+):" | ||
name: "strimzi_oauth_$1_$8" | ||
type: GAUGE | ||
labels: | ||
context: "$2" | ||
kind: "$3" | ||
host: "$4" | ||
path: "$5" | ||
"$6": "$7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried approaches introducing an env var type parameter to
OperandOverride<E>
) etc but the resulting codeapplyEnvironmentTo
in less obvious that this list conversion in the method.