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

Add gRPC (inbound) #37

Merged
merged 2 commits into from
Dec 22, 2023
Merged

Add gRPC (inbound) #37

merged 2 commits into from
Dec 22, 2023

Conversation

tcnghia
Copy link
Collaborator

@tcnghia tcnghia commented Dec 22, 2023

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.

@tcnghia tcnghia requested review from imjasonh and mattmoor December 22, 2023 23:22
@imjasonh imjasonh merged commit eb8507f into chainguard-dev:main Dec 22, 2023
21 checks passed
variable "grpc_service_name" {
description = "Name of the GRPC service(s) to monitor"
type = string
default = ""
Copy link
Member

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.*\")",
Copy link
Member

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.

Comment on lines +39 to +57
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" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are unused?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants