Skip to content

fix(opentelemetry source): log error#24708

Open
fbs wants to merge 3 commits intovectordotdev:masterfrom
fbs:24705_error
Open

fix(opentelemetry source): log error#24708
fbs wants to merge 3 commits intovectordotdev:masterfrom
fbs:24705_error

Conversation

@fbs
Copy link
Contributor

@fbs fbs commented Feb 23, 2026

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)

Summary

Vector configuration

How did you test this PR?

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

#24705 related to

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)
```
@fbs fbs requested a review from a team as a code owner February 23, 2026 09:20
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Feb 23, 2026
@fbs fbs changed the title fix(source opentelemetry): log error fix(opentelemetry source): log error Feb 23, 2026
@pront pront added no-changelog Changes in this PR do not need user-facing explanations in the release changelog and removed no-changelog Changes in this PR do not need user-facing explanations in the release changelog labels Feb 24, 2026
Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fbs, please add a bug fix changelog for this PR.

@pront pront enabled auto-merge February 26, 2026 19:21
@@ -0,0 +1,5 @@
The `opentelemetry` source now logs an error if it fails to start up or during runtime.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the changelog filename (add .fix). That should clear the spell checking error as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: sources Anything related to the Vector's sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants