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

How can I modify the logging format of REST API for StackDriver and BigQuery? #557

Closed
yu-iskw opened this issue May 8, 2019 · 6 comments

Comments

@yu-iskw
Copy link

yu-iskw commented May 8, 2019

Motivation

I would like to collect logs of RESTful APIs with seldon in StackDriver and store logs to BigQeury from Stackdriver. In order to query logs on BigQuery, the logging format have to be JSON.

Question

How can we custom the logging format of seldon applications to fit to StackDriver and BigQuery?

@ukclivecox
Copy link
Contributor

The response from HTTP requests in in JSON format so you could add logging at that point.
For a more integrated solution we are looking at adding request logging connectors to Seldon so would be interested in your detailed requirements in this area.

@yu-iskw
Copy link
Author

yu-iskw commented May 15, 2019

Thank you for the comment. It means, we can collect the logs to stackdriver by adding logs in model, as long as we define the format for seldon, right?

@ukclivecox
Copy link
Contributor

I think the ideal solution would be a general payload logging solution probably sent from the service orchestrator. You are free to extend your models to add StackDriver logs in each component.

@ukclivecox ukclivecox added this to the 0.2.x milestone May 24, 2019
@ukclivecox ukclivecox modified the milestones: 0.2.x, 0.3.x Jun 3, 2019
@ryandawsonuk
Copy link
Contributor

We're addressing this through #616

The initial integration is EFK but fluentd can be used to send to different backends and the request-logger piece in the example is pluggable so can be used to send to a backend directly (fluentd so fluentd is optional).

Alternatively you can log directly in your model implementation. Using a pluggable logger would have the advantage of being async, so as to minimise the impact on the time of your main request flow. But if that's not a concern you could certainly do it in the model. If doing it in the model you might want to use the predict_raw method instead of predict, so as to get access to the full SeldonMessage.

@axsaucedo
Copy link
Contributor

@ryandawsonuk now #616 is merged can we close this?

@yu-iskw
Copy link
Author

yu-iskw commented Jul 19, 2019

Why not! Thank you.

@yu-iskw yu-iskw closed this as completed Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants