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
enhancement(external docs): Update S3 source example #9838
Conversation
✔️ Deploy Preview for vector-project ready! 🔨 Explore the source changes: 8ed6e8c 🔍 Inspect the deploy log: https://app.netlify.com/sites/vector-project/deploys/617c694a7e737b0007fba7f4 😎 Browse the preview: https://deploy-preview-9838--vector-project.netlify.app |
Signed-off-by: Max Knee <Max_Knee@comcast.com>
@maxknee You are quite right that this config won't work if copy-pasted! The issue, as you've rightly pointed out, is that this doesn't work as a multi-line string. I think the solution that we would prefer, however, is to keep this as a multi-line string for the sake of readability but fix the TOML syntax. This should do the trick: regex = '''
(?x)^
(?P<type>[\\w]+)[ ]
(?P<timestamp>[\\w:.-]+)[ ]
(?P<elb>[^\\s]+)[ ]
(?P<client_host>[\\d.:-]+)[ ]
(?P<target_host>[\\d.:-]+)[ ]
(?P<request_processing_time>[\\d.-]+)[ ]
(?P<target_processing_time>[\\d.-]+)[ ]
(?P<response_processing_time>[\\d.-]+)[ ]
(?P<elb_status_code>[\\d-]+)[ ]
(?P<target_status_code>[\\d-]+)[ ]
(?P<received_bytes>[\\d-]+)[ ]
(?P<sent_bytes>[\\d-]+)[ ]
"(?P<request_method>[\\w-]+)[ ]
(?P<request_url>[^\\s]+)[ ]
(?P<request_protocol>[^"\\s]+)"[ ]
"(?P<user_agent>[^"]+)"[ ]
(?P<ssl_cipher>[^\\s]+)[ ]
(?P<ssl_protocol>[^\\s]+)[ ]
(?P<target_group_arn>[\\w.:/-]+)[ ]
"(?P<trace_id>[^\\s"]+)"[ ]
"(?P<domain_name>[^\\s"]+)"[ ]
"(?P<chosen_cert_arn>[\\w:./-]+)"[ ]
(?P<matched_rule_priority>[\\d-]+)[ ]
(?P<request_creation_time>[\\w.:-]+)[ ]
"(?P<actions_executed>[\\w,-]+)"[ ]
"(?P<redirect_url>[^"]+)"[ ]
"(?P<error_reason>[^"]+)"
''' Would you be willing to perhaps verify that this works locally and update your PR? |
Signed-off-by: Max Knee <Max_Knee@comcast.com>
Yep! one sec! |
it works! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @maxknee !
* updating regex for usage Signed-off-by: Max Knee <Max_Knee@comcast.com> * using multi-line toml syntax Signed-off-by: Max Knee <Max_Knee@comcast.com>
This PR updates the example to make the regex a one-liner so users can copy-paste and doesn't cause their configs to error.