Skip to content

Commit fdfdb44

Browse files
authored
Merge pull request #111 from ks6088ts-labs/feature/issue-93_otel-collector
add opentelemetery collector
2 parents 5f1af3b + 3b59e88 commit fdfdb44

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

docker-compose.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,25 @@ services:
3939
- ES_SERVER_URLS=http://elasticsearch:9200
4040
- LOG_LEVEL=debug
4141
ports:
42-
- "16686:16686"
42+
- "16686:16686" # to access the Jaeger UI
4343
- "4317:4317"
4444
- "4318:4318"
4545
- "5778:5778"
4646
- "9411:9411"
4747
depends_on:
4848
- elasticsearch
4949
restart: unless-stopped
50+
# FIXME: disable for now since its port conflicts with jaeger
51+
# otel-collector:
52+
# image: otel/opentelemetry-collector-contrib:latest
53+
# container_name: otel-collector
54+
# volumes:
55+
# - ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
56+
# ports:
57+
# - 1888:1888 # pprof extension
58+
# - 8888:8888 # Prometheus metrics exposed by the Collector
59+
# - 8889:8889 # Prometheus exporter metrics
60+
# - 13133:13133 # health_check extension
61+
# - 4317:4317 # OTLP gRPC receiver
62+
# - 4318:4318 # OTLP http receiver
63+
# - 55679:55679 # zpages extension

docs/references.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@
4949
- [OpenTelemetry Collector](https://opentelemetry.io//docs/collector/)
5050
- [Jaeger](https://www.jaegertracing.io/)
5151
- [Jaeger / Minimal deployment example (Elasticsearch backend)](https://www.jaegertracing.io/docs/1.72/deployment/#minimal-deployment-example-elasticsearch-backend)
52+
- [OpenTelemetry Collector / Quick Start](https://opentelemetry.io/docs/collector/quick-start/)

otel-collector-config.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# To limit exposure to denial of service attacks, change the host in endpoints below from 0.0.0.0 to a specific network interface.
2+
# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks
3+
4+
extensions:
5+
health_check:
6+
pprof:
7+
endpoint: 0.0.0.0:1777
8+
zpages:
9+
endpoint: 0.0.0.0:55679
10+
11+
receivers:
12+
otlp:
13+
protocols:
14+
grpc:
15+
endpoint: 0.0.0.0:4317
16+
http:
17+
endpoint: 0.0.0.0:4318
18+
19+
# Collect own metrics
20+
prometheus:
21+
config:
22+
scrape_configs:
23+
- job_name: 'otel-collector'
24+
scrape_interval: 10s
25+
static_configs:
26+
- targets: ['0.0.0.0:8888']
27+
28+
jaeger:
29+
protocols:
30+
grpc:
31+
endpoint: 0.0.0.0:14250
32+
thrift_binary:
33+
endpoint: 0.0.0.0:6832
34+
thrift_compact:
35+
endpoint: 0.0.0.0:6831
36+
thrift_http:
37+
endpoint: 0.0.0.0:14268
38+
39+
zipkin:
40+
endpoint: 0.0.0.0:9411
41+
42+
processors:
43+
batch:
44+
45+
exporters:
46+
debug:
47+
verbosity: detailed
48+
49+
service:
50+
51+
pipelines:
52+
53+
traces:
54+
receivers: [otlp, jaeger, zipkin]
55+
processors: [batch]
56+
exporters: [debug]
57+
58+
metrics:
59+
receivers: [otlp, prometheus]
60+
processors: [batch]
61+
exporters: [debug]
62+
63+
logs:
64+
receivers: [otlp]
65+
processors: [batch]
66+
exporters: [debug]
67+
68+
extensions: [health_check, pprof, zpages]

0 commit comments

Comments
 (0)