open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.09k stars 2.38k forks source link

Some data couldn't be associated with k8s metadata when the agent was just started. #32556

Open h0cheung opened 7 months ago

h0cheung commented 7 months ago

Component(s)

processor/k8sattributes

What happened?

Description

When the agent is first started, the k8s metadata has not been fully synchronized by the k8sattributes processor. If any data passes through the component at this point, they will not be associated with metadata.

Steps to Reproduce

Expected Result

All data should be associated with k8s metadata.

Actual Result

There may be a little data that hasn't be assosicated.

Collector version

v0.95.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

I think it's the best solution to wait for an initial sync when starting k8sattributes processor.

Or we can block data util an initial sync is finished.

github-actions[bot] commented 7 months ago

Pinging code owners:

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

TylerHelmuth commented 6 months ago

I wonder if we could add something to the processor's start function that waits for the kube client connections to be made.

h0cheung commented 6 months ago

I wonder if we could add something to the processor's start function that waits for the kube client connections to be made.

I think it's not enough to only wait for connections. If the connections are just made but metadata hasn't been synced yet, data won't be associated still. We need to wait for an initial complete sync like the implementation in #32622.

github-actions[bot] commented 3 months ago

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[bot] commented 1 month ago

This issue has been closed as inactive because it has been stale for 120 days with no activity.

orloffv commented 1 month ago

Oh noo