-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add account name tag to monitoring endpoints #6310
Conversation
This supersedes #5173 since it introduced a redundant field `LogicalName` on `Account` with the existing field `nameTag`. The endpoints that are currently covered include: - /accountz - /accstatz - /connz - /subsz - /jsz The endpoints: - /routez - /gatewayz - /leafz also contain account metadata, but has not been implemented yet. Signed-off-by: Byron Ruth <byron@nats.io>
Signed-off-by: Byron Ruth <byron@nats.io>
Signed-off-by: Byron Ruth <byron@nats.io>
Signed-off-by: Byron Ruth <byron@nats.io>
} | ||
a.mu.RLock() | ||
name := a.Name | ||
a.mu.RUnlock() | ||
return name | ||
} | ||
|
||
// getNameTag will return the name tag or the account name if not set. | ||
func (a *Account) getNameTag() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the context of monitoring and operator mode, this PR makes the assumption that if an explicit JWT name (not the subject) is not set, the name tag will default to the JWT which equates to the account name.
This may seem redundant, but the purpose is that its a consistent way to report on a standard value regardless if the name is set.
Signed-off-by: Byron Ruth <byron@nats.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This supersedes #5173 since it introduced a redundant field
LogicalName
onAccount
with the existing fieldnameTag
.The endpoints that are currently covered include:
The following endpoints also contain account metadata, but have not been implemented yet.