Enable Otel On Actor (#93)
This commit is contained in:
parent
56fc83bf3e
commit
990c6243ca
2 changed files with 7 additions and 2 deletions
|
|
@ -524,6 +524,9 @@ def actorup(
|
||||||
help="Disable authentication for the actor. Not recommended for production.",
|
help="Disable authentication for the actor. Not recommended for production.",
|
||||||
show_default=True,
|
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"),
|
debug: bool = typer.Option(False, "--debug", "-d", help="Show debug information"),
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
|
|
@ -533,7 +536,9 @@ def actorup(
|
||||||
from arcade.cli.serve import serve_default_actor
|
from arcade.cli.serve import serve_default_actor
|
||||||
|
|
||||||
try:
|
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:
|
except KeyboardInterrupt:
|
||||||
typer.Exit()
|
typer.Exit()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,4 @@ RUN set -e; \
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
|
|
||||||
# Run the arcade actorup (hidden cli command)
|
# 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")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue