File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -270,3 +270,16 @@ Please refer to the "Writing Logs" section in the [Quick Start](quick-start.md#w
270270
271271By default, logs table created by HTTP ingestion API are in [append only
272272mode](/user-guide/deployments-administration/performance-tuning/design-table.md#when-to-use-append-only-tables).
273+
274+ # # Skip Errors with skip_error
275+
276+ If you want to skip errors when writing logs, you can add the `skip_error` parameter to the HTTP request's query params. For example :
277+
278+ ` ` ` shell
279+ curl -X "POST" "http://localhost:4000/v1/events/logs?db=<db-name>&table=<table-name>&pipeline_name=<pipeline-name>&version=<pipeline-version>&skip_error=true" \
280+ -H "Content-Type: application/x-ndjson" \
281+ -H "Authorization: Basic {{authentication}}" \
282+ -d "$<log-items>"
283+ ` ` `
284+
285+ With this, GreptimeDB will skip the log entry when an error is encountered and continue processing the remaining logs. The entire request will not fail due to an error in a single log entry.
Original file line number Diff line number Diff line change @@ -268,3 +268,17 @@ processors:
268268# # Append 模式
269269
270270通过此接口创建的日志表,默认为[Append 模式](/user-guide/deployments-administration/performance-tuning/design-table.md#何时使用-append-only-表).
271+
272+
273+ # # 使用 skip_error 跳过错误
274+
275+ 如果你希望在写入日志时跳过错误,可以在 HTTP 请求的 query params 中添加 `skip_error` 参数。比如:
276+
277+ ` ` ` shell
278+ curl -X "POST" "http://localhost:4000/v1/events/logs?db=<db-name>&table=<table-name>&pipeline_name=<pipeline-name>&version=<pipeline-version>&skip_error=true" \
279+ -H "Content-Type: application/x-ndjson" \
280+ -H "Authorization: Basic {{authentication}}" \
281+ -d "$<log-items>"
282+ ` ` `
283+
284+ 这样,GreptimeDB 将在遇到错误时跳过该条日志,并继续处理其他日志。不会因为某一条日志的错误而导致整个请求失败。
You can’t perform that action at this time.
0 commit comments