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

Remove logging.request-log-template from resolvers config-observability CM #5717

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove logging.request-log-template from resolvers config-observabili…
…ty CM

Fixes #5707

When I copied `config/resolvers/config-observability.yaml` from resolution.git, I didn't notice that, unlike our existing `config/config-observability.yaml`, it contained a rather elaborate `logging.request-log-template` example. That example ends up causing problems with Helm, due to it containing syntax that Helm tries to resolve, like `{{.Request.Method}}`.

There's no real reason to have that example there, and we don't have it in the `tekton-pipelines` namespace's `config-observability`, so I'm removing it from `config/resolvers/config-observability.yaml` now.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
  • Loading branch information
abayer committed Nov 3, 2022
commit 133b701b4d3777b370926d63ddbc8d054e82bc2f
29 changes: 0 additions & 29 deletions config/resolvers/config-observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,6 @@ data:
# this example block and unindented to be in the data block
# to actually change the configuration.

# If non-empty, this enables queue proxy writing request logs to stdout.
# The value determines the shape of the request logs and it must be a valid go text/template.
# It is important to keep this as a single line. Multiple lines are parsed as separate entities
# by most collection agents and will split the request logs into multiple records.
#
# The following fields and functions are available to the template:
#
# Request: An http.Request (see https://golang.org/pkg/net/http/#Request)
# representing an HTTP request received by the server.
#
# Response:
# struct {
# Code int // HTTP status code (see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)
# Size int // An int representing the size of the response.
# Latency float64 // A float64 representing the latency of the response in seconds.
# }
#
# Revision:
# struct {
# Name string // Knative revision name
# Namespace string // Knative revision namespace
# Service string // Knative service name
# Configuration string // Knative configuration name
# PodName string // Name of the pod hosting the revision
# PodIP string // IP of the pod hosting the revision
# }
#
logging.request-log-template: '{"httpRequest": {"requestMethod": "{{.Request.Method}}", "requestUrl": "{{js .Request.RequestURI}}", "requestSize": "{{.Request.ContentLength}}", "status": {{.Response.Code}}, "responseSize": "{{.Response.Size}}", "userAgent": "{{js .Request.UserAgent}}", "remoteIp": "{{js .Request.RemoteAddr}}", "serverIp": "{{.Revision.PodIP}}", "referer": "{{js .Request.Referer}}", "latency": "{{.Response.Latency}}s", "protocol": "{{.Request.Proto}}"}, "traceId": "{{index .Request.Header "X-B3-Traceid"}}"}'

# metrics.backend-destination field specifies the system metrics destination.
# It supports either prometheus (the default) or stackdriver.
# Note: Using stackdriver will incur additional charges
Expand Down