From e7dc0909dc2e988cd14651140342a17767529cf1 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Thu, 18 Apr 2024 14:57:34 +0000 Subject: [PATCH] undo one collector config change, add issue ID to TODO --- .../otel-collector-config.yaml | 12 +++++------- .../src/main/resources/log4j2.xml | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/instrumentation-quickstart/otel-collector-config.yaml b/examples/instrumentation-quickstart/otel-collector-config.yaml index bdb7ad12..513c8a0b 100644 --- a/examples/instrumentation-quickstart/otel-collector-config.yaml +++ b/examples/instrumentation-quickstart/otel-collector-config.yaml @@ -48,13 +48,11 @@ receivers: fatal3: alert fatal4: emergency - # TODO(aaronabbott): uncomment once the log4j2 config is correctly outputing the - # logging.googleapis.com/trace_sampled value - ## set trace_flags to SAMPLED if GCP attribute is set to true - # - type: add - # field: body.trace_flags - # value: "01" - # if: body["logging.googleapis.com/trace_sampled"] == true + # set trace_flags to SAMPLED if GCP attribute is set to true + - type: add + field: body.trace_flags + value: "01" + if: body["logging.googleapis.com/trace_sampled"] == true # parse the trace context fields from GCP attributes - type: regex_parser diff --git a/examples/instrumentation-quickstart/src/main/resources/log4j2.xml b/examples/instrumentation-quickstart/src/main/resources/log4j2.xml index cc5cfad8..5a8d68ae 100644 --- a/examples/instrumentation-quickstart/src/main/resources/log4j2.xml +++ b/examples/instrumentation-quickstart/src/main/resources/log4j2.xml @@ -17,6 +17,7 @@ +