Skip to content

Commit

Permalink
Merge pull request #42 from arukiidou/chore/replace-promrw-to-otlp
Browse files Browse the repository at this point in the history
Replace prometheusremotewriteexporter to otlpexporter
  • Loading branch information
zeitlinger authored May 13, 2024
2 parents 5275d20 + 1213b2f commit ece31b9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
15 changes: 7 additions & 8 deletions docker/otelcol-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ processors:
batch:

exporters:
prometheusremotewrite:
endpoint: http://localhost:9090/api/v1/write
add_metric_suffixes: true
otlphttp:
otlp/metrics:
endpoint: http://localhost:9090/api/v1/otlp
otlp/traces:
endpoint: http://localhost:4418
loki:
endpoint: http://localhost:3100/loki/api/v1/push
Expand All @@ -33,13 +32,13 @@ service:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp]
#exporters: [otlphttp,logging/traces]
exporters: [otlp/traces]
#exporters: [otlp/traces,logging/traces]
metrics:
receivers: [otlp,prometheus/collector]
processors: [batch]
exporters: [prometheusremotewrite]
#exporters: [prometheusremotewrite,logging/metrics]
exporters: [otlp/metrics]
#exporters: [otlp/metrics,logging/metrics]
logs:
receivers: [otlp]
processors: [batch]
Expand Down
6 changes: 5 additions & 1 deletion docker/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# empty
storage:
tsdb:
# A 10min time window is enough because it can easily absorb retries and network delays.
out_of_order_time_window: 10m

1 change: 1 addition & 0 deletions docker/run-prometheus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

./prometheus-$PROMETHEUS_VERSION/prometheus \
--web.enable-remote-write-receiver \
--enable-feature=otlp-write-receiver \
--enable-feature=exemplar-storage \
--enable-feature=native-histograms \
--storage.tsdb.path=/data/prometheus \
Expand Down
1 change: 1 addition & 0 deletions docker/tempo-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ metrics_generator:
path: /tmp/tempo/generator/traces
storage:
path: /tmp/tempo/generator/wal
# TODO: support otlp at metrics_generator
remote_write:
- url: http://localhost:9090/api/v1/write
send_exemplars: true
Expand Down

0 comments on commit ece31b9

Please sign in to comment.