GoogleCloudPlatform / opentelemetry-operations-java

Apache License 2.0
71 stars 41 forks source link

Update quickstart sample to output correct severity strings #329

Closed aabmass closed 4 months ago

aabmass commented 4 months ago

Similar to https://github.com/GoogleCloudPlatform/golang-samples/pull/3999, this

manually tested by adding log statements and inspecting

{"timestamp":"2024-04-17T17:54:22.598Z","@version":"1","message":"warn - handle /multi request with subRequests=7","logger_name":"com.example.demo.MultiController","thread_name":"reactor-http-epoll-2","logging.googleapis.com/trace":"661e81d941fc0bc07c533136df6edd30","logging.googleapis.com/spanId":"f99ecaa4b31acc1a","logging.googleapis.com/trace_sampled":true,"severity":"WARNING"}
{"timestamp":"2024-04-17T17:54:22.598Z","@version":"1","message":"trace - handle /multi request with subRequests=7","logger_name":"com.example.demo.MultiController","thread_name":"reactor-http-epoll-2","logging.googleapis.com/trace":"661e81d941fc0bc07c533136df6edd30","logging.googleapis.com/spanId":"f99ecaa4b31acc1a","logging.googleapis.com/trace_sampled":true,"severity":"DEBUG"}
psx95 commented 4 months ago

The text "warn" and "trace" in the message field was manually added for debugging only, correct ?

,"message":"warn - handle /multi request with subRequests=7",
aabmass commented 4 months ago

Closing in favor of https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/330