Skip to content

Commit

Permalink
fix env var in compose
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Dec 18, 2023
1 parent 31c768f commit 7492a93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
# Show print() in logs:
PYTHONUNBUFFERED: '1'
LOG_LEVEL: 'INFO'
NO_JAEGER: true
NO_JAEGER: "true"
entrypoint: uvicorn trapi.main:app --host 0.0.0.0 --port 8808 --debug --reload


Expand All @@ -25,7 +25,7 @@ services:
environment:
PYTHONUNBUFFERED: '1'
LOG_LEVEL: 'INFO'
NO_JAEGER: true
NO_JAEGER: "true"
entrypoint: pytest --cov=src tests/integration
# entrypoint: pytest tests/integration/test_train_model.py -s
# entrypoint: pytest tests/integration/test_openpredict_api.py::test_post_trapi -s
Expand Down
2 changes: 1 addition & 1 deletion src/trapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ def configure_otel(app):
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor

service_name = os.environ.get('OTEL_SERVICE_NAME', 'OPENPREDICT')
# httpx connections need to be open a little longer by the otel decorators
# but some libs display warnings of resource being unclosed.
# these supresses such warnings.
logging.captureWarnings(capture=True)
warnings.filterwarnings("ignore",category=ResourceWarning)
service_name = os.environ.get('OTEL_SERVICE_NAME', 'OPENPREDICT')
trace.set_tracer_provider(
TracerProvider(
resource=Resource.create({telemetery_service_name_key: service_name})
Expand Down

0 comments on commit 7492a93

Please sign in to comment.