We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Originally posted by Abingcbc August 29, 2023 iLogtail 从 v1.7.0 开始,提供了对日志时间进行纳秒级精度解析的支持。对于每一个 flusher,需要将解析得到的纳秒时间保存到指定的字段,然后再将日志 flush 到下游。 每个 flush 如何处理纳秒级的时间都有自己的方法。欢迎社区成员一起参与完成对 flusher 的升级改造。
The text was updated successfully, but these errors were encountered:
时间处理插件(e.g. processor_gotime,processor_strptime)在配置全局参数EnableTimestampNanosecond时,会在Log中添加纳秒时间。
processor_gotime
processor_strptime
EnableTimestampNanosecond
if p.context.GetPipelineScopeConfig().EnableTimestampNanosecond { protocol.SetLogTimeWithNano(log, uint32(parsedTime.Unix()), uint32(parsedTime.Nanosecond())) } else { protocol.SetLogTime(log, uint32(parsedTime.Unix())) }
通过log.TimeNs就可以获取一条日志的纳秒时间。
log.TimeNs
在flusher阶段,采集到的日志需要转换成对应数据源的数据格式。因此,可以在convertor将日志从iLogtail的Log转换成数据源格式时,将纳秒时间填充到对应的字段。 例如,现在OTLP Flusher已经支持了纳秒时间戳,其实现的方法如下所示:
ilogtail/pkg/protocol/converter/otlp.go
Lines 85 to 89 in 6827f19
在开发过程中,需要注意以下几点:
Sorry, something went wrong.
No branches or pull requests
Discussed in #1098
Originally posted by Abingcbc August 29, 2023
iLogtail 从 v1.7.0 开始,提供了对日志时间进行纳秒级精度解析的支持。对于每一个 flusher,需要将解析得到的纳秒时间保存到指定的字段,然后再将日志 flush 到下游。
每个 flush 如何处理纳秒级的时间都有自己的方法。欢迎社区成员一起参与完成对 flusher 的升级改造。
The text was updated successfully, but these errors were encountered: