Skip to content

Commit a68b0aa

Browse files
committed
fix(source opentelemetry): log error
If the HTTP opentelemetry source fails to build it is currently silently ignored, without logging any info to the 'user'. The only indication you have that something is wrong is that the log line about the http listener starting is _not_ there. With this change the error condition is logged the same way the gRPC error is logged. Before: ``` $ vector -c vector-otel.yaml ... 2026-02-23T09:15:50.053251Z INFO vector: Vector has started. debug="false" version="0.52.0" arch="aarch64" revision="ca5bf26 2025-12-16 14:56:07.290167996" 2026-02-23T09:15:50.053468Z INFO source{component_kind="source" component_id=otel component_type=opentelemetry}: vector::sources::util::grpc: Building gRPC server. address=127.0.0.1:4317 ``` now: ``` $ target/debug/vector --config vector-otel.yaml 2026-02-23T09:16:49.397436Z INFO vector: Vector has started. debug="true" version="0.54.0" arch="aarch64" revision="" 2026-02-23T09:16:49.398497Z INFO source{component_kind="source" component_id=otel component_type=opentelemetry}: vector::sources::util::grpc: Building gRPC server. address=127.0.0.1:4317 2026-02-23T09:16:49.400243Z ERROR source{component_kind="source" component_id=otel component_type=opentelemetry}: vector::sources::opentelemetry::config: Source future failed. error=TCP bind failed: Address family not supported by protocol family (os error 47) ```
1 parent 359b646 commit a68b0aa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/sources/opentelemetry/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ impl SourceConfig for OpentelemetryConfig {
257257
filters,
258258
cx.shutdown,
259259
self.http.keepalive.clone(),
260-
);
260+
)
261+
.map_err(|error| {
262+
error!(message = "Source future failed.", %error);
263+
});
261264

262265
Ok(join(grpc_source, http_source).map(|_| Ok(())).boxed())
263266
}

0 commit comments

Comments
 (0)