Skip to content

Conversation

brunobat
Copy link
Contributor

@brunobat brunobat commented Oct 1, 2025

Fixes #50319

A new JSON format option was created:

quarkus.log.file.json.log-format=gcp

When this is used, tracing data is flatten and copied to the top level according to these semantics: https://cloud.google.com/logging/docs/structured-logging#structured_logging_special_fields
The logging level s also changed to severity.

This is an output example:

{
  "timestamp": "2025-10-02T18:29:25.342877813+01:00",
  "sequence": 6092,
  "loggerClassName": "org.jboss.logging.Logger",
  "loggerName": "io.quarkus.it.logging.json.GreetingResource",
  "severity": "INFO",
  "message": "Hello to \"Quarkus\"",
  "threadName": "executor-thread-1",
  "threadId": 123,
  "mdc": {
    "spanId": "0dabdb19210281f8",
    "traceId": "7b5b422a3756128859616cd60feb7e80",
    "sampled": "true"
  },
  "ndc": "",
  "hostName": "xxxxxxxxxxxxxxxxxxxx",
  "processName": "xxxxxxxxxxxxxx.sdkman/candidates/java/21.0.8-tem/bin/java",
  "processId": 79852,
  "spanId": "0dabdb19210281f8",
  "trace": "projects/quarkus-integration-test-logging-json/traces/7b5b422a3756128859616cd60feb7e80",
  "traceSampled": "true"
}

Documentation for JSON logging was also improved.
I chose not to exclude the MDC field because it might contain other relevant data.

@brunobat brunobat requested a review from gsmet October 1, 2025 12:23
@quarkus-bot quarkus-bot bot added area/docstyle issues related for manual docstyle review area/documentation area/logging labels Oct 1, 2025

This comment has been minimized.

This comment has been minimized.

@brunobat brunobat marked this pull request as draft October 2, 2025 06:32
@brunobat brunobat marked this pull request as ready for review October 2, 2025 17:20

This comment has been minimized.

Copy link

quarkus-bot bot commented Oct 2, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 220e271.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

You can consult the Develocity build scans.

Copy link

quarkus-bot bot commented Oct 2, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 220e271.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Copy link

github-actions bot commented Oct 2, 2025

🎊 PR Preview b0e9e91 has been successfully built and deployed to https://quarkus-pr-main-50368-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docstyle issues related for manual docstyle review area/documentation area/logging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Group logs by request - GCP
1 participant