Skip to content

Commit

Permalink
simplify logging in instrumentation quickstart (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Feb 28, 2024
1 parent d1f8b66 commit a96d45f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/instrumentation-quickstart/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ services:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317
- OTEL_SERVICE_NAME=otel-quickstart-spring-boot
- OTEL_METRIC_EXPORT_INTERVAL=5000
- GOOGLE_CLOUD_PROJECT
volumes:
- logs:/var/log:rw
depends_on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ receivers:
- type: regex_parser
parse_from: body["logging.googleapis.com/trace"]
parse_to: body
regex: projects/.+/traces/(?P<trace_id>.*)
regex: (?P<trace_id>.*)
trace:
span_id:
parse_from: body["logging.googleapis.com/spanId"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<provider class="net.logstash.logback.composite.loggingevent.LoggingEventPatternJsonProvider">
<pattern>
{
"logging.googleapis.com/trace": "projects/${GOOGLE_CLOUD_PROJECT}/traces/%mdc{trace_id}",
"logging.googleapis.com/trace": "%mdc{trace_id}",
"logging.googleapis.com/spanId": "%mdc{span_id}",
"logging.googleapis.com/trace_sampled": "#asBoolean{%replace(%mdc{trace_flags}){'01', 'true'}}"
}
Expand Down

0 comments on commit a96d45f

Please sign in to comment.