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

fix: loki-logger nil context in batch processor #9850

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

Revolyssup
Copy link
Contributor

Description

Fixes #9848

The nginx variable evaluation currently takes place inside callback function which is executed by batch processor and ngx.var is not available outside of request phases. This change makes sure that the variables are evaluated in the hot path.

Fixes # (issue)

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Copy link
Contributor

@bzp2010 bzp2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

apisix/plugins/loki-logger.lua Outdated Show resolved Hide resolved
@monkeyDluffy6017 monkeyDluffy6017 added the wait for update wait for the author's response in this issue/PR label Jul 18, 2023
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
@monkeyDluffy6017 monkeyDluffy6017 added approved and removed wait for update wait for the author's response in this issue/PR labels Jul 19, 2023
@monkeyDluffy6017 monkeyDluffy6017 merged commit 1ded3a8 into apache:master Jul 24, 2023
37 checks passed
rubikplanet pushed a commit to rubikplanet/apisix that referenced this pull request Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

help request: Getting an error with log_labels in loki-logger
5 participants