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 @@ +