Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker event receiver #29096

Open
evanzhang87 opened this issue Nov 10, 2023 · 9 comments
Open

add docker event receiver #29096

evanzhang87 opened this issue Nov 10, 2023 · 9 comments
Labels
enhancement New feature or request never stale Issues marked with this label will be never staled and automatically removed receiver/dockerstats

Comments

@evanzhang87
Copy link

evanzhang87 commented Nov 10, 2023

Component(s)

No response

Is your feature request related to a problem? Please describe.

I want to get container events

Describe the solution you'd like

I'd like to subscribe some docker event, such as container create/stop oom

Describe alternatives you've considered

New a docker client, and subscribe docker event

client, _ := docker.NewClientWithOpts(docker.WithHost(opt.Endpoint), docker.WithVersion(version))
msgC, _ := client.Events(context.TODO(), types.EventsOptions{})

for event := range msgC {
// TODO
}

Additional context

No response

@evanzhang87 evanzhang87 added enhancement New feature or request needs triage New item requiring triage labels Nov 10, 2023
@atoulme
Copy link
Contributor

atoulme commented Nov 10, 2023

Please look at https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/dockerstatsreceiver
What do you want to do with those events? Treat them as logs? Traces? Metrics? If logs, what format would they take?

@crobert-1 crobert-1 added the question Further information is requested label Nov 10, 2023
@evanzhang87
Copy link
Author

What do you want to do with those events?

I want to know about when these events happened, I will make a statistics on how many containers are created or destroyed, or send a alert about oom event.

what format would they take?

It should be treated as log, for I need to know the container name or some other meta infomation like hostname, ip, etc. It may cause High Cardinality problem if I use metrics. And the meaning of the event is also closer to the log, so it' better to be treated as log I think.

Copy link
Contributor

Pinging code owners for receiver/dockerstats: @rmfitzpatrick @jamesmoessis. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@atoulme
Copy link
Contributor

atoulme commented Nov 29, 2023

Pinging dockerstats receiver codeowners in case they have an idea on the best path here.

@rmfitzpatrick
Copy link
Contributor

I think this would be useful functionality to add to the docker stats receiver as a logs receiver. Its core docker client already watches for a subset of container events in determining from which ones to pull stats. Since the OTel notion of events is in development but has effectively been formalized to use log records, it's possible that we'd be able to collaborate on future semantic conventions for the platform.

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/event-api.md
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md

@crobert-1 crobert-1 removed question Further information is requested needs triage New item requiring triage labels Dec 8, 2023
@crobert-1
Copy link
Member

Removing needs triage based on @rmfitzpatrick's (code owner of the dockerstats receiver) comments. This issue can be considered an enhancement request to add log support to the receiver.

Copy link
Contributor

github-actions bot commented Feb 7, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

github-actions bot commented Apr 8, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Apr 8, 2024
@crobert-1 crobert-1 removed the Stale label Apr 8, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jun 10, 2024
@crobert-1 crobert-1 added never stale Issues marked with this label will be never staled and automatically removed and removed Stale labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request never stale Issues marked with this label will be never staled and automatically removed receiver/dockerstats
Projects
None yet
Development

No branches or pull requests

4 participants