Enable Otel On Actor (#93)

This commit is contained in:
Sterling Dreyer 2024-10-05 13:40:02 -07:00 committed by GitHub
parent 56fc83bf3e
commit 990c6243ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -524,6 +524,9 @@ def actorup(
help="Disable authentication for the actor. Not recommended for production.",
show_default=True,
),
otel_enable: bool = typer.Option(
False, "--otel-enable", help="Send logs to OpenTelemetry", show_default=True
),
debug: bool = typer.Option(False, "--debug", "-d", help="Show debug information"),
) -> None:
"""
@ -533,7 +536,9 @@ def actorup(
from arcade.cli.serve import serve_default_actor
try:
serve_default_actor(host, port, disable_auth=disable_auth, debug=debug)
serve_default_actor(
host, port, disable_auth=disable_auth, enable_otel=otel_enable, debug=debug
)
except KeyboardInterrupt:
typer.Exit()
except Exception as e:

View file

@ -49,4 +49,4 @@ RUN set -e; \
EXPOSE $PORT
# Run the arcade actorup (hidden cli command)
CMD arcade actorup --host $HOST --port $PORT
CMD arcade actorup --host $HOST --port $PORT $([ "$OTEL_ENABLE" = "true" ] && echo "--otel-enable")