From 3b7dd58424bcd12117b86cd25976a6daf4cb2f57 Mon Sep 17 00:00:00 2001 From: bvn13 Date: Tue, 17 Sep 2024 20:04:10 +0300 Subject: [PATCH] update for stacktrace --- vector.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/vector.yaml b/vector.yaml index 12c0a71..f490ae6 100644 --- a/vector.yaml +++ b/vector.yaml @@ -5,7 +5,7 @@ data_dir: "/var/lib/vector" # Enable and try it out with the `vector top` command # NOTE: this is _enabled_ for helm chart deployments, see:.apps://github.com/vectordotdev/helm-charts/blob/develop/charts/vector/examples/datadog-values.yaml#L78-L81 api: - enabled: false + enabled: true # address = "127.0.0.1:8686" sources: @@ -18,7 +18,7 @@ transforms: inputs: - from_stdin source: >- - l = . + #l = . #log("!!! 1", level:"info", rate_limit_secs:0) @@ -160,12 +160,20 @@ transforms: } else { "none" } - + #log("!!! 2.1.10: {{m}}", level:"info", rate_limit_secs:0) + .app.attributes.stack_trace = if (exists(msg.stack_trace)) { + msg.stack_trace + } else { + "" + } + + #log("!!! 2.1.11: {{m}}", level:"info", rate_limit_secs:0) + .app.attributes.hostname = "$HOSTNAME" - #log("!!! 2.1.11: {{m}}", level:"info", rate_limit_secs:0) + #log("!!! 2.1.12: {{m}}", level:"info", rate_limit_secs:0) .app.attributes.app_name = "${APP_NAME?Specify env.APP_NAME}" } else {