Skip to content

Commit

Permalink
Always output logging.googleapis.com/trace_sampled as true
Browse files Browse the repository at this point in the history
  • Loading branch information
aabmass committed Apr 19, 2024
1 parent aa1d23c commit 7f70d40
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<!-- TODO(#331): output logging.googleapis.com/trace_sampled as a boolean -->
<!-- TODO(#331): output logging.googleapis.com/trace_sampled based on trace_flags instead
of hardcoding as true -->
<!-- [START opentelemetry_instrumentation_setup_logging] -->
<!-- Format JSON logs for the Cloud Logging agent
https://cloud.google.com/logging/docs/structured-logging#special-payload-fields -->
Expand All @@ -37,6 +38,11 @@
format="JSON"
value='{"$resolver": "mdc", "key": "span_id"}'
/>
<EventTemplateAdditionalField
key="logging.googleapis.com/trace_sampled"
format="JSON"
value="true"
/>
</JsonTemplateLayout>
<!-- [END opentelemetry_instrumentation_setup_logging] -->
</Console>
Expand Down

0 comments on commit 7f70d40

Please sign in to comment.