From 2c61ca52f370a6ecebc1e00e87c63e78b8eed648 Mon Sep 17 00:00:00 2001 From: Bryan Wilson Date: Sat, 31 Aug 2024 14:21:40 -0400 Subject: [PATCH] feat: support microseconds DateTime64(6) fields via Vector sink use rfc3339 with date_time_best_effort non-breaking... can still store into plain DateTime --- .../templates/cairn/apps/vector/partials/common-post.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tutorcairn/templates/cairn/apps/vector/partials/common-post.toml b/tutorcairn/templates/cairn/apps/vector/partials/common-post.toml index 90171eb..bb281f1 100644 --- a/tutorcairn/templates/cairn/apps/vector/partials/common-post.toml +++ b/tutorcairn/templates/cairn/apps/vector/partials/common-post.toml @@ -50,8 +50,9 @@ encoding.only_fields = ["time", "message.context.course_id", "message.context.us # # Send logs to clickhouse [sinks.clickhouse] type = "clickhouse" -# Required: https://github.com/timberio/vector/issues/5797 -encoding.timestamp_format = "unix" +# support time field with microseconds +date_time_best_effort = true +encoding.timestamp_format = "rfc3339" inputs = ["tracking"] endpoint = "{{ CAIRN_CLICKHOUSE_HTTP_SCHEME }}://{{ CAIRN_CLICKHOUSE_HOST }}:{{ CAIRN_CLICKHOUSE_HTTP_PORT }}" database = "{{ CAIRN_CLICKHOUSE_DATABASE }}"