Hi folks,
I'd want to configure logging for Rollbar.
The issues is that the Rollbar auth token is available only at runtime in an environment variable.
I was able to get the token using EnvVarSecret, which is then used to call rollbar.init(), but then I got stuck.
How should I add the rollbar logger to prefect logging?
d
Dylan
10/22/2020, 8:20 PM
Hi @ale,
Dylan
10/22/2020, 8:20 PM
You might be able to use a ResourceManager to create a logger and pass it to the relevant tasks at runtime
Hi @Dylan, thanks for the suggestion.
I will definitely take a look at resource managers.
To give a little more context: we would like to send to Rollbar all errors/warning logs generated in a Prefect flow.
That's why we're trying to add an handler to prefect logger.
Would resource managers help in this?
d
Dylan
10/22/2020, 8:51 PM
You could pass a created logger to all of your tasks after initializing it at runtime
Dylan
10/22/2020, 8:51 PM
Do you want error logs or error states?
Dylan
10/22/2020, 8:51 PM
If you want states you might try a state handler
Dylan
10/22/2020, 8:51 PM
I’m not sure if we support sending only error/warning logs generated by prefect somewhere
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.