Closed gautam-nutalapati closed 2 years ago
collector 0.16.0
2022-02-07T15:46:42.075Z info filterprocessor@v0.43.0/
Something doesn't add up :-)
In any case, I'm pinging the code owner: cc @boostchicken
Thanks for looking, Nice catch.. 0.16.0 was from https://github.com/aws-observability/aws-otel-collector
I reproduced it with collector version is 0.43.0.
Update: I created a opentelemetry-demo-app to reproduce the issue. Run docker-compose up
and hit http://localhost:8899/metrics
which shows http_client_duration
metric, which should be filtered based on config in configs/otel/otel-config.yaml
@gautam-nutalapati can you try this on the latest versions and confirm if this is still an issue.
I tried the latest version, and it has been fixed 🎉 Thank you for the fix!!
I just tried adding a similar filter yet the metrics are not filtered. Could there be a regression?
{
"caller": "filterprocessor@v0.75.0/metrics.go:101",
"exclude expressions": [],
"exclude match_type": "regexp",
"exclude metric names": [
"http_.*"
],
"exclude metrics with resource attributes": null,
"include expressions": [],
"include match_type": "",
"include metric names": [],
"include metrics with resource attributes": null,
"kind": "processor",
"level": "info",
"msg": "Metric filter configured",
"name": "filter/metrics",
"pipeline": "metrics",
"ts": 1681808701.6006052
}
processors:
filter/metrics:
metrics:
exclude:
match_type: regexp
metric_names:
- http_.*
service:
extensions: [health_check, memory_ballast]
pipelines:
metrics:
receivers: [otlp, opencensus]
processors: [memory_limiter, filter/metrics, batch/metrics]
exporters: [prometheus, logging]
curl -s 'http://localhost:8889/metrics' | grep -E '^http_.*' | wc -l
216
Describe the bug I would like to omit http metrics generated by auto-instrumentation java agent. I am using filter to omit these metric names being pushed to prometheus. HTTP metrics generated by java agent are not filtered as expected.
Steps to reproduce
What did you expect to see?
api_
andhttp_
What did you see instead? I see below metrics (Removed buckets to reduce clutter)
Without this filter I see below metrics (note that
api_latency
is custom metric I added which was successfully filtered in above output).What version did you use? Version: collector
0.16.00.43.0 java agent 1.10.1What config did you use? Config:
Environment OS: MacOS Monterey 12.0.1 Compiler N/A
Additional context If filter processor intentionally avoids filtering auto-instrumented http metrics, then this issue is irrelevant. Related to https://github.com/open-telemetry/opentelemetry-collector/issues/2310
Filter startup logs: