Adds stateless/stateful registries#78
Merged
dmuino merged 1 commit intoNetflix:spectatordfrom Oct 6, 2020
Merged
Conversation
A stateless registry is usually used in conjunction with spectatord and does not require to keep state on the current process. Tests done by users of this library are greatly simplified if the registry and meters can be queried though, therefore requiring some local state. This change adds a way to compose whether the registry will be stateless/stateful and which publisher will be used to send all updates in the stateless case.
copperlight
added a commit
that referenced
this pull request
Dec 2, 2022
* Use spectatord (#77) Switches from implementing a stateful registry to a registry that sends all acitivity to a spectatord sidecar. The build only supports bazel now, and we add a dependency on abseil and asio (removing the curl/cares/rapidjson/boringssl, etc. dependencies) * Adds stateless/stateful registries (#78) A stateless registry is usually used in conjunction with spectatord and does not require to keep state on the current process. Tests done by users of this library are greatly simplified if the registry and meters can be queried though, therefore requiring some local state. This change adds a way to compose whether the registry will be stateless/stateful and which publisher will be used to send all updates in the stateless case. * Allow the user to pass a logger (#79) This can be used to customize the verbosity of the spectator logger by user programs. Deletes unused source file: registry.cc * Allow the user to pass a logger (#80) This can be used to customize the verbosity of the spectator logger by user programs. Deletes unused source file: registry.cc * Update to new spectatord format (#81) Spectatord payload expects name,tags now instead of name:#tags * Remove unused files (#82) These were left due to some merging issue in previous PRs. They're no longer used. * Reconnect on errors (#83) Reconnect when there are errors. Particularly important in the local socket case where if the daemon becomes unavailable we must re-establish the connection otherwise all future updates would be lost. * Support common_tags (#84) These are tags that will be added to all Ids when they're created using the registry. This is used for example in the system agents to tag all metrics with xatlas.process. * Fix sender when no valid endpoint is configured (#85) This fixes a problem when the endpoint configured was not valid (i.e. did not start with `unix:` or `udp:`, and we would end up throwing an exception due to publisher::sender not being initialized. * Switch std::string_view to absl::string_view to avoid implicit conversion Co-authored-by: Daniel Muino <dmuino@users.noreply.github.com> Co-authored-by: James Mulcahy <jmulcahy@netflix.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A stateless registry is usually used in conjunction with spectatord and
does not require to keep state on the current process. Tests done by
users of this library are greatly simplified if the registry and meters
can be queried though, therefore requiring some local state.
This change adds a way to compose whether the registry will be
stateless/stateful and which publisher will be used to send all updates
in the stateless case.