You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: i18n/zh/docusaurus-plugin-content-docs/version-0.14/user-guide/ingest-data/for-observability/opentelemetry.md
Copy file name to clipboardExpand all lines: versioned_docs/version-0.14/greptimecloud/integrations/otlp.md
+62-6Lines changed: 62 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,10 @@ agents.
15
15
To send OpenTelemetry Metrics to GreptimeDB through OpenTelemetry SDK libraries,
16
16
use the following information:
17
17
18
-
* URL: `https://<host>/v1/otlp/v1/metrics`
19
-
* Headers:
20
-
*`X-Greptime-DB-Name`: `<dbname>`
21
-
*`Authorization`: `Basic` authentication, which is a Base64 encoded string of `<username>:<password>`. For more information, please refer to [Authentication](https://docs.greptime.com/nightly/user-guide/protocols/http#authentication) in HTTP API.
18
+
- URL: `https://<host>/v1/otlp/v1/metrics`
19
+
- Headers:
20
+
-`X-Greptime-DB-Name`: `<dbname>`
21
+
-`Authorization`: `Basic` authentication, which is a Base64 encoded string of `<username>:<password>`. For more information, please refer to [Authentication](https://docs.greptime.com/nightly/user-guide/protocols/http#authentication) in HTTP API.
22
22
23
23
The request uses binary protobuf to encode the payload, so you need to use packages that support `HTTP/protobuf`. For example, in Node.js, you can use [`exporter-trace-otlp-proto`](https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-proto); in Go, you can use [`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp); in Java, you can use [`io.opentelemetry:opentelemetry-exporter-otlp`](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-exporter-otlp); and in Python, you can use [`opentelemetry-exporter-otlp-proto-http`](https://pypi.org/project/opentelemetry-exporter-otlp-proto-http/).
24
24
@@ -28,8 +28,64 @@ The package names may change according to OpenTelemetry, so we recommend that yo
28
28
29
29
## OpenTelemetry Collector
30
30
31
-
We recommend [Grafana Alloy](https://grafana.com/docs/alloy/latest/) as OTel
32
-
collector if you use OpenTelemetry transformation or other advanced features.
31
+
OpenTelemetry Collector is a vendor-agnostic implementation of OpenTelemetry, below is a sample configuration for
32
+
exporting to GreptimeDB. You can use the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) to send metrics, logs, and traces to GreptimeDB.
33
+
34
+
```yaml
35
+
extensions:
36
+
basicauth/client:
37
+
client_auth:
38
+
username: <username>
39
+
password: <password>
40
+
41
+
receivers:
42
+
otlp:
43
+
protocols:
44
+
grpc:
45
+
endpoint: 0.0.0.0:4317
46
+
http:
47
+
endpoint: 0.0.0.0:4318
48
+
49
+
exporters:
50
+
otlphttp/traces:
51
+
endpoint: 'https://<host>/v1/otlp'
52
+
auth:
53
+
authenticator: basicauth/client
54
+
headers:
55
+
x-greptime-db-name: '<dbname>'
56
+
x-greptime-pipeline-name: 'greptime_trace_v1'
57
+
otlphttp/logs:
58
+
endpoint: 'https://<host>/v1/otlp'
59
+
auth:
60
+
authenticator: basicauth/client
61
+
headers:
62
+
x-greptime-db-name: '<dbname>'
63
+
# x-greptime-log-table-name: "<pipeline_name>"
64
+
65
+
otlphttp/metrics:
66
+
endpoint: 'https://<host>/v1/otlp'
67
+
auth:
68
+
authenticator: basicauth/client
69
+
headers:
70
+
x-greptime-db-name: '<dbname>'
71
+
72
+
service:
73
+
extensions: [basicauth/client]
74
+
pipelines:
75
+
traces:
76
+
receivers: [otlp]
77
+
exporters: [otlphttp/traces]
78
+
logs:
79
+
receivers: [otlp]
80
+
exporters: [otlphttp/logs]
81
+
metrics:
82
+
receivers: [otlp]
83
+
exporters: [otlphttp/metrics]
84
+
```
85
+
86
+
## Grafana Alloy
87
+
88
+
If you prefer to use [Grafana Alloy](https://grafana.com/docs/alloy/latest/)'s OpenTelemetry exporter, you can use the following configuration to send your data.
33
89
34
90
A sample configuration for exporting to GreptimeDB:
0 commit comments