You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing [email protected] where the issue will be triaged appropriately.
Title: Metrics for golang filter don't clean when filer remove from LDS configurations
Description:
What issue is being seen? Describe what should be happening instead of
the bug, for example: Envoy should not crash, the expected value isn't
returned, etc.
Have listener as metrics name, e.g. "listener.0.0.0.0_19001.opa_total_requests: 0".
Will be removed and reset along with filter configurations.
But the real behavior is:
The metrics name is just what we defined in the function: "opa_total_requests: 0"
The metrics is always there even when I remove the go filter, when I added it back, the counter number is still the old value which not being reset.
This seems to me is a potential bug that causing memory leak.
Repro steps:
Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.
I'm using go filter via httn, the way I used is described in this PR: mosn/htnn#827
After plugin built, what I'm doing is:
Update LDS with new golang filter that registered metrics via ConfigCallback.
Request the filter related LDS and corresponding path to generate metrics.
Check ":/status" to see metrics
Remove the golang filter from LDS.
Check the metrics that we can see the metrics is still there.
Add golang filter back, requesting, we were able to see the metrics are increasing again based on the old value.
Note: The Envoy_collect tool
gathers a tarball with debug logs, config and the following admin
endpoints: /stats, /clusters and /server_info. Please note if there are
privacy concerns, sanitize the data prior to sharing the tarball/pasting.
Admin and Stats Output:
Include the admin output for the following endpoints: /stats,
/clusters, /routes, /server_info. For more information, refer to the admin endpoint documentation.
Note: If there are privacy concerns, sanitize the data prior to
sharing.
Config:
Include the config used to configure Envoy.
Logs:
Include the access logs and the Envoy logs.
Note: If there are privacy concerns, sanitize the data prior to
sharing.
wonderflow
changed the title
Metrics for golang filter don't clean when filer remove from LDS configurations
Metrics for golang filter don't clean when filer removed from LDS configurations
Dec 24, 2024
Have listener as metrics name, e.g. "listener.0.0.0.0_19001.opa_total_requests: 0".
i also think it is more reasonable to inherit the stat_prefix, and i will submit a PR to support it.
Will be removed and reset along with filter configurations.
AFAIK, the metric is just removed with LDS update when you remove the golang filter, and there will be a new metric when you bring the filter back, maybe you can try to wait for several time like 30s or more to ensure the old golang filter config is deleted by envoy. cc @wonderflow
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing
[email protected] where the issue will be triaged appropriately.
Title: Metrics for golang filter don't clean when filer remove from LDS configurations
Description:
When I'm implementing golang filters with metrics, I found the metrics defined under LDS http_connection_manager via ConfigCallback (https://github.com/envoyproxy/envoy/blob/main/contrib/golang/common/go/api/filter.go#L312 ) is a global metrics.
I expect it to:
But the real behavior is:
This seems to me is a potential bug that causing memory leak.
Repro steps:
I'm using go filter via httn, the way I used is described in this PR: mosn/htnn#827
After plugin built, what I'm doing is:
Admin and Stats Output:
Config:
Logs:
Call Stack:
The text was updated successfully, but these errors were encountered: