Skip to content

Commit df8f1a9

Browse files
committed
Accomplish tasks 4 IAM Module
2 parents d3510bc + db9f242 commit df8f1a9

11 files changed

Lines changed: 232 additions & 107 deletions

File tree

.env.example

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ OTEL_ENABLED=true
238238

239239
# Service identification
240240
OTEL_SERVICE_NAME=telemetryflow-core
241-
SERVICE_VERSION=1.1.2
241+
SERVICE_VERSION=1.1.4
242242
SERVICE_NAMESPACE=devopscorner
243243
SERVICE_TEAM=core
244244

@@ -287,7 +287,7 @@ CLICKHOUSE_PASSWORD=telemetryflow123
287287
# - TTL: 90 days (audit logs)
288288

289289
#================================================================================================
290-
# POSTGRESQL CONFIGURATION
290+
# DATABASE CONFIGURATION
291291
#================================================================================================
292292
# IMPORTANT: PostgreSQL configuration is managed in config/postgresql/
293293
# - postgresql.conf: Server settings (connections, memory, performance)
@@ -297,15 +297,22 @@ CLICKHOUSE_PASSWORD=telemetryflow123
297297
# Development: Default postgres user acceptable for local testing
298298
# Production: Create dedicated user with restricted permissions, strong password
299299
#
300-
# Connection Settings:
300+
# PostgreSQL Configuration
301301
POSTGRES_HOST=172.151.151.20
302302
POSTGRES_PORT=5432
303303
POSTGRES_DB=telemetryflow_db
304304
POSTGRES_USERNAME=postgres
305305
POSTGRES_PASSWORD=telemetryflow123
306306

307+
# ClickHouse Configuration
308+
CLICKHOUSE_HOST=localhost
309+
CLICKHOUSE_PORT=8123
310+
CLICKHOUSE_DB=telemetryflow_db
311+
CLICKHOUSE_USER=default
312+
CLICKHOUSE_PASSWORD=telemetryflow123
313+
307314
#================================================================================================
308-
# JWT & SESSION CONFIGURATION
315+
# TFO API & SECRET, JWT & SESSION CONFIGURATION
309316
#================================================================================================
310317
# 🔒 SECURITY CRITICAL: These secrets MUST be changed in production
311318
#
@@ -321,6 +328,9 @@ POSTGRES_PASSWORD=telemetryflow123
321328
# Or manually with Node.js:
322329
# node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
323330
#
331+
TELEMETRYFLOW_API_KEY_ID=tfk_
332+
TELEMETRYFLOW_API_KEY_SECRET=tfs_
333+
324334
# JWT Secret (Token signing)
325335
# Development: Use a simple secret for testing
326336
# Production: Generate a 32+ character random string
@@ -417,7 +427,7 @@ CLICKHOUSE_VERSION=latest
417427
# Monitoring
418428
OTEL_VERSION=latest
419429
PROMETHEUS_VERSION=latest
420-
JAEGER_VERSION=2.2.0
430+
JAEGER_VERSION=2.13.0
421431
GRAFANA_VERSION=latest
422432

423433
# Management Tools

.kiro/specs/iam-module-standardization/tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ This implementation plan transforms the IAM module standardization design into a
5656
- Validate test naming conventions
5757
- _Requirements: 2.6, 2.7, 2.8, 2.9, 2.10_
5858

59-
- [ ] 3.4 Write integration tests for coverage analyzer
59+
- [x] 3.4 Write integration tests for coverage analyzer
6060
- Test with real Jest coverage data
6161
- Test threshold validation with various coverage scenarios
6262
- Test layer-specific analysis accuracy
6363
- _Requirements: 2.1, 2.2, 2.3, 2.4, 2.5_
6464

65-
- [ ] 4. Checkpoint - Ensure documentation and coverage tools work
65+
- [x] 4. Checkpoint - Ensure documentation and coverage tools work
6666
- Ensure all tests pass, ask the user if questions arise.
6767

6868
- [ ] 5. Implement file structure validation and fixing

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,40 @@ curl http://localhost:3000/api
602602
- **OTEL Collector**: 172.151.151.30:4317/4318
603603
- **Prometheus**: 172.151.151.50:9090
604604

605+
### OTEL Collector Ports
606+
607+
| Port | Protocol | Description |
608+
| ----- | -------- | --------------------- |
609+
| 4317 | gRPC | OTLP gRPC (v1 & v2) |
610+
| 4318 | HTTP | OTLP HTTP (v1 & v2) |
611+
| 8888 | HTTP | OTEL Collector metrics|
612+
| 8889 | HTTP | Prometheus exporter |
613+
| 13133 | HTTP | Health check |
614+
| 55679 | HTTP | zPages (debugging) |
615+
| 1777 | HTTP | pprof (profiling) |
616+
617+
### OTLP Endpoints (Dual Ingestion)
618+
619+
The collector supports both TelemetryFlow (v2) and OTEL Community (v1) endpoints:
620+
621+
**TelemetryFlow Platform (Recommended):**
622+
623+
```text
624+
POST http://localhost:4318/v2/traces
625+
POST http://localhost:4318/v2/metrics
626+
POST http://localhost:4318/v2/logs
627+
```
628+
629+
**OTEL Community (Backwards Compatible):**
630+
631+
```text
632+
POST http://localhost:4318/v1/traces
633+
POST http://localhost:4318/v1/metrics
634+
POST http://localhost:4318/v1/logs
635+
```
636+
637+
**gRPC:** `localhost:4317` (both v1 and v2)
638+
605639
## Database Schema
606640

607641
### Core Tables

config/otel/otel-collector.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,16 @@ exporters:
267267
# num_consumers: 10
268268
# queue_size: 1000
269269

270-
# OTLP exporter to Jaeger (uncomment to enable)
271-
# otlp/jaeger:
272-
# endpoint: "jaeger:4317"
273-
# tls:
274-
# insecure: true
270+
# OTLP exporter to Jaeger V2 (native OTLP support)
271+
otlp/jaeger:
272+
endpoint: "jaeger:4317"
273+
tls:
274+
insecure: true
275+
retry_on_failure:
276+
enabled: true
277+
initial_interval: 5s
278+
max_interval: 30s
279+
max_elapsed_time: 300s
275280

276281
# Loki exporter for logs (uncomment to enable)
277282
# loki:
@@ -348,12 +353,12 @@ service:
348353

349354
pipelines:
350355
# ==========================================================================
351-
# Traces pipeline - receives traces, exports to debug and spanmetrics connector
356+
# Traces pipeline - receives traces, exports to Jaeger, debug, and spanmetrics connector
352357
# ==========================================================================
353358
traces:
354359
receivers: [otlp]
355360
processors: [memory_limiter, batch, resource]
356-
exporters: [debug, spanmetrics, servicegraph] # Export to connectors for derived metrics
361+
exporters: [otlp/jaeger, debug, spanmetrics, servicegraph] # Export traces to Jaeger + connectors
357362

358363
# ==========================================================================
359364
# Metrics pipeline - receives metrics from OTLP
File renamed without changes.
File renamed without changes.
File renamed without changes.

config/otel/tfo-collector.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,18 @@ exporters:
192192
sampling_initial: 5
193193
sampling_thereafter: 200
194194

195+
# OTLP exporter for Jaeger V2 (native OTLP support)
196+
# Jaeger V2 listens on 4317 (gRPC) and 4318 (HTTP) by default
197+
otlp/jaeger:
198+
endpoint: "${JAEGER_OTLP_ENDPOINT:-jaeger:4317}"
199+
tls:
200+
insecure: true
201+
retry_on_failure:
202+
enabled: true
203+
initial_interval: 5s
204+
max_interval: 30s
205+
max_elapsed_time: 300s
206+
195207
# Prometheus exporter for metrics scraping (with exemplars support)
196208
prometheus:
197209
endpoint: "0.0.0.0:8889"
@@ -271,11 +283,11 @@ service:
271283
extensions: [health_check, zpages, pprof]
272284

273285
pipelines:
274-
# Traces pipeline - receives traces, exports to debug and spanmetrics connector
286+
# Traces pipeline - receives traces, exports to Jaeger, debug, and spanmetrics connector
275287
traces:
276288
receivers: [otlp]
277289
processors: [memory_limiter, batch, resource]
278-
exporters: [debug, spanmetrics, servicegraph]
290+
exporters: [otlp/jaeger, debug, spanmetrics, servicegraph]
279291

280292
# Metrics pipeline - receives metrics from OTLP
281293
metrics:

docker-compose.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -263,39 +263,55 @@ services:
263263
#----------------------------------------------------------------------------------------------
264264
# OTEL COLLECTOR - OpenTelemetry Collector
265265
#----------------------------------------------------------------------------------------------
266+
# Supports dual ingestion: v1 (OTEL standard) and v2 (TelemetryFlow enhanced)
267+
#
268+
# OTLP HTTP Endpoints:
269+
# TelemetryFlow Platform (Recommended - TFO Standalone):
270+
# POST http://localhost:4318/v2/traces
271+
# POST http://localhost:4318/v2/metrics
272+
# POST http://localhost:4318/v2/logs
273+
#
274+
# OTEL Community (Backwards Compatible - OCB/Standard):
275+
# POST http://localhost:4318/v1/traces
276+
# POST http://localhost:4318/v1/metrics
277+
# POST http://localhost:4318/v1/logs
278+
#
279+
# gRPC (Both versions via same port): localhost:4317
280+
#----------------------------------------------------------------------------------------------
266281
otel-collector:
267282
profiles: ["monitoring", "all"]
268283
platform: linux/amd64
269284
# =============================================================================
270-
# OTEL Collector Community Contributor (Standard OTEL format)
271-
# image: otel/opentelemetry-collector-contrib:${OTEL_VERSION:-0.142.0}
272-
# command: ["--config=/etc/otelcol-contrib/config.yaml"]
285+
# TelemetryFlow Collector (TFO-Collector) - Custom TFO format with OTLP support (v1.1.1+)
286+
image: telemetryflow/telemetryflow-collector:${TFO_VERSION:-latest}
287+
# command: ["--config=/etc/tfo-collector/tfo-collector.yaml"]
273288
# =============================================================================
274289
# TelemetryFlow Collector OCB (TFO-Collector-OCB) - Standard OTEL format
275-
image: telemetryflow/telemetryflow-collector-ocb:${OTEL_VERSION:-latest}
276-
command: ["--config=/etc/tfo-collector/otel-collector.yaml"]
290+
# image: telemetryflow/telemetryflow-collector-ocb:${TFO_VERSION:-latest}
291+
# command: ["--config=/etc/tfo-collector/otel-collector.yaml"]
277292
# =============================================================================
278-
# TelemetryFlow Collector (TFO-Collector) - Custom TFO format (OTLP not implemented yet)
279-
# image: telemetryflow/telemetryflow-collector:${OTEL_VERSION:-latest}
280-
# command: ["--config=/etc/tfo-collector/tfo-collector.yaml"]
293+
# OTEL Collector Community Contributor (Standard OTEL format)
294+
# image: otel/opentelemetry-collector-contrib:${OTEL_VERSION:-0.142.0}
295+
# command: ["--config=/etc/otelcol-contrib/config.yaml"]
281296
# =============================================================================
282297
container_name: ${CONTAINER_OTEL:-telemetryflow_core_otel}
283298
restart: unless-stopped
284299
volumes:
285-
# OTEL Collector Community Contributor config
286-
# - ./config/otel/otel-collector.yaml:/etc/otelcol-contrib/config.yaml:ro
300+
# TelemetryFlow Collector config (Custom TFO format)
301+
- ./config/otel/tfo-collector.yaml:/etc/tfo-collector/tfo-collector.yaml:ro
287302
# =============================================================================
288303
# TelemetryFlow Collector OCB config (Standard OTEL format)
289-
- ./config/otel/otel-collector.yaml:/etc/tfo-collector/otel-collector.yaml:ro
304+
# - ./config/otel/otel-collector.yaml:/etc/tfo-collector/otel-collector.yaml:ro
290305
# =============================================================================
291-
# TelemetryFlow Collector config (Custom TFO format)
292-
# - ./config/otel/tfo-collector.yaml:/etc/tfo-collector/tfo-collector.yaml:ro
306+
# OTEL Collector Community Contributor config (Standard OTEL format)
307+
# - ./config/otel/otel-collector.yaml:/etc/otelcol-contrib/config.yaml:ro
293308
ports:
294-
- "${PORT_OTEL_GRPC:-4317}:4317" # OTLP gRPC
295-
- "${PORT_OTEL_HTTP:-4318}:4318" # OTLP HTTP
309+
- "${PORT_OTEL_GRPC:-4317}:4317" # OTLP gRPC (v1 & v2)
310+
- "${PORT_OTEL_HTTP:-4318}:4318" # OTLP HTTP (v1 & v2)
296311
- "${PORT_OTEL_METRICS:-8889}:8889" # Prometheus metrics
297312
- "${PORT_OTEL_HEALTH:-13133}:13133" # Health check
298-
- "${PORT_OTEL_ZPAGES:-55679}:55679" # zPage
313+
- "${PORT_OTEL_ZPAGES:-55679}:55679" # zPages
314+
- "${PORT_OTEL_PPROF:-1777}:1777" # pprof
299315
healthcheck:
300316
test: ["CMD", "wget", "--spider", "-q", "http://localhost:13133"]
301317
interval: 10s
@@ -312,7 +328,7 @@ services:
312328
jaeger:
313329
profiles: ["monitoring", "all"]
314330
platform: linux/amd64
315-
image: jaegertracing/jaeger:${JAEGER_VERSION:-2.2.0}
331+
image: jaegertracing/jaeger:${JAEGER_VERSION:-2.13.0}
316332
container_name: ${CONTAINER_JAEGER:-telemetryflow_core_jaeger}
317333
restart: unless-stopped
318334
ports:

docs/DOCKER_SETUP.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,19 @@ curl http://localhost:3000/health
262262
open http://localhost:3000/api
263263
```
264264

265-
### 4. OTEL Collector
265+
### 4. TFO-Collector (OTEL Collector)
266266

267267
**Configuration**:
268-
- **Image**: otel/opentelemetry-collector-contrib:latest
269-
- **Config**: ./config/otel/otel-collector-config-spm.yaml
270-
- **Ports**: 4317 (gRPC), 4318 (HTTP), 8889 (metrics)
268+
- **Image**: telemetryflow/telemetryflow-collector:latest (v1.1.1+)
269+
- **Config**: ./config/otel/tfo-collector.yaml
270+
- **Ports**: 4317 (gRPC), 4318 (HTTP), 8889 (metrics), 13133 (health)
271+
- **Features**: 100% OTLP compliant, SpanMetrics, ServiceGraph
272+
273+
**Key Capabilities**:
274+
- OTLP gRPC/HTTP receivers and exporters
275+
- Native Jaeger V2 integration via OTLP
276+
- SpanMetrics connector with exemplars
277+
- ServiceGraph connector for dependencies
271278

272279
**Check Status**:
273280
```bash
@@ -276,14 +283,18 @@ curl http://localhost:13133
276283

277284
# Metrics
278285
curl http://localhost:8889/metrics
286+
287+
# zPages debugging
288+
open http://localhost:55679/debug/tracez
279289
```
280290

281-
### 5. Jaeger
291+
### 5. Jaeger V2
282292

283293
**Configuration**:
284-
- **Image**: jaegertracing/jaeger:2.2.0
294+
- **Image**: jaegertracing/jaeger:2.13.0
285295
- **Storage**: Memory (for development)
286-
- **Metrics**: Prometheus integration
296+
- **Metrics**: Prometheus integration via SPM
297+
- **Protocol**: Native OTLP support (receives from TFO-Collector)
287298

288299
**Access UI**:
289300
```bash
@@ -678,14 +689,16 @@ docker exec telemetryflow_core_clickhouse clickhouse-client --query "SELECT data
678689
- [Docker Compose Profiles](https://docs.docker.com/compose/profiles/)
679690
- [PostgreSQL Docker](https://hub.docker.com/_/postgres)
680691
- [ClickHouse Docker](https://hub.docker.com/r/clickhouse/clickhouse-server)
692+
- [TelemetryFlow Collector](https://github.com/telemetryflow/telemetryflow-collector) - Custom OTEL Collector with 100% OTLP compliance
681693
- [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/)
682-
- [Jaeger Documentation](https://www.jaegertracing.io/docs/)
694+
- [Jaeger V2 Documentation](https://www.jaegertracing.io/docs/)
683695
- [Prometheus Documentation](https://prometheus.io/docs/)
684696
- [Grafana Documentation](https://grafana.com/docs/)
685697
- [Portainer Documentation](https://docs.portainer.io/)
686698

687699
---
688700

689-
**Last Updated**: 2025-12-05
690-
**Docker Compose Version**: 2.x
701+
**Last Updated**: 2026-01-01
702+
**Docker Compose Version**: 2.x
691703
**Network**: 172.151.0.0/16
704+
**TFO-Collector Version**: v1.1.1+

0 commit comments

Comments
 (0)