Rhys Davies
01/16/2024, 7:04 AM{"run_id": "354f78d4-161d-4a72-a545-7e1807965a37", "state_id": "2024-01-16T065607--tap-name", "stdio": "stderr", "cmd_type": "extractor", "name": "tap-identity", "event": "time=2024-01-15 22:56:13 name=singer level=INFO message=METRIC: {\"type\": \"counter\", \"metric\": \"record_count\", \"value\": 27, \"tags\": {}}", "level": "info", "timestamp": "2024-01-16T06:56:13.224071Z"}
what I want is the below where METRIC is pulled out as an event_type and even is just a subobject of the json with objects inside of it (can't be bothered to get rid of all the string quotes):
{"run_id": "354f78d4-161d-4a72-a545-7e1807965a37", "state_id": "2024-01-16T065607--tap-name", "stdio": "stderr", "cmd_type": "extractor", "name": "tap-identity", "event": {"event_type": "METRIC", "time":"2024-01-15 22:56:13", "name": "singer", "level":"INFO" "message":{\"type\": \"counter\", \"metric\": \"record_count\", \"value\": 27, \"tags\": {}}}, "level": "info", "timestamp": "2024-01-16T06:56:13.224071Z"}
Rhys Davies
01/16/2024, 7:05 AMDenis I.
01/16/2024, 12:39 PMSINGER_SDK_LOG_CONFIG
LOGGING_CONF_FILE
So, that means you able to define log config path for tap/target itself. Unfortunately tap/target sources use different logging systems.
The easiest way I found is to standardise text logs output format for every tap/target via their log configs respectively and then parse produced logs somewhere downstream.Rhys Davies
01/16/2024, 1:07 PMRhys Davies
01/16/2024, 1:07 PMDenis I.
01/16/2024, 2:03 PMRhys Davies
01/16/2024, 7:32 PMSINGER_SDK_LOG_CONFIG
when I run meltano locally like so: SINGER_SDK_LOG_CONFIG=singer_sdk_logging.yaml meltano el tap-blah target-blah
- is that how you are doing it? It doesn’t error out, but it also doesn’t change anything about my logging confRhys Davies
01/16/2024, 7:33 PMdefault
formatter, otherwise you have to use the pre-built formatters that come with meltanoRhys Davies
01/16/2024, 7:34 PMDenis I.
01/17/2024, 8:22 AMEdgar Ramírez (Arch.dev)
01/20/2024, 12:34 AMEdgar Ramírez (Arch.dev)
01/20/2024, 12:35 AMRhys Davies
01/23/2024, 12:17 AMformatter
directive at all, because I wanted to send my logs via HTTP to logstash and mutate them there, but it just sends everything as a minified string and key=val.Rhys Davies
01/23/2024, 12:18 AMEdgar Ramírez (Arch.dev)
01/23/2024, 4:08 PM