Skip to content

Commit 501809a

Browse files
committed
Update TFO-Collector endpoints
1 parent 1829315 commit 501809a

File tree

4 files changed

+318
-73
lines changed

4 files changed

+318
-73
lines changed

configs/otel-collector.yaml

Lines changed: 172 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,96 +5,230 @@
55
# TelemetryFlow Python SDK - Community Enterprise Observability Platform (CEOP)
66
# Copyright (c) 2024-2026 DevOpsCorner Indonesia. All rights reserved.
77
#
8-
# This configuration is for local development and testing.
9-
# For production, use the TelemetryFlow managed collector.
8+
# This config uses STANDARD OpenTelemetry Collector format.
9+
# Use with OTEL Collector Contrib: otelcol-contrib --config otel-collector.yaml
1010
#
1111
# =============================================================================
12+
# OTLP HTTP Endpoints (OCB/OTEL Community - v1 ONLY)
13+
# =============================================================================
14+
# Standard OpenTelemetry endpoints:
15+
# POST http://localhost:4318/v1/traces
16+
# POST http://localhost:4318/v1/metrics
17+
# POST http://localhost:4318/v1/logs
18+
#
19+
# gRPC:
20+
# localhost:4317
21+
#
22+
# NOTE: v2 endpoints are NOT supported in OCB builds.
23+
# Use TFO Standalone build for v2 endpoint support.
24+
#
25+
# =============================================================================
26+
# Features demonstrated:
27+
# - Metrics, Logs, Traces collection
28+
# - Exemplars support via spanmetrics connector
29+
# - Service graph generation
30+
# =============================================================================
1231

32+
# =============================================================================
33+
# RECEIVERS - How telemetry data enters the collector
34+
# =============================================================================
1335
receivers:
36+
# OTLP receiver for OpenTelemetry Protocol (metrics, logs, traces)
1437
otlp:
1538
protocols:
1639
grpc:
17-
endpoint: 0.0.0.0:4317
40+
endpoint: "0.0.0.0:4317"
41+
max_recv_msg_size_mib: 4
42+
max_concurrent_streams: 100
43+
read_buffer_size: 524288
44+
write_buffer_size: 524288
45+
keepalive:
46+
server_parameters:
47+
max_connection_idle: 15s
48+
max_connection_age: 30s
49+
max_connection_age_grace: 5s
50+
time: 10s
51+
timeout: 5s
1852
http:
19-
endpoint: 0.0.0.0:4318
53+
endpoint: "0.0.0.0:4318"
54+
cors:
55+
allowed_origins:
56+
- "*"
57+
allowed_headers:
58+
- "*"
59+
max_age: 7200
2060

61+
# =============================================================================
62+
# PROCESSORS - How telemetry data is processed
63+
# =============================================================================
2164
processors:
65+
# Batch processor for efficient data handling
2266
batch:
23-
timeout: 10s
24-
send_batch_size: 1024
25-
send_batch_max_size: 2048
67+
timeout: 200ms
68+
send_batch_size: 8192
69+
send_batch_max_size: 0
2670

71+
# Memory limiter to prevent OOM
2772
memory_limiter:
28-
check_interval: 5s
29-
limit_mib: 512
30-
spike_limit_mib: 128
73+
check_interval: 1s
74+
limit_percentage: 80
75+
spike_limit_percentage: 25
3176

77+
# Resource processor for adding attributes
3278
resource:
3379
attributes:
34-
- key: telemetryflow.sdk.language
35-
value: python
80+
- key: service.namespace
81+
value: telemetryflow
3682
action: upsert
37-
- key: telemetryflow.environment
83+
- key: deployment.environment
3884
value: development
3985
action: upsert
86+
- key: telemetryflow.sdk.language
87+
value: python
88+
action: upsert
4089

90+
# =============================================================================
91+
# CONNECTORS - Pipeline bridging for Exemplars and derived metrics
92+
# =============================================================================
93+
connectors:
94+
# Span metrics connector - derives metrics from traces with EXEMPLARS support
95+
# This enables metrics with trace exemplars for drill-down from metrics to traces
96+
spanmetrics:
97+
histogram:
98+
explicit:
99+
buckets: [1ms, 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1s, 2.5s, 5s, 10s]
100+
dimensions:
101+
- name: http.method
102+
default: GET
103+
- name: http.status_code
104+
- name: http.route
105+
- name: rpc.method
106+
- name: rpc.service
107+
exemplars:
108+
enabled: true # Enable exemplars for metrics-to-traces correlation
109+
namespace: traces
110+
metrics_flush_interval: 15s
111+
112+
# Service graph connector - builds service dependency graphs from traces
113+
servicegraph:
114+
latency_histogram_buckets: [1ms, 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1s, 2.5s, 5s, 10s]
115+
dimensions:
116+
- http.method
117+
- http.status_code
118+
store:
119+
ttl: 2s
120+
max_items: 1000
121+
cache_loop: 1s
122+
store_expiration_loop: 2s
123+
virtual_node_peer_attributes:
124+
- db.system
125+
- messaging.system
126+
- rpc.service
127+
128+
# =============================================================================
129+
# EXPORTERS - Where telemetry data is sent
130+
# =============================================================================
41131
exporters:
42-
# Debug exporter for development
132+
# Debug exporter for development/troubleshooting
43133
debug:
44134
verbosity: detailed
45135
sampling_initial: 5
46136
sampling_thereafter: 200
47137

48-
# OTLP exporter to Jaeger
49-
otlp/jaeger:
50-
endpoint: jaeger:4317
51-
tls:
52-
insecure: true
138+
# OTLP exporter to Jaeger (uncomment to enable)
139+
# otlp/jaeger:
140+
# endpoint: jaeger:4317
141+
# tls:
142+
# insecure: true
53143

54-
# Prometheus exporter for metrics
144+
# Prometheus exporter for metrics scraping (with exemplars support)
55145
prometheus:
56-
endpoint: 0.0.0.0:8889
146+
endpoint: "0.0.0.0:8889"
57147
namespace: telemetryflow
58148
const_labels:
149+
collector: tfo-collector
59150
sdk: python
151+
send_timestamps: true
152+
metric_expiration: 5m
153+
enable_open_metrics: true # Required for exemplars
154+
resource_to_telemetry_conversion:
155+
enabled: true
60156

61-
# Logging exporter
62-
logging:
63-
verbosity: normal
64-
sampling_initial: 2
65-
sampling_thereafter: 500
66-
157+
# =============================================================================
158+
# EXTENSIONS - Additional collector capabilities
159+
# =============================================================================
67160
extensions:
161+
# Health check extension
68162
health_check:
69-
endpoint: 0.0.0.0:13133
70-
71-
pprof:
72-
endpoint: 0.0.0.0:1777
163+
endpoint: "0.0.0.0:13133"
73164

165+
# zPages extension for debugging
74166
zpages:
75-
endpoint: 0.0.0.0:55679
167+
endpoint: "0.0.0.0:55679"
168+
169+
# pprof extension for profiling
170+
pprof:
171+
endpoint: "0.0.0.0:1777"
76172

173+
# =============================================================================
174+
# SERVICE - Defines active components and pipelines
175+
# =============================================================================
77176
service:
78-
extensions: [health_check, pprof, zpages]
177+
extensions: [health_check, zpages, pprof]
79178

80179
pipelines:
180+
# ==========================================================================
181+
# Traces pipeline - receives traces, exports to debug and spanmetrics connector
182+
# ==========================================================================
81183
traces:
82184
receivers: [otlp]
83185
processors: [memory_limiter, batch, resource]
84-
exporters: [debug, logging]
186+
exporters: [debug, spanmetrics, servicegraph] # Export to connectors for derived metrics
85187

188+
# ==========================================================================
189+
# Metrics pipeline - receives metrics from OTLP
190+
# ==========================================================================
86191
metrics:
87192
receivers: [otlp]
88193
processors: [memory_limiter, batch, resource]
89-
exporters: [debug, prometheus, logging]
90-
194+
exporters: [debug, prometheus]
195+
196+
# ==========================================================================
197+
# Metrics from traces pipeline - receives derived metrics from spanmetrics connector
198+
# These metrics include EXEMPLARS for correlation with traces
199+
# ==========================================================================
200+
metrics/spanmetrics:
201+
receivers: [spanmetrics]
202+
processors: [memory_limiter, batch]
203+
exporters: [prometheus]
204+
205+
# ==========================================================================
206+
# Metrics from service graph - receives service dependency metrics
207+
# ==========================================================================
208+
metrics/servicegraph:
209+
receivers: [servicegraph]
210+
processors: [memory_limiter, batch]
211+
exporters: [prometheus]
212+
213+
# ==========================================================================
214+
# Logs pipeline
215+
# ==========================================================================
91216
logs:
92217
receivers: [otlp]
93218
processors: [memory_limiter, batch, resource]
94-
exporters: [debug, logging]
219+
exporters: [debug]
95220

221+
# Internal telemetry configuration
96222
telemetry:
97223
logs:
98224
level: info
225+
encoding: json
226+
99227
metrics:
100-
address: 0.0.0.0:8888
228+
level: detailed
229+
readers:
230+
- pull:
231+
exporter:
232+
prometheus:
233+
host: "0.0.0.0"
234+
port: 8888

configs/tfo-collector.yaml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =============================================================================
22
# TelemetryFlow Collector Configuration (Standalone)
33
# =============================================================================
4-
# TelemetryFlow Go SDK - Community Enterprise Observability Platform (CEOP)
4+
# TelemetryFlow Python SDK - Community Enterprise Observability Platform (CEOP)
55
# Copyright (c) 2024-2026 DevOpsCorner Indonesia. All rights reserved.
66
#
77
# This configuration is for the TelemetryFlow Standalone binary only:
@@ -15,6 +15,22 @@
1515
# Copy to: /etc/tfo-collector/tfo-collector.yaml or ~/.tfo-collector/
1616
#
1717
# =============================================================================
18+
# OTLP HTTP Endpoints (TFO Standalone supports BOTH v1 and v2)
19+
# =============================================================================
20+
# TelemetryFlow Platform (Recommended):
21+
# POST http://localhost:4318/v2/traces
22+
# POST http://localhost:4318/v2/metrics
23+
# POST http://localhost:4318/v2/logs
24+
#
25+
# OTEL Community (Backwards Compatible):
26+
# POST http://localhost:4318/v1/traces
27+
# POST http://localhost:4318/v1/metrics
28+
# POST http://localhost:4318/v1/logs
29+
#
30+
# gRPC (Both versions via same port):
31+
# localhost:4317
32+
#
33+
# =============================================================================
1834
# Environment Variables
1935
# =============================================================================
2036
# TELEMETRYFLOW_API_KEY_ID - API Key ID for authentication (tfk_xxx)
@@ -24,6 +40,11 @@
2440
# TELEMETRYFLOW_COLLECTOR_NAME - Human-readable collector name (optional)
2541
# TELEMETRYFLOW_ENVIRONMENT - Deployment environment (optional)
2642
#
43+
# Example .env file:
44+
# TELEMETRYFLOW_API_KEY_ID=tfk_your_key_id
45+
# TELEMETRYFLOW_API_KEY_SECRET=tfs_your_key_secret
46+
# TELEMETRYFLOW_ENDPOINT=collector.telemetryflow.id:4317
47+
#
2748
# =============================================================================
2849

2950
# =============================================================================
@@ -51,15 +72,16 @@ collector:
5172
# Collector hostname (auto-detected if empty)
5273
hostname: ""
5374
# Human-readable collector name
54-
name: "${TELEMETRYFLOW_COLLECTOR_NAME:-TelemetryFlow SDK Collector}"
75+
name: "${TELEMETRYFLOW_COLLECTOR_NAME:-TelemetryFlow Python SDK Collector}"
5576
# Human-readable description
56-
description: "TelemetryFlow SDK - Community Enterprise Observability Platform"
77+
description: "TelemetryFlow Python SDK - Community Enterprise Observability Platform"
5778
# Collector version (auto-populated at build time)
5879
version: ""
5980
# Custom tags for labeling and filtering
6081
tags:
6182
environment: "${TELEMETRYFLOW_ENVIRONMENT:-development}"
62-
datacenter: "tfo-sdk"
83+
datacenter: "tfo-python-sdk"
84+
sdk_language: "python"
6385

6486
# =============================================================================
6587
# RECEIVERS - How telemetry data enters the collector
@@ -118,6 +140,9 @@ processors:
118140
- key: deployment.environment
119141
value: "${TELEMETRYFLOW_ENVIRONMENT:-development}"
120142
action: upsert
143+
- key: telemetryflow.sdk.language
144+
value: python
145+
action: upsert
121146

122147
# =============================================================================
123148
# CONNECTORS - Pipeline bridging for Exemplars and derived metrics
@@ -172,17 +197,12 @@ exporters:
172197
namespace: telemetryflow
173198
const_labels:
174199
collector: tfo-collector
200+
sdk: python
175201
send_timestamps: true
176202
metric_expiration: 5m
177203
enable_open_metrics: true
178204
resource_to_telemetry_conversion: true
179205

180-
# OTLP exporter to Jaeger (uncomment to enable)
181-
# otlp/jaeger:
182-
# endpoint: "jaeger:4317"
183-
# tls:
184-
# insecure: true
185-
186206
# OTLP exporter for forwarding to TelemetryFlow backend (uncomment to enable)
187207
# otlp:
188208
# endpoint: "${TELEMETRYFLOW_ENDPOINT:-localhost:4317}"

0 commit comments

Comments
 (0)