Skip to content

fix(shutdown): Update known lifecycle flow to warn not error#25458

Open
taylorchandleryoung wants to merge 2 commits into
vectordotdev:masterfrom
taylorchandleryoung:taylor.c.young/shutdownwarning
Open

fix(shutdown): Update known lifecycle flow to warn not error#25458
taylorchandleryoung wants to merge 2 commits into
vectordotdev:masterfrom
taylorchandleryoung:taylor.c.young/shutdownwarning

Conversation

@taylorchandleryoung
Copy link
Copy Markdown

@taylorchandleryoung taylorchandleryoung commented May 19, 2026

Summary

We received feedback and confusion around Error writing acknowledgement, dropping connection. This is a lifecycle event, not an error, so we can likely downgrade to warn in this case.

Updating the flow to match the treatment of TcpSocketConnectionShutdown (warn + connection shutdown counter, no component_errors_total increment).

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 on the dd-rust-license-tool.

@taylorchandleryoung taylorchandleryoung requested a review from a team as a code owner May 19, 2026 11:09
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@taylorchandleryoung taylorchandleryoung changed the title Update known lifecycle flow to warn not error fix(tls): Update known lifecycle flow to warn not error May 19, 2026
@taylorchandleryoung
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@taylorchandleryoung taylorchandleryoung changed the title fix(tls): Update known lifecycle flow to warn not error fix(shutdown): Update known lifecycle flow to warn not error May 19, 2026
Comment thread src/internal_events/tcp.rs
message = "Connection closed by peer before acknowledgement could be sent.",
error = %self.error,
);
counter!(CounterName::ConnectionShutdownTotal, "mode" => "tcp").increment(1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Another idea that came to mind, might this also be potentially misleading? There are other places the connection can be shutdown, I see StreamClosedError and DecoderFramingError, we would then have to increment this counter on those cases too otherwise the metric isn't 100% acccurate.

I think this counter can maybe be placed somewhere else where we would be exiting the connection - gracefully or ungracefully, since it doesn't really depend on those conditions to be incremented.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants