-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcollector-gateway.yaml
More file actions
139 lines (132 loc) · 3.36 KB
/
collector-gateway.yaml
File metadata and controls
139 lines (132 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-gateway-config
namespace: otel
data:
config.yaml: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
processors:
memory_limiter:
check_interval: 1s
limit_mib: 1638
spike_limit_mib: 400
tail_sampling:
# Wait up to 30s for all spans of a trace to arrive before making a decision
decision_wait: 30s
num_traces: 100000
expected_new_traces_per_sec: 1000
policies:
# Policy 1: Always keep traces that contain an error
- name: errors
type: status_code
status_code:
status_codes: [ERROR]
# Policy 2: Always keep traces with latency > 2s
- name: high-latency
type: latency
latency:
threshold_ms: 2000
# Policy 3: Sample 5 percent of remaining (healthy) traces
- name: probabilistic-catchall
type: probabilistic
probabilistic:
sampling_percentage: 5
extensions:
health_check:
endpoint: 0.0.0.0:13133
exporters:
otlp:
endpoint: jaeger.otel.svc.cluster.local:4317
tls:
insecure: true
debug:
verbosity: basic
service:
extensions: [health_check]
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, tail_sampling]
exporters: [otlp, debug]
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: otel-collector-gateway
namespace: otel
labels:
app.kubernetes.io/name: otel-collector
app.kubernetes.io/component: gateway
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: otel-collector
app.kubernetes.io/component: gateway
template:
metadata:
labels:
app.kubernetes.io/name: otel-collector
app.kubernetes.io/component: gateway
spec:
containers:
- name: collector
image: otel/opentelemetry-collector-contrib:0.120.0
args:
- --config=/etc/otelcol/config.yaml
ports:
- name: otlp-grpc
containerPort: 4317
protocol: TCP
- name: health
containerPort: 13133
protocol: TCP
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
memory: 2Gi
livenessProbe:
httpGet:
path: /
port: health
initialDelaySeconds: 15
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: health
initialDelaySeconds: 5
periodSeconds: 5
volumeMounts:
- name: config
mountPath: /etc/otelcol
volumes:
- name: config
configMap:
name: otel-collector-gateway-config
---
apiVersion: v1
kind: Service
metadata:
name: otel-collector-gateway
namespace: otel
labels:
app.kubernetes.io/name: otel-collector
app.kubernetes.io/component: gateway
spec:
type: ClusterIP
ports:
- name: otlp-grpc
port: 4317
targetPort: otlp-grpc
protocol: TCP
selector:
app.kubernetes.io/name: otel-collector
app.kubernetes.io/component: gateway