Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LEAFZ to include leafnode server/connection name #3923

Merged
merged 1 commit into from Feb 28, 2023

Conversation

codegangsta
Copy link
Contributor

@codegangsta codegangsta commented Feb 28, 2023

resolves #3921

  • Documentation added (if applicable)
  • Tests added
  • Branch rebased on top of current main (git pull --rebase origin main)
  • Changes squashed to a single commit (described here)
  • Build is green in Travis CI
  • You have certified that the contribution is your original work and that you license the work to the project under the Apache 2 license

Changes proposed in this pull request:

Adds Name field to LEAFZ info for incoming and outgoing leafnode connections. This should allow observability tools to more easily identify leaf nodes without having to require SYS accounts set up for each leaf node connection.

@codegangsta codegangsta requested a review from a team as a code owner February 28, 2023 22:25
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -888,7 +888,13 @@ func (s *Server) createLeafNode(conn net.Conn, rURL *url.URL, remote *leafNodeCf
}
now := time.Now().UTC()

c := &client{srv: s, nc: conn, kind: LEAF, opts: defaultOpts, mpay: maxPay, msubs: maxSubs, start: now, last: now}
var clientOpts = ClientOpts{
Name: opts.ServerName,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only bit I'm not feeling 100% about. For outgoing connections I set the Name as the current server name. I believe this is probably what we want, since folks looking at LEAFZ should be able to tell the difference between incoming and outgoing connections here, but would like some feedback

Copy link
Member

Choose a reason for hiding this comment

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

LMK if you want me to merge it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Go for it!

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.

Add Server Name to Leafz Monitoring Endpoint
2 participants