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:

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

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training