Skip to content

Commit

Permalink
Span metrics generation (#347)
Browse files Browse the repository at this point in the history
* feat: release for span to metrics

* feat: release for span to metrics
  • Loading branch information
ankitnayan authored Oct 20, 2021
1 parent d2b107e commit dea74c5
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 8 deletions.
16 changes: 12 additions & 4 deletions deploy/docker/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
retries: 3

query-service:
image: signoz/query-service:0.4.1
image: signoz/query-service:0.4.2
container_name: query-service
command: ["-config=/root/config/prometheus.yml"]
ports:
Expand All @@ -43,7 +43,7 @@ services:
condition: service_healthy

frontend:
image: signoz/frontend:0.4.1
image: signoz/frontend:0.4.2
container_name: frontend

depends_on:
Expand All @@ -57,7 +57,7 @@ services:


otel-collector:
image: signoz/otelcontribcol:0.4.0
image: signoz/otelcontribcol:0.4.2
command: ["--config=/etc/otel-collector-config.yaml", "--mem-ballast-size-mib=683"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
Expand All @@ -71,11 +71,19 @@ services:
- "4317:4317" # OTLP GRPC receiver
- "55679:55679" # zpages extension
- "13133" # health_check

- "8889:8889" # prometheus exporter
depends_on:
clickhouse:
condition: service_healthy

otel-collector-metrics:
image: signoz/otelcontribcol:0.4.2
command: ["--config=/etc/otel-collector-metrics-config.yaml", "--mem-ballast-size-mib=683"]
volumes:
- ./otel-collector-metrics-config.yaml:/etc/otel-collector-metrics-config.yaml
depends_on:
clickhouse:
condition: service_healthy
hotrod:
image: jaegertracing/example-hotrod:latest
container_name: hotrod
Expand Down
19 changes: 15 additions & 4 deletions deploy/docker/clickhouse-setup/otel-collector-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
receivers:
otlp/spanmetrics:
protocols:
grpc:
endpoint: "localhost:12345"
otlp:
protocols:
grpc:
Expand All @@ -8,7 +12,7 @@ receivers:
grpc:
thrift_http:
hostmetrics:
collection_interval: 10s
collection_interval: 30s
scrapers:
cpu:
load:
Expand All @@ -20,6 +24,9 @@ processors:
batch:
send_batch_size: 1000
timeout: 10s
signozspanmetrics/prometheus:
metrics_exporter: prometheus
latency_histogram_buckets: [100us, 1ms, 2ms, 6ms, 10ms, 50ms, 100ms, 250ms, 500ms, 1000ms, 1400ms, 2000ms, 5s, 10s, 20s, 40s, 60s ]
memory_limiter:
# Same as --mem-ballast-size-mib CLI argument
ballast_size_mib: 683
Expand All @@ -42,15 +49,19 @@ exporters:
endpoint: tcp://clickhouse:9000/?database=signoz_metrics
resource_to_telemetry_conversion:
enabled: true

prometheus:
endpoint: "0.0.0.0:8889"
service:
extensions: [health_check, zpages]
pipelines:
traces:
receivers: [jaeger, otlp]
processors: [batch]
processors: [signozspanmetrics/prometheus, batch]
exporters: [clickhouse]
metrics:
receivers: [otlp, hostmetrics]
processors: [batch]
exporters: [clickhousemetricswrite]
exporters: [clickhousemetricswrite]
metrics/spanmetrics:
receivers: [otlp/spanmetrics]
exporters: [prometheus]
44 changes: 44 additions & 0 deletions deploy/docker/clickhouse-setup/otel-collector-metrics-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
receivers:
otlp:
protocols:
grpc:
http:

# Data sources: metrics
prometheus:
config:
scrape_configs:
- job_name: "otel-collector"
scrape_interval: 60s
static_configs:
- targets: ["otel-collector:8889"]
processors:
batch:
send_batch_size: 1000
timeout: 10s
memory_limiter:
# Same as --mem-ballast-size-mib CLI argument
ballast_size_mib: 683
# 80% of maximum memory up to 2G
limit_mib: 1500
# 25% of limit up to 2G
spike_limit_mib: 512
check_interval: 5s
# queued_retry:
# num_workers: 4
# queue_size: 100
# retry_on_failure: true
extensions:
health_check: {}
zpages: {}
exporters:
clickhousemetricswrite:
endpoint: tcp://clickhouse:9000/?database=signoz_metrics

service:
extensions: [health_check, zpages]
pipelines:
metrics:
receivers: [otlp, prometheus]
processors: [batch]
exporters: [clickhousemetricswrite]

0 comments on commit dea74c5

Please sign in to comment.