Skip to content

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

Merged
juststillthinking merged 2 commits into
apache:masterfrom
Revolyssup:revolyssup/fix9848
Jul 24, 2023
Merged

fix: loki-logger nil context in batch processor#9850
juststillthinking merged 2 commits into
apache:masterfrom
Revolyssup:revolyssup/fix9848

Conversation

@Revolyssup

Copy link
Copy Markdown
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 <[email protected]>

@bzp2010 bzp2010 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread apisix/plugins/loki-logger.lua
@juststillthinking juststillthinking added the wait for update wait for the author's response in this issue/PR label Jul 18, 2023
Signed-off-by: Ashish Tiwari <[email protected]>
@juststillthinking juststillthinking added approved and removed wait for update wait for the author's response in this issue/PR labels Jul 19, 2023
@juststillthinking
juststillthinking merged commit 1ded3a8 into apache:master Jul 24, 2023
kldcty pushed a commit to kldcty/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

None yet

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