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

Ruby on Rails logger - not recording all information #4510

Open
niciliketo opened this issue Dec 16, 2019 · 0 comments
Open

Ruby on Rails logger - not recording all information #4510

niciliketo opened this issue Dec 16, 2019 · 0 comments
Labels
api: logging Issues related to the Cloud Logging API. type: question Request for information or clarification. Not an issue.

Comments

@niciliketo
Copy link

Is your feature request related to a problem? Please describe.
When using GCP logging, with our production mode rails application, we only get one line of logging per http request. In the default rails log file, there will be multiple lines per request.
This is important, because much of the information is lost when only the first line is logged

Describe the solution you'd like
I would like to see all the data which Rails logs to be availalble in Google Logging.

Describe alternatives you've considered
We have a temporary workaround, which is to include the following in our Rails application.rb file. This allows us to see the request params.

      config
        .google_cloud
        .logging
        .labels = {
          'request_parameters' => lambda do |rack_env|
            hsh = rack_env['rack.request.form_hash']
            return 'none' unless hsh

            filterer.filter(hsh).to_s
          end
        }

The other alternative we have considered is not using centralised logging (but this isnt really practical).

Additional context
Ruby on Rails 5.2.4, Ruby 2.6.5

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Dec 17, 2019
@quartzmo quartzmo added api: logging Issues related to the Cloud Logging API. type: question Request for information or clarification. Not an issue. labels Dec 23, 2019
@yoshi-automation yoshi-automation removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants