Skip to content
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

Requests/responses are missing from logs (go Dockerfile image) and documentation is not clear about setting logging levels #2371

Open
telecomprofi opened this issue Sep 6, 2022 · 5 comments
Assignees
Labels
needs docs Docs are required for this PR or Issue

Comments

@telecomprofi
Copy link

Hi, we are trying to enable higher logging level for our container-images (go version) of prebid-server but all we got in logs is
initial servers start at :8000 and :6060 ports (it is always last two messages in logs).
There is no single message in logs about http requests served. We do send requests like /openrtb2/auction and got 200 OK responses as expected, but these events are never in logs for some reason.

What we have tried is to increase verbosity of logs in Dockerfile by manipulating CMD arguments:

ENTRYPOINT ["/usr/local/bin/prebid-server"]
CMD ["-v", "1", " -logtostderr"]

to no avail.
If there is any additional setting to be configured to enable request/response logging, please advise
version we are testing it on is: v0.222.0

@SyntaxNode
Copy link
Contributor

There is currently no logging of individual requests or responses in PBS-Go. You can see high level metrics like request count, CPM, bid responses, and latency through either the InluxDB or Prometheus metrics.

Are you looking for individual request and response logging for debugging during development or for production monitoring?

@telecomprofi
Copy link
Author

We are trying to indentify the source of unexplained 4xx error spikes on production setup.
Thanks for pointing to metrics.
is this actual configs for metrics scraping: #1735 ?

@SyntaxNode
Copy link
Contributor

is this actual configs for metrics scraping: #1735 ?

It is. There is a more detailed guide for setting up Prometheus at https://github.com/prebid/prebid-server/blob/master/docs/developers/metrics-configuration.md.

We do not yet have a guide for what metrics are available. I can help you on this if you wish. All Prometheus metrics are defined here in code.

Prometheus collects metrics using a pull approach and is a popular choice. InfluxDB uses a push approach and has better resolution for time series like timeouts and duration - although we've found Prometheus to be fine in practice,

We are trying to indentify the source of unexplained 4xx error spikes on production setup.

Prebid Server does not support logging full requests and responses in production due to the large amount of data it would generate. Metrics are the way to go. If you want further logging I suggest writing an analytics adapter.

@bretg
Copy link
Contributor

bretg commented Sep 23, 2022

This seems to me like a job for the test file-based analytics adapter. https://github.com/prebid/prebid-server/blob/607fa0f2bbc2a229ebbf8e03751c71840ae85130/analytics/filesystem/file_module.go

I agree with @SyntaxNode that PBS should not be logging requests, but that's what analytics modules are for! That said, I'm not sure how clearly we've documented how to set that up.

@bretg
Copy link
Contributor

bretg commented Sep 23, 2022

I'm proposing that this issue is a request for docs -- either metrics, analytics adapters, or both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs docs Docs are required for this PR or Issue
Projects
Status: Ready for Dev
Development

No branches or pull requests

3 participants