Skip to content

Set referrer to empty string if it doesn't exist #336

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

Merged
merged 1 commit into from
May 16, 2022

Conversation

kuzi-moto
Copy link
Contributor

Description:

This is a small patch to fix issue #335. Adds a check to see if the type for hit.referrer is None, and sets it to an empty string.

This condition happens when importing using regex format with Traefik JSON logs. Traefik omits the referrer key if the value is missing but the script does not handle it properly.

After implementing this change, the script seems to progress and read the log entries properly.

Review

@sgiehl
Copy link
Member

sgiehl commented May 16, 2022

Hi @kuzi-moto
Thanks for creating the PR. The changes look fine and tests still seem to pass. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants