airbrake-python icon indicating copy to clipboard operation
airbrake-python copied to clipboard

Send environment variables

Open zachgoldstein opened this issue 8 years ago • 5 comments

We don't seem to pass any environment variables along with the payload. It should get passed into the Airbrake.log() func, but I don't see that happening. We set the environment (as in prod/staging/etc), inside the payload's context field, but not the top-level "environment" field, which is for env vars.

We can get this via os.environ and set it automatically. I think there should be a field enabling this, but defaulting to be disabled. The env could hold sensitive stuff and we don't want to send that by default.

zachgoldstein avatar Feb 22 '17 19:02 zachgoldstein

In theory we should implement filters and then users will be able to pass those via them.

kyrylo avatar Feb 23 '17 08:02 kyrylo

Filters: https://github.com/airbrake/airbrake-python/issues/48

zachgoldstein avatar Feb 23 '17 14:02 zachgoldstein

@kyrylo My understanding is that filters act to remove sensitive data, where this could possibly add sensitive data to the context? I'm not sure how we would be sending data via filters?

zachgoldstein avatar Feb 23 '17 20:02 zachgoldstein

@kyrylo https://github.com/airbrake/airbrake-python/issues/52 contains tests that make sure that blacklisted keys do not get sent in the environment payload.

zachgoldstein avatar Mar 08 '17 21:03 zachgoldstein

I guess you meant #67. Thanks!

kyrylo avatar Mar 09 '17 09:03 kyrylo