Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does:
add tenantId to each log lines
Using MDC, the Quarkus takes care of propagating the properties that we set from the event loop threads to the worker threads.
sample log
{"timestamp":"2024-01-18T09:48:36.366727-08:00","sequence":3334,"loggerClassName":"org.jboss.logging.Logger","loggerName":"io.stargate.sgv2.jsonapi.service.cqldriver.executor.QueryExecutor","level":"ERROR","message":"cql SELECT key, tx_id, doc_json FROM purchase_database.my_vsearch WHERE array_contains CONTAINS ? LIMIT 2147483647 value [address N123]","threadName":"vert.x-eventloop-thread-2","threadId":196,"mdc":{"tenantId":"unknown","spanId":"45c8ddd73498b50c","traceId":"d8f7ea0b41daa7200b8fb3ba53b52461","sampled":"true"},"ndc":"","hostName":"yuqi-du-x66h1xw5m2","processName":"sgv2-jsonapi-dev.jar","processId":16883}
Which issue(s) this PR fixes:
Fixes jira https://datastax.jira.com/jira/software/c/projects/C2/boards/525?search=line&selectedIssue=C2-3195
Checklist