Skip to content

Commit

Permalink
try to fix AttributeError: 'str' object has no attribute 'get_tracer'
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Dec 20, 2023
1 parent 37fcba0 commit fab2ccf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN echo 'deb http://ftp.fr.debian.org/debian bullseye main' >> /etc/apt/sources
pip install --upgrade pip


# Install Spark for standalone context in /opt
# TODO: remove? Install Spark for standalone context in /opt
ENV APACHE_SPARK_VERSION=3.2.0
ENV HADOOP_VERSION=3.2
ENV SPARK_HOME=/opt/spark
Expand All @@ -31,6 +31,9 @@ RUN echo "log4j.rootCategory=ERROR, console" > $SPARK_HOME/conf/log4j.properties
# Define some environment variables for pyspark and gunicorn config
ENV PYSPARK_PYTHON=/usr/local/bin/python3
ENV PYSPARK_DRIVER_PYTHON=/usr/local/bin/python3



ENV PORT=8808
ENV GUNICORN_CMD_ARGS="--preload"

Expand Down
2 changes: 1 addition & 1 deletion src/trapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def configure_otel(app):
trace.get_tracer_provider().add_span_processor(
BatchSpanProcessor(jaeger_exporter)
)
# tracer = trace.get_tracer(__name__)
tracer = trace.get_tracer(__name__)
FastAPIInstrumentor.instrument_app(app, tracer_provider=trace, excluded_urls="docs,openapi.json")
HTTPXClientInstrumentor().instrument()

Expand Down

0 comments on commit fab2ccf

Please sign in to comment.