Your Cloud Run application writes unstructured logs as text strings to Cloud Logging. You want to convert the unstructured logs to JSON-based structured logs. What should you do?
A.
Modify the application to use Cloud Logging software development kit (SDK), and send log entries with a jsonPayload field.
B.
Install a Fluent Bit sidecar container, and use a JSON parser.
C.
Install the log agent in the Cloud Run container image, and use the log agent to forward logs to Cloud Logging.
D.
Configure the log agent to convert log text payload to JSON payload.
Vote option D.
In this context, if you have unstructured logs written as text strings and want to convert them to JSON-based structured logs, you would typically use a log agent or parser to transform the log entries. The log agent is configured to recognize the structure of the logs and convert the text payload into a JSON payload.
The log agent would be responsible for parsing the unstructured logs and converting them into a structured format. This process involves specifying how to extract relevant information from the text payload and organize it into a JSON structure. It's important to note that this approach assumes you have a log agent or parser that supports the transformation of unstructured logs to structured logs.
The Cloud Logging agent can be configured to convert log text payload to JSON payload by setting the process.payload parameter to json. This will cause the agent to parse the log text and convert it to a JSON object before forwarding it to Cloud Logging.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
mohan999
1 week, 6 days agomohan999
1 week, 6 days ago6a8c7ad
3 months, 1 week agoRosek93
6 months agoalpha_canary
9 months, 1 week agoxhilmi
11 months, 2 weeks agonqthien041292
11 months, 3 weeks agomshafa
1 year agoMar_Mar
1 year ago