OTEL Collector服务已停止仍持续导出数据问题求助
OTEL Collector 异常行为排查:已停止实例指标持续导出问题
问题现象
- 仅单个应用运行,该应用上报带累积时态的异步
runtime.uptime计数器指标,但仪表盘显示最近一分钟内有两个应用发送该指标 - 排查确认:OTEL Collector仍按导出间隔持续发送数据,导致已停止的实例看似在线,新指标流延续了旧流
- 已排除应用端配置问题:重启Collector后,数据导出停止,该应用从仪表盘消失,且两个指标流具备唯一资源属性
环境配置
- OTEL Collector:v0.93.0
- 埋点客户端:v1.23.1
- 导出器:ClickHouse
Collector 配置
receivers: otlp: protocols: grpc: endpoint: '0.0.0.0:4317' auth: authenticator: jwt http: endpoint: '0.0.0.0:4318' auth: authenticator: jwt processors: attributes/from_auth_context: actions: - key: wg.organization.id from_context: auth.organization_id action: insert - key: wg.federated_graph.id from_context: auth.federated_graph_id action: insert batch: send_batch_size: 10000 timeout: 5s memory_limiter: # percentage of memory only supported on linux limit_percentage: 75 spike_limit_percentage: 25 check_interval: 1s exporters: clickhouse: endpoint: ${CLICKHOUSE_ENDPOINT} timeout: 10s database: cosmo traces_table_name: otel_traces metrics_table_name: otel_metrics ttl_days: 30 sending_queue: queue_size: 5000 storage: file_storage/clickhouse retry_on_failure: enabled: true initial_interval: 5s max_interval: 30s max_elapsed_time: 300s extensions: # When persistent queue is enabled, the batches are being buffered using the provided storage extension - filestorage is a popular and safe choice. # If the collector instance is killed while having some items in the persistent queue, on restart the items will be picked and the exporting is continued. file_storage/clickhouse: directory: /var/lib/otelcol/file_storage/clickhouse health_check: path: /health endpoint: 0.0.0.0:13133 jwt: secret: ${OTEL_INGEST_JWT_SECRET} service: extensions: [health_check, jwt, file_storage/clickhouse] pipelines: metrics: receivers: [otlp] # Order is important here. Otherwise, the attributes processor will not be able to read the attributes from the auth context. processors: [attributes/from_auth_context, memory_limiter, batch] exporters: [clickhouse] traces: receivers: [otlp] # Order is important here. Otherwise, the attributes processor will not be able to read the attributes from the auth context. processors: [attributes/from_auth_context, memory_limiter, batch] exporters: [clickhouse]
内容的提问来源于stack exchange,提问作者Dustin Deus
相关产品推荐
相关产品推荐

