mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-09-26 20:41:53 +08:00
[Trace]fix opentelemetry can not work in uvicorn (#2906)
Some checks failed
Deploy GitHub Pages / deploy (push) Has been cancelled
Some checks failed
Deploy GitHub Pages / deploy (push) Has been cancelled
* add opentelemetry * add opentelemetry * add opentelemetry on dequeue * add opentelemetry on dequeue * add opentelemetry on dequeue * fix annotation * fix annotation when add opentelemetry * fix opentelemetry-instrumentation-fastapi * fix pentelemetry-bootstrap * fix opentelemetry can not work in uvicorn * move conf to env --------- Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
This commit is contained in:
@@ -105,6 +105,30 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
||||
# Whether to use aggregate send.
|
||||
"FD_USE_AGGREGATE_SEND":
|
||||
lambda: bool(int(os.getenv("FD_USE_AGGREGATE_SEND", "0"))),
|
||||
|
||||
# Whether to open Trace.
|
||||
"TRACES_ENABLE":
|
||||
lambda: os.getenv("TRACES_ENABLE", "false"),
|
||||
|
||||
# set traec Server name.
|
||||
"FD_SERVICE_NAME":
|
||||
lambda: os.getenv("FD_SERVICE_NAME", "FastDeploy"),
|
||||
|
||||
# set traec host name.
|
||||
"FD_HOST_NAME":
|
||||
lambda: os.getenv("FD_HOST_NAME", "localhost"),
|
||||
|
||||
# set traec exporter.
|
||||
"TRACES_EXPORTER":
|
||||
lambda: os.getenv("TRACES_EXPORTER", "console"),
|
||||
|
||||
# set traec exporter_otlp_endpoint.
|
||||
"EXPORTER_OTLP_ENDPOINT":
|
||||
lambda: os.getenv("EXPORTER_OTLP_ENDPOINT"),
|
||||
|
||||
# set traec exporter_otlp_headers.
|
||||
"EXPORTER_OTLP_HEADERS":
|
||||
lambda: os.getenv("EXPORTER_OTLP_HEADERS"),
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user