-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Intervalprocessor not dropping metrics #37905
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I think the actual expected result is that only one of the two points will be sent? |
Yes, sorry that is what I actually meant. Updated the description of the issue. |
Ok, I ran this locally both with and without the interval processor, and I see what you're saying. The interval processor is correctly aggregating. Note that the "extra" metric exports you're seeing are empty:
No resource metrics, no metrics, and no datapoints.
We can add a check to the end, where we skip calling |
I'm making a PR |
@RichieSams I don't think that is the issue. Note the timestamps of the two points that are printed by the debug exporter are very close: |
The main So the fix will need to be applied in both places |
It seems like you are still missing the core issue. Two data points that are within 0.2 seconds of each other are sent to the debug exporter with the interval set to 5s. Your fix still makes sense, but I don't think it is the core issue here. Or am I misunderstanding how the interval processor is supposed to work? |
I understand. Interval processor works as follows:
There are two problems:
Thus my PR attempts to fix both those issue by adding a hard check before we send things downstream: If the metric set is empty, don't bother sending it To answer your question directly:
Yes. But if you look at the data, you'll notice that the second one is completely empty.
|
I'm only looking at these two metrics (ignoring empty ones):
|
Component(s)
processor/interval
What happened?
Description
I am running contrib in a docker container, and ingesting metrics generated from telegen in another containers. I noticed that telegen is sending 2 metrics immediately on starting up the container, and I only want a single metric every 5 seconds. After adding the interval processor into my contrib config, both metrics were still being emitted at them same time.
Steps to Reproduce
Create a docker network
Start up contrib:
Start up telegen:
Expected Result
Only 1 metric is exported.
Actual Result
Metrics export in less than 1 second between each other.
Taking a look at the
Timestamp
in the log the metrics export at:2025-02-13 16:37:04.135426715
and2025-02-13 16:37:04.258232968
Collector version
v0.119.0
Environment information
Environment
Docker
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: