Muhammad Imtiaz
02/17/2023, 6:11 AMI need help regarding parsing airbyte-worker logs using Fluentd. Logs are not in JSON format hence It requires lot of effort to parse them in fluentd.I've search a lil bit around how airbyte-worker produces logs, and it turns out that it primarily uses Logback (which is successor to Log4j) framework. I'm trying to find the logback.xml file which suppose to be present in
airbyte-config directory, but I couldn't find it there. I wanted to see how can I format these logs in JSON format by changing the xml file.
Since I've deployed airbyte in K8S, so I'm really really interested if the above logging format is parameterized and I want to change them from .env file. Though I've seen some of environment variables in .env file.
### LOGGING/MONITORING/TRACKING ###
TRACKING_STRATEGY=segment
JOB_ERROR_REPORTING_STRATEGY=logging
# Although not present as an env var, expected by Log4J configuration.
LOG_LEVEL=INFO
Thanks in advance!Muhammad Imtiaz
02/17/2023, 6:23 AMMuhammad Imtiaz
02/17/2023, 6:44 AM2023-02-17 06:25:07 INFO i.a.w.p.KubeProcessFactory(create):106 - source-google-sheets-read-9914-0-qpyyl stderrLocalPort = 9039
Log4j2Appender says: source-google-sheets-read-9914-0-qpyyl stderrLocalPort = 9039
2nd type of logs:
2023-02-17 06:25:17 destination > Starting a new buffer for stream tableprefixthatislongtotestiutifitsdsadsafsdgfsdfn_Automation (current state: 0 bytes in 0 buffers)
Log4j2Appender says: Starting a new buffer for stream tableprefixthatislongtotestiutifitsdsadsafsdgfsdfn_Automation (current state: 0 bytes in 0 buffers)
2023-02-17 06:25:18 destination > Airbyte message consumer: succeeded.
Log4j2Appender says: Airbyte message consumer: succeeded.
3rd type of logs:
2023-02-17 06:40:20 INFO i.a.w.t.s.a.StreamResetActivityImpl(deleteStreamResetRecordsForJob):37 - deleteStreamResetRecordsForJob was called for job 9915 with config type sync. Returning, as config type is not resetConnection.
Collecting content into /tmp/toBePublished7345983446289804496.tmp before uploading.
Publishing to S3 (bucket=cdpaas-airbyte-dev-logs; key=job-logging/workspace/9915/0/logs.log/20230217064043_airbyte-worker-68d7597d5f-7xnkr_2fe388fd80964e11830b586dfdfa5d8a):
What I want is the following:
logs: {ts:"<timestamp>", level:<log-level>, msg:<complte-msg>}Muhammad Imtiaz
02/20/2023, 5:44 PMDavin Chia (Airbyte)
02/20/2023, 5:54 PM