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 new file mode 100644 index 0000000..2c59c77 --- /dev/null +++ b/exporter/clickhouseprofileexporter/README.md @@ -0,0 +1,42 @@ +# 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). + +## Example + +```yaml +receivers: + pyroscopereceiver: + protocols: + http: + endpoint: 0.0.0.0:8062 + timeout: 30s + +exporters: + clickhouseprofileexporter: + dsn: tcp://0.0.0.0:9000/qryn + 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/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). 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 922dd97..6a5b6ab 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. +Implements the Pyroscope ingest protocol and conveys the accepted profiles as OpenTelemetry logs backed 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/qryn + 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 Languages + +Java 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 {