Welcome to the Linux Foundation Forum!

Missing newline in "Instruments to Measure Golden Signals"

There is a missing newline in the code example:

https://trainingportal.linuxfoundation.org/learn/course/getting-started-with-opentelemetry-lfs148/hands-on-lab-manual-instrumentation-metrics/instruments-to-measure-golden-signals?page=2

app.py
@app.before_request def before_request_func():
    request_instruments["traffic_volume"].add(
        1, attributes={"http.route": request.path}
    )

should read:

app.py
@app.before_request
def before_request_func():
    request_instruments["traffic_volume"].add(
        1, attributes={"http.route": request.path}
    )

Comments

Categories

Upcoming Training