forked from Azure-Samples/cosmos-aks-keda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopen-telemetry-collector-appinsights.yaml
146 lines (145 loc) · 3.5 KB
/
open-telemetry-collector-appinsights.yaml
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
140
141
142
143
144
145
146
## namespace
apiVersion: v1
kind: Namespace
metadata:
name: otel
---
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-conf
namespace: otel
labels:
app: opentelemetry
component: otel-collector-conf
data:
otel-collector-config: |
receivers:
otlp:
protocols:
grpc:
zipkin:
endpoint: 0.0.0.0:9411
processors:
batch:
memory_limiter:
check_interval: 5s
limit_mib: 4000
spike_limit_mib: 500
extensions:
health_check:
pprof:
endpoint: :1888
zpages:
endpoint: :55679
exporters:
logging:
loglevel: debug
azuremonitor:
endpoint: "https://dc.services.visualstudio.com/v2/track"
# SET APP INSIGHTS INSTRUMENTATION KEY HERE:
instrumentation_key: "2a5c619f-d846-4496-917e-eb8128c7b49e"
# maxbatchsize is the maximum number of items that can be
# queued before calling to the configured endpoint
maxbatchsize: 100
# maxbatchinterval is the maximum time to wait before calling
# the configured endpoint.
maxbatchinterval: 10s
prometheus:
endpoint: :9102
resource_to_telemetry_conversion:
enabled: true
# send_timestamps: true
service:
extensions: [pprof, zpages, health_check]
pipelines:
traces:
receivers: [otlp, zipkin]
processors: [memory_limiter, batch]
exporters: [azuremonitor]
metrics:
receivers: [otlp, zipkin]
processors: [memory_limiter, batch]
exporters: [prometheus]
logs:
receivers: [otlp, zipkin]
processors: [memory_limiter, batch]
exporters: [azuremonitor]
---
apiVersion: v1
kind: Service
metadata:
name: otel-collector
namespace: otel
labels:
app: opencesus
component: otel-collector
spec:
ports:
- name: zipkin # Default endpoint for Zipkin receiver.
port: 9411
protocol: TCP
targetPort: 9411
- name: otlp
port: 4317
protocol: TCP
targetPort: 4317
selector:
component: otel-collector
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: otel-collector
namespace: otel
labels:
app: opentelemetry
component: otel-collector
spec:
replicas: 1 # scale out based on your usage
selector:
matchLabels:
app: opentelemetry
template:
metadata:
labels:
app: opentelemetry
component: otel-collector
annotations:
prometheus.io/scrape: 'true'
spec:
containers:
- name: otel-collector
image: otel/opentelemetry-collector-contrib:0.77.0
command:
- "/otelcol-contrib"
- "--config=/conf/otel-collector-config.yaml"
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 200m
memory: 400Mi
ports:
- containerPort: 9411 # Default endpoint for Zipkin receiver.
- containerPort: 4317
- containerPort: 9102
volumeMounts:
- name: otel-collector-config-vol
mountPath: /conf
livenessProbe:
httpGet:
path: /
port: 13133
readinessProbe:
httpGet:
path: /
port: 13133
volumes:
- configMap:
name: otel-collector-conf
items:
- key: otel-collector-config
path: otel-collector-config.yaml
name: otel-collector-config-vol