-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add gRPC (inbound) #37
Conversation
Signed-off-by: Nghia Tran <[email protected]>
variable "grpc_service_name" { | ||
description = "Name of the GRPC service(s) to monitor" | ||
type = string | ||
default = "" |
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 don't think we should have a default here
title = "Incoming request latency" | ||
filter = concat(var.filter, [ | ||
"metric.type=\"prometheus.googleapis.com/grpc_server_handling_seconds/histogram\"", | ||
"metric.label.\"grpc_service\"=monitoring.regex.full_match(\"chainguard.datastore.*\")", |
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.
hmm chainguard.datastore
here seems wrong.
module "outbound_request_count" { | ||
source = "../../widgets/xy" | ||
title = "Request count" | ||
filter = concat(var.filter, [ | ||
"metric.type=\"prometheus.googleapis.com/grpc_server_handled_total/counter\"", | ||
"metric.label.grpc_service=monitoring.regex.full_match(\"${var.grpc_service_name}.*\")", | ||
]) | ||
group_by_fields = [ | ||
"metric.label.\"grpc_service\"", | ||
"metric.label.\"grpc_method\"", | ||
"metric.label.\"grpc_code\"" | ||
] | ||
primary_align = "ALIGN_RATE" | ||
primary_reduce = "REDUCE_NONE" | ||
secondary_align = "ALIGN_NONE" | ||
secondary_reduce = "REDUCE_SUM" | ||
} | ||
|
||
module "outbound_latency" { |
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.
These are unused?
Currently our gRPC metrics dp not have the right label
service_name
yet. That means we can't have outbound gRPC widgets (which would need to distinguish by caller i.e.service_name
).I'm using the
grpc_service_name
variable as a work around here. Will remove it and add outbound gRPC when the metric label is fixed.