Skip to content

Commit 6267fcc

Browse files
fbsprontthomasqueirozbclaude
authored
fix(opentelemetry source): log error (#24708)
* 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) ``` * improve error messages * add changelog * Fix CI errors Co-authored-by: Thomas <thomasqueirozb@gmail.com> * fix(opentelemetry source): improve error message wording Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com> Co-authored-by: Thomas <thomasqueirozb@gmail.com> Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 84abc68 commit 6267fcc

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

changelog.d/24708_log_error.fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The `opentelemetry` source now logs an error if it fails to start up or during runtime.
2+
This can happen when the configuration is invalid, for example trying to bind to the wrong
3+
IP or when hitting the open file limit.
4+
5+
authors: fbs

src/sources/opentelemetry/config.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl SourceConfig for OpentelemetryConfig {
328328
cx.shutdown.clone(),
329329
)
330330
.map_err(|error| {
331-
error!(message = "Source future failed.", %error);
331+
error!(message = "OpenTelemetry source gRPC server failed.", %error);
332332
});
333333

334334
let http_tls_settings = MaybeTlsSettings::from_config(self.http.tls.as_ref(), true)?;
@@ -355,7 +355,10 @@ impl SourceConfig for OpentelemetryConfig {
355355
filters,
356356
cx.shutdown,
357357
self.http.keepalive.clone(),
358-
);
358+
)
359+
.map_err(|error| {
360+
error!(message = "OpenTelemetry source HTTP server failed.", %error);
361+
});
359362

360363
Ok(join(grpc_source, http_source).map(|_| Ok(())).boxed())
361364
}

0 commit comments

Comments
 (0)