hyperdash-sdk-py
hyperdash-sdk-py copied to clipboard
Custom actions
@spence 's original comment:
Additionally, to support custom actions, do we want to use this as an entrypoint or have them self-registerable.
from hyperdash import action
@action("Shutdown Server")
def shutdown_server():
os.system("some_command with args")
I've never liked the self-registration thing (feels a little too magic), however, it's common in the Python world and people seem to like it so it might be a good way to go.
Also we could consider making the custom_api_key_getter behave this way, or just drop it altogether as @andrewschreiber suggested in favor of having them set the environment variable themselves, however, they then have to figure out how to implement rotation on their own.