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

[INLONG-11267][Doc] Add signoz doc #1045

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
80 changes: 80 additions & 0 deletions docs/modules/sort/log_reporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: OpenTelemetry log reporting
sidebar_position: 6
---

## Overview

OpenTelemetry is a solution designed to provide a unified telemetry data collection, processing, and export solution for distributed systems. It includes a set of APIs, libraries, agents, and tools for tracing, metrics, and logging. The goal of OpenTelemetry is to simplify and standardize data collection for monitoring and observability in cloud-native applications and microservices architectures.

In order to visualize the logs reported in OpenTelemetry, two solutions are given here: `SigNoz` and `Grafana Loki`

## SigNoz

First, download [SigNoz](https://github.com/SigNoz/signoz) to your local computer.

Here we can choose to use InLong or OpenTelemetry in the SigNoz project according to our needs.

### OpenTelemetry in SigNoz

If you want to use OpenTelemetry in SigNoz, delete the OpenTelemetry container in the InLong project's `docker/docker-compose/docker-compose.yml`

Then enter the `deploy` directory in the SigNoz project and use

```bash
docker-compose -f docker/clickhouse-setup/docker-compose.yaml up -d
```

Start SizNoz

### OpenTelemetry in InLong

If you want to use the OpenTelemetry container in InLong, delete the OpenTelemetry-related configuration in `docker/clickhouse-setup/docker-compose.yaml` in the SigNoz project, and copy the following configuration to `docker/docker-compose/docker-compose.yml` in the InLong project
```yaml
otel-collector:
image: signoz/signoz-otel-collector:0.102.8
container_name: signoz-otel-collector
command:
[
"--config=/etc/otel-collector-config.yaml",
"--manager-config=/etc/manager-config.yaml",
"--copy-path=/var/tmp/collector-config.yaml",
"--feature-gates=-pkg.translator.prometheus.NormalizeName"
]
user: root # required for reading docker container logs
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /:/hostfs:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
- DOCKER_MULTI_NODE_CLUSTER=false
- LOW_CARDINAL_EXCEPTION_GROUPING=false
ports:
# - "1777:1777" # pprof extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
# - "8888:8888" # OtelCollector internal metrics
# - "8889:8889" # signoz spanmetrics exposed by the agent
# - "9411:9411" # Zipkin port
# - "13133:13133" # health check extension
# - "14250:14250" # Jaeger gRPC
# - "14268:14268" # Jaeger thrift HTTP
# - "55678:55678" # OpenCensus receiver
# - "55679:55679" # zPages extension
restart: on-failure
depends_on:
clickhouse:
condition: service_healthy
otel-collector-migrator:
condition: service_completed_successfully
query-service:
condition: service_healthy

```
And put the `otel-collector-config.yaml` and `otel-collector-opamp-config.yaml` files in SigNoz into the `docker/docker-compose` directory, then start SigNoz and InLong.

### Usage

For the usage of SigNoz, please refer to [log explorer](https://signoz.io/docs/product-features/logs-explorer/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: OpenTelemetry 日志上报
sidebar_position: 6
---

## 概览

OpenTelemetry 是一个旨在为分布式系统提供统一的遥测数据收集、处理和导出解决方案。它包括一组用于跟踪、指标和日志记录的 API、库、代理和工具。OpenTelemetry 的目标是简化和标准化云原生应用程序和微服务架构中监控和可观测性的数据收集。

为了将 OpenTelemetry 中上报的日志进行可视化,这里给出两个方案: `SigNoz` 和 `Grafana Loki`

## SigNoz

首先在自己的电脑中下载 [SigNoz](https://github.com/SigNoz/signoz) 到本地

这里我们可以根据自己的需求,选择使用 InLong 还是 SigNoz项目中的 OpenTelemetry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个描述有问题吧

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个我想表达的是使用哪个项目中配置的OpenTelemetry,我感觉可以理解这句话的意思


### SigNoz中的OpenTelemetry
sususama marked this conversation as resolved.
Show resolved Hide resolved

如果想要使用 SigNoz 中的 OpenTelemetry 则删除 InLong 项目的 `docker/docker-compose/docker-compose.yml` 中的 OpenTelemetry容器
Copy link
Contributor

@vernedeng vernedeng Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要删除吧, inlong docker compose引入opentelemetry是可选的

signoz 也提供容器化的选项吧,不要直接下载


随后在 SigNoz 项目中进入 `deploy` 目录,使用

```bash
docker-compose -f docker/clickhouse-setup/docker-compose.yaml up -d
```

将 SizNoz 启动起来

### InLong中的OpenTelemetry

如果想要使用 InLong 中的 OpenTelemetry 容器,则删除 SigNoz 项目中 `docker/clickhouse-setup/docker-compose.yaml` 中 OpenTelemetry 相关的配置,并且将以下配置复制到 InLong 项目中的 `docker/docker-compose/docker-compose.yml` 中

```yaml
otel-collector:
image: signoz/signoz-otel-collector:0.102.8
container_name: signoz-otel-collector
command:
[
"--config=/etc/otel-collector-config.yaml",
"--manager-config=/etc/manager-config.yaml",
"--copy-path=/var/tmp/collector-config.yaml",
"--feature-gates=-pkg.translator.prometheus.NormalizeName"
]
user: root # required for reading docker container logs
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /:/hostfs:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
- DOCKER_MULTI_NODE_CLUSTER=false
- LOW_CARDINAL_EXCEPTION_GROUPING=false
ports:
# - "1777:1777" # pprof extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
# - "8888:8888" # OtelCollector internal metrics
# - "8889:8889" # signoz spanmetrics exposed by the agent
# - "9411:9411" # Zipkin port
# - "13133:13133" # health check extension
# - "14250:14250" # Jaeger gRPC
# - "14268:14268" # Jaeger thrift HTTP
# - "55678:55678" # OpenCensus receiver
# - "55679:55679" # zPages extension
restart: on-failure
depends_on:
clickhouse:
condition: service_healthy
otel-collector-migrator:
condition: service_completed_successfully
query-service:
condition: service_healthy

```
并将 SigNoz 中 `otel-collector-config.yaml` 和 `otel-collector-opamp-config.yaml` 文件放入 `docker/docker-compose`目录下,随后启动 SigNoz 和 InLong 即可

### 使用

SigNoz 的使用可以参考 [log explorer](https://signoz.io/docs/product-features/logs-explorer/)
Loading