-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
prometheus receiver: more info about scrape error #6900
Comments
See open-telemetry/opentelemetry-collector#2364 (comment). Scraping happens in the prometheus server code, and is a debug log line. You can enable debug logging with |
@dashpole Thank you! |
Hi. I am a green hand in this project . I want to ask where to add the debug logging flag |
@jinxin-fu usually, you specify arguments after image name, if you use docker. For exanple, $ docker run -p 4317:4317 -it --rm -v $(pwd)/otel:/otel --name otel \
otel/opentelemetry-collector-contrib:0.42.0 --config /otel/config.yaml --log-level=DEBUG However, it looks like From now on you should use config file instead. Use receivers:
otlp:
protocols:
grpc:
http:
processors:
batch:
exporters:
jaeger:
endpoint: "host.docker.internal:14250"
tls:
insecure: true
service:
telemetry:
logs:
level: DEBUG
extensions: []
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger] |
Thanks, I have change the otel-collector-conf with and works normally:
|
Is your feature request related to a problem? Please describe.
Currently, prometheusreceiver in case of error reports the following in the logs:
It would be awesome to have more information about what really went wrong for debugging purposes.
Describe the solution you'd like
Perhaps it's possible to log http request errors. For example,
socket hang up
,timeout exceeded
orresponse code 503
.The text was updated successfully, but these errors were encountered: