Page MenuHomeSoftware Heritage

Make container-based services' push their log to swh log infrastructure
Closed, MigratedEdits Locked

Description

Current static systemd services are currently configured with Environment=SWH_LOG_TARGET=journal.
Which when routed to the journald handler adds some custom swh prefixed metadata [1].

New container-based service do not use systemd.
We need to find a solution which allows to behave similarly.

[1] P1448

Event Timeline

ardumont triaged this task as High priority.Sep 9 2022, 5:21 PM
ardumont created this task.

Sample of current static field in logs (target) [1] vs current dynamic (to adapt) [2]
[1]

| journald.custom.swh_logging_args_0 | 66                                       |
| journald.custom.swh_logging_args_1 | https://github.com/WohlSoft/LunaLua      |
| journald.custom.swh_num_refs       | 66                                       |
| journald.custom.swh_repo           | https://github.com/WohlSoft/LunaLua      |
| journald.custom.swh_task_id        | c46472e7-8e36-4e97-8782-42d2a37b9533     |
| journald.custom.swh_task_kwarg_url | https://github.com/WohlSoft/LunaLua      |
| journald.custom.swh_task_name      | swh.loader.git.tasks.UpdateGitRepository |
| journald.custom.swh_type           | git_repo_list_refs                       |

[2]

| journald.custom.image_name      | softwareheritage/loader_package@sha256:a3ebbe320a9534ea969f15d90ac1166e70eb0a465f614272f8048967880fdbc9 |
| journald.custom.selinux_context | unconfined                                                                                              |