Open grioda01 opened 1 week ago
Pinging code owners:
processor/geoip: @andrzej-stencel @michalpristas @rogercoll
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Note that I enabled the retry_on_failure parameter of the filelog receiver, that is when I got the error above. Prior to that, I was getting another message, though still same type of geo ip error with dropped logs
@grioda01 Thanks for raising this, I think we could tackle this issue by allowing the user to specify the error level: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/35069
Thank you @rogercoll For now I found a workaround by creating a transform processor, where I detect the presence of an internal ip as the value of the source.address attributes field and replace it with one of the companies real external IP
Component(s)
processor/geoip
What happened?
Description
Apparently, when the source.address is present and contains an IP that is not in the database (such as an internal network IP) an error is issued saying that log entry is dropped
Steps to Reproduce
Kubernetes operator installation with collector in daemonset mode, receiver is filelog and processor is Geoip in alpha.
Expected Result
No geo location field should be populated and the log entry should not be dropped
Actual Result
Log entry is dropped and an error is issued in the opentelemetry collector pod log 2024-09-06T08:34:02.523Z error consumerretry/logs.go:87 Max elapsed time expired. Dropping data. {"kind": "receiver", "name": "filelog", "data_type": "logs", "error": "no geo IP metadata found", "dropped_items": 100} github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/consumerretry.(logsConsumer).ConsumeLogs github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal@v0.108.0/consumerretry/logs.go:87 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter.(receiver).consumerLoop github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza@v0.108.0/adapter/receiver.go:126
Collector version
v0.108.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
Additional context
It works well if the IP is found in the maxmindDB. It's almost like the fact that the IP is not found creates a delay so long that the receiver times out and drops logs