Skip to content

Commit

Permalink
apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui committed Dec 27, 2024
1 parent 0f9d110 commit 3ac7082
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ description: Instructions for integrating OpenTelemetry with GreptimeDB, includi

[OpenTelemetry](https://opentelemetry.io/) is a vendor-neutral open-source observability framework for instrumenting, generating, collecting, and exporting telemetry data such as traces, metrics, logs. The OpenTelemetry Protocol (OTLP) defines the encoding, transport, and delivery mechanism of telemetry data between telemetry sources, intermediate processes such as collectors and telemetry backends.

## OpenTelemetry Collectors

You can easily configure GreptimeDB as the target for your OpenTelemetry collector.
For more information, please refer to the [Grafana Alloy](alloy.md) example.

## Metrics

GreptimeDB is an observability backend to consume OpenTelemetry Metrics natively via [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) protocol.
Expand Down Expand Up @@ -130,7 +135,7 @@ To send OpenTelemetry Logs to GreptimeDB through OpenTelemetry SDK libraries, us
* URL: `http{s}://<host>/v1/otlp/v1/logs`
* Headers:
* `X-Greptime-DB-Name`: `<dbname>`
* `Authorization`: `Basic` authentication, which is a Base64 encoded string of `<username>:<password>`. For more information, please refer to [Authentication](https://docs.greptime.com/user-guide/deployments/authentication/static/) and [HTTP API](https://docs.greptime.com/user-guide/protocols/http#authentication).
* `Authorization`: `Basic` authentication, which is a Base64 encoded string of `<username>:<password>`. For more information, please refer to [Authentication](/user-guide/deployments/authentication/static.md) and [HTTP API](/user-guide/protocols/http.md#authentication).
* `X-Greptime-Log-Table-Name`: `<table_name>` (optional) - The table name to store the logs. If not provided, the default table name is `opentelemetry_logs`.
* `X-Greptime-Log-Extract-Keys`: `<extract_keys>` (optional) - The keys to extract from the attributes. The keys should be separated by commas (`,`). For example, `key1,key2,key3` will extract the keys `key1`, `key2`, and `key3` from the attributes and promote them to the top level of the log, setting them as tags. If the field type is array, float, or object, an error will be returned. If a pipeline is provided, this setting will be ignored.
* `X-Greptime-Log-Pipeline-Name`: `<pipeline_name>` (optional) - The pipeline name to process the logs. If not provided, the extract keys will be used to process the logs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ description: 介绍如何使用 OpenTelemetry Protocol (OTLP) 将观测数据(
[OpenTelemetry](https://opentelemetry.io/) 是一个供应商中立的开源可观测性框架,用于检测、生成、收集和导出观测数据,例如 traces, metrics 和 logs。
OpenTelemetry Protocol (OTLP) 定义了观测数据在观测源和中间进程(例如收集器和观测后端)之间的编码、传输机制。

## OpenTelemetry Collectors

你可以很简单地将 GreptimeDB 配置为 OpenTelemetry Collector 的目标。
有关更多信息,请参阅 [Grafana Alloy](alloy.md) 示例。

## Metrics

GreptimeDB 通过原生支持 [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) 协议,可以作为后端存储服务来接收 OpenTelemetry 指标数据。
Expand Down Expand Up @@ -131,7 +136,7 @@ GreptimeDB 是能够通过 [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/
* **URL:** `https://<host>/v1/otlp/v1/logs`
* **Headers:**
* `X-Greptime-DB-Name`: `<dbname>`
* `Authorization`: `Basic` 认证,这是一个 Base64 编码的 `<username>:<password>` 字符串。更多信息,请参考 [鉴权](https://docs.greptime.cn/user-guide/deployments/authentication/static/)[HTTP API](https://docs.greptime.cn/user-guide/protocols/http#authentication)
* `Authorization`: `Basic` 认证,这是一个 Base64 编码的 `<username>:<password>` 字符串。更多信息,请参考 [鉴权](/user-guide/deployments/authentication/static.md)[HTTP API](/user-guide/protocols/http.md#鉴权)
* `X-Greptime-Log-Table-Name`: `<table_name>`(可选)- 存储日志的表名。如果未提供,默认表名为 `opentelemetry_logs`
* `X-Greptime-Log-Extract-Keys`: `<extract_keys>`(可选)- 从属性中提取对应 key 的值到表的顶级字段。key 应以逗号(`,`)分隔。例如,`key1,key2,key3` 将从属性中提取 `key1``key2``key3`,并将它们提升到日志的顶层,设置为标签。如果提取的字段类型是数组、浮点数或对象,将返回错误。如果提供了 pipeline name,此设置将被忽略。
* `X-Greptime-Log-Pipeline-Name`: `<pipeline_name>`(可选)- 处理日志的 pipeline 名称。如果未提供,将使用 `X-Greptime-Log-Extract-Keys` 来处理日志。
Expand Down

0 comments on commit 3ac7082

Please sign in to comment.