Skip to content

Commit

Permalink
Update getting started guide too
Browse files Browse the repository at this point in the history
  • Loading branch information
c24t committed Apr 7, 2020
1 parent 54d42fd commit e4a741c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,14 @@ And let's write a small Flask application that sends an HTTP request, activating
.. code-block:: python
# flask_example.py
from opentelemetry.ext.flask import FlaskInstrumentor
FlaskInstrumentor().instrument() # This needs to be executed before importing Flask
import flask
import requests
import opentelemetry.ext.http_requests
from opentelemetry import trace
from opentelemetry.ext.flask import instrument_app
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter
from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor
Expand All @@ -201,7 +203,6 @@ And let's write a small Flask application that sends an HTTP request, activating
app = flask.Flask(__name__)
opentelemetry.ext.http_requests.enable(trace.get_tracer_provider())
instrument_app(app)
@app.route("/")
def hello():
Expand Down

0 comments on commit e4a741c

Please sign in to comment.