Bug Fix: pyrollbar: No access_token provided.

Credentials and authentication issues preventing the rollbar agent in our backend from calling home.

1. Problem

  • Although the rollbar access_token is configured with the python variable rollbar_access_token, the agent isn't calling home, and no data are coming through on the Rollbar side.

2. Analysis

  • Something must be wrong with the variable rollbar_access_token in line 94 (in the above image).

  • After good dozens of minutes, I finally figured out: there are multiple access_tokens at varying levels in Rollbar - one at the project level (for each project) and the other at the account level.

  • I was using the account level token where I have to input the project access token.

3. Solution

Unbelievable that Rollbar still hasn't updated this code that breaks. @app.before_first_request decorator was depricated from Flask 2.3 Also, there is no function call for init_rollbar(). Rollbar, really?

However, I still get the same error that the access_token is not provided. Well... the error message was quite stragithforward in fact. It's been telling me to "call" the rollbar.init() function.

4. Result

  • The error message pyrollbar: No access_token provided is gone.

  • I check the Rollbar console and the spans are coming through.

Rollbar listing the tracing entry.
A closer look into the details of an error span.

Last updated