Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

[General] Support more than ECS based services #29

Open
@achille-roussel

Description

@achille-roussel

Currently the only limitation for only supporting ECS services is the way the journal reader extracts metadata to guess the log groups and streams.
The log group is taken from the CONTAINER_TAG data and the log stream comes from CONTAINER_NAME.
This works fine with ECS services which have a unique container name but for some services ran in production that's not the case, but we still want to have meaningful log groups and streams.

One way to address this is making the journal reader get both information from the CONTAINER_TAG parameter by supporting a richer format for the value. For example something like CONTAINER_TAG=group:stream would allow the docker run command to use log tags with a format like:

docker run ... --log-opt tag="{{.Name}}:{{.ID}}" ...

That would use the container name (likely a predictable value) as log group and the container ID as log stream.

One of the advantages of this approach is it can be implemented in a backward compatible manner, if the CONTAINER_TAG doesn't contain a : the program can rely on looking for the log stream name in CONTAINER_NAME.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions