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

[backport]Fix timezone handling in native processors #1293

Merged
merged 1 commit into from
Dec 28, 2023
Merged

Conversation

henryzhx8
Copy link
Collaborator

@henryzhx8 henryzhx8 commented Dec 27, 2023

之前插件化的时候都改乱了,问题包括:

  1. 飞天和时间解析插件丢弃历史日志的时间间隔不再是12小时,而是一个随时区变化的数字
  2. 飞天的微妙调整无效,__time__时区错误

改动已通过回归测试

This commit resolves two timezone-related issues in iLogtail's native processors. Previously, ProcessorParseApsaraNative did not initialize the timezone option correctly, nor did it account for timezone settings when adjusting time. Additionally, ProcessorParseTimestampNative was incorrectly filtering timeout logs by subtracting the timezone offset twice.

Changes include:

  • Correct initialization of the timezone option in ProcessorParseApsaraNative to ensure that log processing aligns with the configured timezone setting.
  • Modification of time adjustment logic in ProcessorParseApsaraNative to correctly apply the timezone setting.
  • Adjustment of the log filtering logic in ProcessorParseTimestampNative to prevent double subtraction of the timezone offset, ensuring accurate timeout log filtering.

These fixes improve the accuracy of log processing and filtering in environments with varying timezone configurations, ensuring that iLogtail consistently handles logs across different timezones.

@henryzhx8 henryzhx8 changed the base branch from main to 1.8 December 27, 2023 11:19
@henryzhx8 henryzhx8 added the bug Something isn't working label Dec 28, 2023
@yyuuttaaoo yyuuttaaoo changed the title fix timezone problem Fix timezone handling in native processors Dec 28, 2023
@yyuuttaaoo yyuuttaaoo merged commit dd19995 into 1.8 Dec 28, 2023
5 checks passed
@yyuuttaaoo yyuuttaaoo deleted the fix/time branch December 28, 2023 11:51
@yyuuttaaoo yyuuttaaoo added this to the v1.8 milestone Jan 2, 2024
@yyuuttaaoo yyuuttaaoo changed the title Fix timezone handling in native processors [backport]Fix timezone handling in native processors Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants