Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

chore: add better logging around NATS connections #276

Merged

Conversation

connorsmith256
Copy link
Contributor

Feature or Problem

This PR:

  • adds the host ID, actor ID, and link name to the name of each NATS connection. This should increase the ability of operators to debug whether NATS connections related to the provider are still alive
  • adds with_connection_event_logging to NATS clients, which logs on connection events (which should be rare, including once on initial connection)
  • adds an error log if the stream for any subscriber closes unexpectedly

Related Issues

Release Information

v0.17.4

Consumer Impact

N/A

Testing

Built on platform(s)

  • x86_64-linux
  • aarch64-linux
  • x86_64-darwin
  • aarch64-darwin
  • x86_64-windows

Tested on platform(s)

  • x86_64-linux
  • aarch64-linux
  • x86_64-darwin
  • aarch64-darwin
  • x86_64-windows

Unit Test(s)

Acceptance or Integration

Manual Verification

Tested manually in a lattice. Deleted and recreated links on the provider to test that NATS connections were dropped from the server:

nats server report connections -j | jq '.[] | .name' | rg Messaging | wc -l

@connorsmith256 connorsmith256 requested review from a team and removed request for a team October 26, 2023 20:37
Copy link
Member

@brooksmtownsend brooksmtownsend left a comment

Choose a reason for hiding this comment

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

This will be super nice to know when the provider has unexpected issues

Signed-off-by: Connor Smith <connor.smith.256@gmail.com>
@connorsmith256 connorsmith256 force-pushed the chore/connection-debug-info branch from 6588daf to 8990b16 Compare October 26, 2023 20:59
@connorsmith256 connorsmith256 merged commit 73c9383 into wasmCloud:main Oct 26, 2023
6 checks passed
@connorsmith256 connorsmith256 deleted the chore/connection-debug-info branch October 26, 2023 21:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants