-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
402 lines (308 loc) · 14 KB
/
Copy path.env.example
File metadata and controls
402 lines (308 loc) · 14 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
#================================================================================================
# TelemetryFlow Python MCP Server - ENVIRONMENT CONFIGURATION
#================================================================================================
#
# Copy this file to .env and update the values.
# Compatible with TFO-Collector v1.2.1 (OCB-native).
#
# SECURITY NOTICE:
# This file contains DEFAULT VALUES suitable for DEVELOPMENT ONLY.
# DO NOT use these values in production environments.
#
# Quick Start: README.md
# Documentation: docs/
#
#================================================================================================
#================================================================================================
# [1] APPLICATION CONFIGURATION
#================================================================================================
APP_NAME=TelemetryFlow Python MCP
# Timezone
TZ=UTC
# Log level: debug | info | warn | error
LOG_LEVEL=info
# Log format: json | pretty
LOG_FORMAT=json
# Docker Image Version
VERSION=1.2.0
GIT_COMMIT=
GIT_BRANCH=main
BUILD_TIME=
# Docker Image
IMAGE_NAME=telemetryflow/telemetryflow-python-mcp
IMAGE_TAG=1.2.0
#================================================================================================
# [2] MCP SERVER — CORE SETTINGS
#================================================================================================
# Anthropic API Key (required for Claude integration)
ANTHROPIC_API_KEY=your-anthropic-api-key-here
# Server host (default: localhost)
TELEMETRYFLOW_MCP_SERVER_HOST=localhost
# Server port (default: 8080)
TELEMETRYFLOW_MCP_SERVER_PORT=8080
# Transport type: stdio | sse | websocket (default: stdio)
TELEMETRYFLOW_MCP_SERVER_TRANSPORT=stdio
# Debug mode (default: false)
TELEMETRYFLOW_MCP_DEBUG=false
# Default Claude model
TELEMETRYFLOW_MCP_CLAUDE_DEFAULT_MODEL=claude-sonnet-4-20250514
#================================================================================================
# [3] MCP SERVER — MCP PROTOCOL
#================================================================================================
# Enable tools capability (default: true)
TELEMETRYFLOW_MCP_ENABLE_TOOLS=true
# Enable resources capability (default: true)
TELEMETRYFLOW_MCP_ENABLE_RESOURCES=true
# Enable prompts capability (default: true)
TELEMETRYFLOW_MCP_ENABLE_PROMPTS=true
# Enable logging capability (default: true)
TELEMETRYFLOW_MCP_ENABLE_LOGGING=true
#================================================================================================
# [4] TELEMETRYFLOW SDK — CORE SETTINGS
#================================================================================================
# API Keys (obtain from TFO-Platform backend)
TELEMETRYFLOW_API_KEY_ID=tfk_your_key_id
TELEMETRYFLOW_API_KEY_SECRET=tfs_your_key_secret
# OTLP Exporter endpoint (gRPC by default)
# Local: localhost:4317
# Docker: otel-collector:4317
# Host from Docker: host.docker.internal:4317
TELEMETRYFLOW_ENDPOINT=localhost:4317
# Service Identity
TELEMETRYFLOW_SERVICE_NAME=telemetryflow-python-mcp
TELEMETRYFLOW_SERVICE_VERSION=1.2.0
TELEMETRYFLOW_SERVICE_NAMESPACE=telemetryflow
TELEMETRYFLOW_ENVIRONMENT=development
# SECURITY WARNING: TELEMETRYFLOW_INSECURE=true disables TLS — ONLY for development
TELEMETRYFLOW_INSECURE=false
#================================================================================================
# [5] SDK — TFO v2 API SETTINGS (aligned with tfoexporter)
#================================================================================================
# Enable TFO v2 API (default: true)
TELEMETRYFLOW_USE_V2_API=true
# Enable v2-only mode — disables v1 endpoints (default: false)
TELEMETRYFLOW_V2_ONLY=false
# Custom endpoint paths (defaults to v2 when USE_V2_API=true)
# TELEMETRYFLOW_TRACES_ENDPOINT=/v2/traces
# TELEMETRYFLOW_METRICS_ENDPOINT=/v2/metrics
# TELEMETRYFLOW_LOGS_ENDPOINT=/v2/logs
#================================================================================================
# [6] SDK — COLLECTOR IDENTITY (aligned with tfoidentityextension)
#================================================================================================
TELEMETRYFLOW_COLLECTOR_ID=
TELEMETRYFLOW_COLLECTOR_NAME=TelemetryFlow Python MCP
TELEMETRYFLOW_COLLECTOR_HOSTNAME=
TELEMETRYFLOW_DATACENTER=default
# Enable resource enrichment (default: true)
TELEMETRYFLOW_ENRICH_RESOURCES=true
#================================================================================================
# [7] SDK — PROTOCOL SETTINGS
#================================================================================================
# Protocol: grpc | http (default: grpc)
TELEMETRYFLOW_PROTOCOL=grpc
# Enable compression (default: false)
TELEMETRYFLOW_COMPRESSION=false
# Timeout in seconds (default: 10)
TELEMETRYFLOW_TIMEOUT=10
#================================================================================================
# [8] SDK — RETRY SETTINGS
#================================================================================================
# Enable retry (default: true)
TELEMETRYFLOW_RETRY_ENABLED=true
# Max retries (default: 3)
TELEMETRYFLOW_MAX_RETRIES=3
# Retry backoff in milliseconds (default: 500)
TELEMETRYFLOW_RETRY_BACKOFF=500
#================================================================================================
# [9] SDK — BATCH SETTINGS
#================================================================================================
# Batch timeout in milliseconds (default: 5000)
TELEMETRYFLOW_BATCH_TIMEOUT=5000
# Max batch size (default: 512)
TELEMETRYFLOW_BATCH_MAX_SIZE=512
#================================================================================================
# [10] SDK — SIGNALS
#================================================================================================
# Enable specific signals (all enabled by default)
TELEMETRYFLOW_ENABLE_TRACES=true
TELEMETRYFLOW_ENABLE_METRICS=true
TELEMETRYFLOW_ENABLE_LOGS=true
# Enable exemplars for metrics-to-traces correlation (default: true)
TELEMETRYFLOW_ENABLE_EXEMPLARS=true
#================================================================================================
# [11] SDK — RATE LIMITING
#================================================================================================
# Maximum requests per second (0 = unlimited)
TELEMETRYFLOW_RATE_LIMIT=0
#================================================================================================
# [12] MCP SERVER — REDIS (Caching & Queue)
#================================================================================================
# Redis connection URL
TELEMETRYFLOW_MCP_REDIS_URL=redis://localhost:6379
# Enable caching (default: true)
TELEMETRYFLOW_MCP_CACHE_ENABLED=true
# Cache TTL in seconds (default: 300)
TELEMETRYFLOW_MCP_CACHE_TTL=300
# Enable queue processing (default: true)
TELEMETRYFLOW_MCP_QUEUE_ENABLED=true
# Queue concurrency (default: 5)
TELEMETRYFLOW_MCP_QUEUE_CONCURRENCY=5
#================================================================================================
# [13] MCP SERVER — DATABASE (PostgreSQL)
#================================================================================================
# PostgreSQL connection URL
TELEMETRYFLOW_MCP_POSTGRES_URL=postgres://postgres:postgres@localhost:5432/telemetryflow_mcp?sslmode=disable
# Connection pool settings
TELEMETRYFLOW_MCP_POSTGRES_MAX_CONNS=25
TELEMETRYFLOW_MCP_POSTGRES_MIN_CONNS=5
#================================================================================================
# [14] MCP SERVER — ANALYTICS (ClickHouse)
#================================================================================================
# ClickHouse connection URL
TELEMETRYFLOW_MCP_CLICKHOUSE_URL=clickhouse://localhost:9000/telemetryflow_mcp
#================================================================================================
# [15] TFO-COLLECTOR
#================================================================================================
# TFO-Collector version (OCB-native build with tfoexporter)
TFO_COLLECTOR_VERSION=1.2.1
# OTEL Collector Community version (alternative — standard OCB build)
OTEL_VERSION=0.142.0
# TFO Backend endpoint — where TFO-Collector forwards telemetry via tfo exporter
# Local: http://localhost:3000
# Docker: http://host.docker.internal:3000
# K8s: http://tfo-backend.telemetryflow.svc.cluster.local:3100
TELEMETRYFLOW_BACKEND_ENDPOINT=http://localhost:3000
#================================================================================================
# [16] PROMETHEUS (Metrics Visualization)
#================================================================================================
PROMETHEUS_VERSION=v3.4.0
PORT_PROMETHEUS=9090
#================================================================================================
# [17] TFO-PLATFORM SERVICES (Profile: platform)
#================================================================================================
# TFO-Platform version (backend + frontend images)
TFO_PLATFORM_VERSION=1.4.0
# PostgreSQL
POSTGRES_VERSION=16-alpine
POSTGRES_DB=telemetryflow_db
POSTGRES_USERNAME=tfo_admin
POSTGRES_PASSWORD=
PORT_POSTGRES=5432
# ClickHouse
CLICKHOUSE_VERSION=latest
CLICKHOUSE_DB=telemetryflow_db
CLICKHOUSE_USER=tfo_admin
CLICKHOUSE_PASSWORD=
PORT_CLICKHOUSE_HTTP=8123
PORT_CLICKHOUSE_NATIVE=9000
# Redis
REDIS_VERSION=7-alpine
REDIS_PASSWORD=
REDIS_MAX_MEMORY=512mb
PORT_REDIS=6379
# NATS
NATS_VERSION=2-alpine
NATS_URL=nats://localhost:4222
NATS_CLUSTER_ID=telemetryflow-cluster
PORT_NATS_CLIENT=4222
PORT_NATS_MONITOR=8222
# TFO-Backend (NestJS API)
NODE_ENV=development
PORT_BACKEND=3000
ENABLE_BULLMQ=true
JWT_SECRET=
JWT_EXPIRES_IN=24h
SESSION_SECRET=
CORS_ORIGIN=http://localhost:8080
LOGGER_TYPE=winston
LOG_PRETTY_PRINT=false
OTEL_SERVICE_NAME=telemetryflow-platform
# TFO-Viz (Frontend)
PORT_FRONTEND=8080
#================================================================================================
# [18] DOCKER COMPOSE / VOLUMES
#================================================================================================
VOLUMES_BASE_PATH=/opt/data/docker/telemetryflow-mcp
VOLUMES_DRIVER=local
#================================================================================================
# [19] SERVICE VERSIONS
#================================================================================================
PYTHON_VERSION=3.12
OTEL_PYTHON_SDK_VERSION=1.42.1
OTEL_PYTHON_INSTRUMENTATION_VERSION=0.63b1
#================================================================================================
# [20] CONTAINER NAMES
#================================================================================================
# MCP Services
CONTAINER_NAME=telemetryflow_mcp_server
CONTAINER_NAME_DEV=telemetryflow_mcp_dev
# Monitoring Services
CONTAINER_OTEL=telemetryflow_mcp_tfo_collector
CONTAINER_PROMETHEUS=telemetryflow_mcp_prometheus
# Platform Services
CONTAINER_POSTGRES=telemetryflow_mcp_postgres
CONTAINER_CLICKHOUSE=telemetryflow_mcp_clickhouse
CONTAINER_REDIS=telemetryflow_mcp_redis
CONTAINER_NATS=telemetryflow_mcp_nats
CONTAINER_BACKEND=telemetryflow_mcp_backend
CONTAINER_FRONTEND=telemetryflow_mcp_frontend
#================================================================================================
# [21] PORT MAPPINGS
#================================================================================================
# TFO-Collector (OTLP)
PORT_OTEL_GRPC=4317
PORT_OTEL_HTTP=4318
PORT_OTEL_METRICS=8889
PORT_OTEL_HEALTH=13133
PORT_OTEL_ZPAGES=55679
PORT_OTEL_PPROF=1777
#================================================================================================
# [22] STATIC IP ADDRESSES (Docker internal networking)
#================================================================================================
# Network Subnet: 172.154.0.0/16 (MCP uses 172.154.x.x, Python SDK uses 172.153.x.x, Go SDK uses 172.152.x.x, Platform uses 172.151.x.x)
# MCP Services
CONTAINER_IP_MCP_SERVER=172.154.154.10
CONTAINER_IP_MCP_DEV=172.154.154.11
# Monitoring Services
CONTAINER_IP_OTEL=172.154.154.30
CONTAINER_IP_PROMETHEUS=172.154.154.70
# Platform Services
CONTAINER_IP_POSTGRES=172.154.155.20
CONTAINER_IP_CLICKHOUSE=172.154.155.40
CONTAINER_IP_REDIS=172.154.155.50
CONTAINER_IP_NATS=172.154.155.55
CONTAINER_IP_BACKEND=172.154.155.10
CONTAINER_IP_FRONTEND=172.154.155.15
#================================================================================================
# [23] SECURITY
#================================================================================================
# Require API key for requests
# TELEMETRYFLOW_MCP_SECURITY_REQUIRE_API_KEY=false
# Rate limit per minute
# TELEMETRYFLOW_MCP_SECURITY_RATE_LIMIT_PER_MINUTE=100
SECRET_KEY=
JWT_SECRET_KEY=
JWT_EXPIRES=3600
#================================================================================================
# [24] RESOURCE LIMITS (for Docker deployments)
#================================================================================================
MEMORY_LIMIT=512M
CPU_LIMIT=1.0
#================================================================================================
# PRODUCTION DEPLOYMENT CHECKLIST
#================================================================================================
#
# [ ] TELEMETRYFLOW_API_KEY_ID / TELEMETRYFLOW_API_KEY_SECRET set to valid platform keys
# [ ] ANTHROPIC_API_KEY set to a valid Anthropic API key
# [ ] TELEMETRYFLOW_ENVIRONMENT set to production
# [ ] TELEMETRYFLOW_INSECURE set to false (enable TLS)
# [ ] SECRET_KEY / JWT_SECRET_KEY changed from defaults
# [ ] JWT_SECRET / SESSION_SECRET changed from development defaults
# [ ] POSTGRES_PASSWORD / CLICKHOUSE_PASSWORD changed from defaults
# [ ] TELEMETRYFLOW_ENDPOINT points to production collector
# [ ] TELEMETRYFLOW_BACKEND_ENDPOINT points to production backend
# [ ] HTTPS/TLS enabled at reverse proxy (nginx/traefik)
# [ ] CORS_ORIGIN set to specific trusted domains (no wildcard)
# [ ] Resource limits configured appropriately
#
#================================================================================================