Welcome to the Linux Foundation Forum!

Missing comma in "Instruments to Measure Golden Signals"

There is a missing comma in the code instruction:

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

should read:

@app.after_request
def after_request_func(response: Response) -> Response:
    # ...
    request_instruments["error_rate"].add(1, {
            "http.route": request.path
            "state": "success" if response.status_code < 400 else "fail",
        }
    )
    return response
@app.after_request
def after_request_func(response: Response) -> Response:
    request_instruments["error_rate"].add(1, {
        "http.route": request.path,
        "state": "success" if response.status_code < 400 else "fail",
    })
    return response

Comments

  • arianehamm
    arianehamm Posts: 22

    @mhite ,
    Thank you for flagging this. The comma has been added.

    Kind Regards,
    Ariane
    Linux Foundation Education Team

Categories

Upcoming Training