From 653dff33ddc0038df38eb60ab20c57e8cc9d6a6a Mon Sep 17 00:00:00 2001 From: tomershafir Date: Wed, 3 Jan 2024 15:21:51 +0200 Subject: [PATCH 1/4] fix receiver readme --- receiver/pyroscopereceiver/README.md | 43 +++++++++++++++++++++++---- receiver/pyroscopereceiver/config.go | 2 +- receiver/pyroscopereceiver/factory.go | 2 +- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/receiver/pyroscopereceiver/README.md b/receiver/pyroscopereceiver/README.md index 922dd97..ee8e621 100644 --- a/receiver/pyroscopereceiver/README.md +++ b/receiver/pyroscopereceiver/README.md @@ -1,19 +1,52 @@ -# pyroscope receiver +# Pyroscope REceiver | Status | | | ------------------------ |-----------------------| -| Stability | [alpha] | +| Stability | [beta] | | Supported pipeline types | logs | -The pyroscope receiver implements the pyroscope ingest http api. +The pyroscope receiver implements the pyroscope ingest protocol and conveys the accepted profiles as OpenTelemtry logs IR for further processing and export. -## Getting Started +## Configuration + +- `protocols`: sets the application layer protocols that the receiver will serve. See [Supported Protocols](#supported-protocols). Default is http/s on 0.0.0.0:8062 with max request body size of: 5e6 + 1e6. +- `timeout`: sets the server reponse timeout. Default is 10 seconds. +- `request_body_size_expected_value`: sets the expected decompressed request body size in bytes to size pipeline buffers and optimize allocations. Default is 0. + +## Example -Example: ```yaml receivers: pyroscopereceiver: protocols: http: endpoint: 0.0.0.0:8062 + timeout: 30s + +exporters: + clickhouseprofileexporter: + dsn: tcp://0.0.0.0:9000/cloki + timeout: 10s + sending_queue: + queue_size: 100 + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s + +service: + pipelines: + logs/profiles: + receivers: [pyroscopereceiver] + processors: [batch] + exporters: [clickhouseprofileexporter] ``` + +## Supported Protocols + +Http + +## Supported Encodings + +JFR diff --git a/receiver/pyroscopereceiver/config.go b/receiver/pyroscopereceiver/config.go index 7025a35..66f051b 100644 --- a/receiver/pyroscopereceiver/config.go +++ b/receiver/pyroscopereceiver/config.go @@ -34,7 +34,7 @@ func (cfg *Config) Validate() error { if cfg.Protocols.Http.MaxRequestBodySize < 1 { return fmt.Errorf("max_request_body_size must be positive") } - if cfg.DecompressedRequestBodySizeBytesExpectedValue < 1 { + if cfg.DecompressedRequestBodySizeBytesExpectedValue < 0 { return fmt.Errorf("request_body_size_expected_value must be positive") } if cfg.DecompressedRequestBodySizeBytesExpectedValue > cfg.Protocols.Http.MaxRequestBodySize { diff --git a/receiver/pyroscopereceiver/factory.go b/receiver/pyroscopereceiver/factory.go index a2f482f..e6813a2 100644 --- a/receiver/pyroscopereceiver/factory.go +++ b/receiver/pyroscopereceiver/factory.go @@ -16,7 +16,7 @@ const ( defaultHttpAddr = "0.0.0.0:8062" defaultMaxRequestBodySize = 5e6 + 1e6 // reserve for metadata defaultTimeout = 10 * time.Second - defaultDecompressedRequestBodySizeBytesExpectedValue = 50e4 + 1e6 // reserve for metadata + defaultDecompressedRequestBodySizeBytesExpectedValue = 0 ) func createDefaultConfig() component.Config { From 1b7b5a3f0131185147892d91d863275a681351be Mon Sep 17 00:00:00 2001 From: tomershafir Date: Wed, 3 Jan 2024 16:36:49 +0200 Subject: [PATCH 2/4] add exporter readme --- exporter/clickhouseprofileexporter/README.md | 43 ++++++++++++++++++++ receiver/pyroscopereceiver/README.md | 8 ++-- 2 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 exporter/clickhouseprofileexporter/README.md diff --git a/exporter/clickhouseprofileexporter/README.md b/exporter/clickhouseprofileexporter/README.md new file mode 100644 index 0000000..bba0bfd --- /dev/null +++ b/exporter/clickhouseprofileexporter/README.md @@ -0,0 +1,43 @@ +# Clickhouse Profile Exporter + +| Status | | +| ------------------------ |-----------------------| +| Stability | [beta] | +| Supported pipeline types | logs | + +Exports conveyed OpenTelemetry logs backed IR for profiles into a Clickhouse cluster. See [Pyropscope Receiver](../../receiver/pyroscopereceiver), which can send compatible profiles. + +## Configuration + +- `dsn` (required): sets the ClickHouse server Data Source Name. For tcp protocol reference: [ClickHouse/clickhouse-go#dsn](https://github.com/ClickHouse/clickhouse-go#dsn). For http protocol reference: [mailru/go-clickhouse/#dsn](https://github.com/mailru/go-clickhouse/#dsn). +- `clustered_clickhouse` (required): true if Clickhouse cluster is used. + +## Example + +```yaml +receivers: + pyroscopereceiver: + protocols: + http: + endpoint: 0.0.0.0:8062 + timeout: 30s + +exporters: + clickhouseprofileexporter: + dsn: tcp://0.0.0.0:9000/cloki + timeout: 10s + sending_queue: + queue_size: 100 + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s + +service: + pipelines: + logs/profiles: + receivers: [pyroscopereceiver] + processors: [batch] + exporters: [clickhouseprofileexporter] +``` diff --git a/receiver/pyroscopereceiver/README.md b/receiver/pyroscopereceiver/README.md index ee8e621..34c346a 100644 --- a/receiver/pyroscopereceiver/README.md +++ b/receiver/pyroscopereceiver/README.md @@ -1,11 +1,11 @@ -# Pyroscope REceiver +# Pyroscope Receiver | Status | | | ------------------------ |-----------------------| | Stability | [beta] | | Supported pipeline types | logs | -The pyroscope receiver implements the pyroscope ingest protocol and conveys the accepted profiles as OpenTelemtry logs IR for further processing and export. +Implements the Pyroscope ingest protocol and conveys the accepted profiles as OpenTelemetry logs backed IR for further processing and export. ## Configuration @@ -47,6 +47,6 @@ service: Http -## Supported Encodings +## Supported Languages -JFR +Java From 431303539d2726cebb24f23795d58f352a98310a Mon Sep 17 00:00:00 2001 From: tomershafir Date: Wed, 3 Jan 2024 16:40:22 +0200 Subject: [PATCH 3/4] rm cfg clustered_clickhouse --- exporter/clickhouseprofileexporter/README.md | 1 - exporter/clickhouseprofileexporter/config.go | 1 - 2 files changed, 2 deletions(-) diff --git a/exporter/clickhouseprofileexporter/README.md b/exporter/clickhouseprofileexporter/README.md index bba0bfd..b4e6beb 100644 --- a/exporter/clickhouseprofileexporter/README.md +++ b/exporter/clickhouseprofileexporter/README.md @@ -10,7 +10,6 @@ Exports conveyed OpenTelemetry logs backed IR for profiles into a Clickhouse clu ## Configuration - `dsn` (required): sets the ClickHouse server Data Source Name. For tcp protocol reference: [ClickHouse/clickhouse-go#dsn](https://github.com/ClickHouse/clickhouse-go#dsn). For http protocol reference: [mailru/go-clickhouse/#dsn](https://github.com/mailru/go-clickhouse/#dsn). -- `clustered_clickhouse` (required): true if Clickhouse cluster is used. ## Example diff --git a/exporter/clickhouseprofileexporter/config.go b/exporter/clickhouseprofileexporter/config.go index e331614..cde6745 100644 --- a/exporter/clickhouseprofileexporter/config.go +++ b/exporter/clickhouseprofileexporter/config.go @@ -11,7 +11,6 @@ type Config struct { exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` QueueSettings `mapstructure:"sending_queue"` - ClusteredClickhouse bool `mapstructure:"clustered_clickhouse"` // DSN is the ClickHouse server Data Source Name. // For tcp protocol reference: [ClickHouse/clickhouse-go#dsn](https://github.com/ClickHouse/clickhouse-go#dsn). // For http protocol reference: [mailru/go-clickhouse/#dsn](https://github.com/mailru/go-clickhouse/#dsn). From 2f0dcc2ed90dd0872639e81b74fb1ff34e1c2500 Mon Sep 17 00:00:00 2001 From: tomershafir Date: Wed, 3 Jan 2024 16:56:29 +0200 Subject: [PATCH 4/4] rename cloki->qryn --- README.md | 2 +- config/example-config.yaml | 4 ++-- exporter/clickhouseprofileexporter/README.md | 2 +- exporter/clickhouseprofileexporter/factory.go | 2 +- receiver/pyroscopereceiver/README.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3df7ada..56050b7 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ processors: new_name: traces_spanmetrics_latency exporters: qryn: - dsn: tcp://clickhouse-server:9000/cloki?username=default&password=************* + dsn: tcp://clickhouse-server:9000/qryn?username=default&password=************* timeout: 10s sending_queue: queue_size: 100 diff --git a/config/example-config.yaml b/config/example-config.yaml index c7226eb..2bcb3da 100644 --- a/config/example-config.yaml +++ b/config/example-config.yaml @@ -54,7 +54,7 @@ processors: exporters: qryn: - dsn: tcp://clickhouse-server:9000/cloki?username=qryn&password=demo + dsn: tcp://clickhouse-server:9000/qryn?username=qryn&password=demo timeout: 10s sending_queue: queue_size: 100 @@ -64,7 +64,7 @@ exporters: max_interval: 30s max_elapsed_time: 300s clickhouseprofileexporter: - dsn: tcp://0.0.0.0:9000/cloki + dsn: tcp://0.0.0.0:9000/qryn timeout: 10s sending_queue: queue_size: 100 diff --git a/exporter/clickhouseprofileexporter/README.md b/exporter/clickhouseprofileexporter/README.md index b4e6beb..2c59c77 100644 --- a/exporter/clickhouseprofileexporter/README.md +++ b/exporter/clickhouseprofileexporter/README.md @@ -23,7 +23,7 @@ receivers: exporters: clickhouseprofileexporter: - dsn: tcp://0.0.0.0:9000/cloki + dsn: tcp://0.0.0.0:9000/qryn timeout: 10s sending_queue: queue_size: 100 diff --git a/exporter/clickhouseprofileexporter/factory.go b/exporter/clickhouseprofileexporter/factory.go index d9196e8..f26bafe 100644 --- a/exporter/clickhouseprofileexporter/factory.go +++ b/exporter/clickhouseprofileexporter/factory.go @@ -12,7 +12,7 @@ import ( const ( typeStr = "clickhouseprofileexporter" - defaultDsn = "tcp://127.0.0.1:9000/cloki" + defaultDsn = "tcp://127.0.0.1:9000/qryn" ) func createDefaultConfig() component.Config { diff --git a/receiver/pyroscopereceiver/README.md b/receiver/pyroscopereceiver/README.md index 34c346a..6a5b6ab 100644 --- a/receiver/pyroscopereceiver/README.md +++ b/receiver/pyroscopereceiver/README.md @@ -25,7 +25,7 @@ receivers: exporters: clickhouseprofileexporter: - dsn: tcp://0.0.0.0:9000/cloki + dsn: tcp://0.0.0.0:9000/qryn timeout: 10s sending_queue: queue_size: 100