Skip to content

Commit e4a741c

Browse files
committed
Update getting started guide too
1 parent 54d42fd commit e4a741c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/getting-started.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,14 @@ And let's write a small Flask application that sends an HTTP request, activating
184184
.. code-block:: python
185185
186186
# flask_example.py
187+
from opentelemetry.ext.flask import FlaskInstrumentor
188+
FlaskInstrumentor().instrument() # This needs to be executed before importing Flask
189+
187190
import flask
188191
import requests
189192
190193
import opentelemetry.ext.http_requests
191194
from opentelemetry import trace
192-
from opentelemetry.ext.flask import instrument_app
193195
from opentelemetry.sdk.trace import TracerProvider
194196
from opentelemetry.sdk.trace.export import ConsoleSpanExporter
195197
from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor
@@ -201,7 +203,6 @@ And let's write a small Flask application that sends an HTTP request, activating
201203
202204
app = flask.Flask(__name__)
203205
opentelemetry.ext.http_requests.enable(trace.get_tracer_provider())
204-
instrument_app(app)
205206
206207
@app.route("/")
207208
def hello():

0 commit comments

Comments
 (0)