Skip to content

fix(opentelemetry source): log error#24708

Merged
pront merged 6 commits into
vectordotdev:masterfrom
fbs:24705_error
Mar 26, 2026
Merged

fix(opentelemetry source): log error#24708
pront merged 6 commits into
vectordotdev:masterfrom
fbs:24705_error

Conversation

@fbs

@fbs fbs commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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
pront
pront previously approved these changes Feb 24, 2026

@pront pront left a comment

Copy link
Copy Markdown
Member

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.

Comment thread src/sources/opentelemetry/config.rs Outdated
@pront pront enabled auto-merge February 26, 2026 19:21
Comment thread changelog.d/24708_log_error.fix.md
auto-merge was automatically disabled February 27, 2026 09:29

Head branch was pushed to by a user without write access

@fbs

fbs commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

@pront gentle nudge

Comment thread changelog.d/24708_log_error.fix.md Outdated
Comment thread src/sources/opentelemetry/config.rs Outdated
thomasqueirozb and others added 2 commits March 26, 2026 14:10
Co-authored-by: Thomas <thomasqueirozb@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@pront pront enabled auto-merge March 26, 2026 20:01
@pront pront added this pull request to the merge queue Mar 26, 2026
Merged via the queue into vectordotdev:master with commit 6267fcc Mar 26, 2026
58 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

domain: sources Anything related to the Vector's sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants