Skip to content

Rollbar SDK Does Not Support Basic Configuration from Environment Variables #415

@haggishunk

Description

@haggishunk

User Story

The rollbar sdk can be configured using environment variables.

During initialization, no variables are required. The sdk will log errors if the crucial access token is not supplied as an argument or defined as an env var.

# current calling
import rollbar
rollbar.init('<your_access_token>')

# desired calling
import rollbar
rollbar.init()

# which should succeed as long as
import os
assert os.environ.get('ROLLBAR_ACCESS_TOKEN') is not None

Background

Developers releasing code into many environments is a given. More and more the deployments are using cloud platforms that support config by env var. This pattern is espoused by the 12 factor app and is a powerful way to segment your apps at runtime.

Not all configuration options need to be supported. Simple and deployment-related ones such the access_token, environment, code_version, enabled, endpoint, verify_https make the most sense as they have more to do with the runtime artifact and the deployment environment, as opposed to the code makeup.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions