getsentry / raven-go

Sentry client in Go
https://sentry.io
BSD 3-Clause "New" or "Revised" License
561 stars 148 forks source link

Add support for SENTRY_RELEASE and SENTRY_ENVIRONMENT envvars. #175

Closed erikgrinaker closed 6 years ago

erikgrinaker commented 6 years ago

The Node client supports the environment variables, SENTRY_RELEASE, and SENTRY_ENVIRONMENT. The latter is particularly useful for specifying the app environment in e.g. Kubernetes manifests.

This patch adds support for these environment variables in the Go client as well.

mattrobenolt commented 6 years ago

What's the point of needing to specify server_name? I am fine with both SENTRY_RELEASE and SENTRY_ENVIRONMENT, but I'm not sure why os.Hostname() wouldn't be sufficient for server_name.

mattrobenolt commented 6 years ago

lol, so as the person that added this into raven-node in 2012, I think it has just hung around for super legacy reasons and this is not actively used or suggested to be used, so I don't thing we should add it into anything.

If you back out the SENTRY_NAME change, I'll get this merged in.

erikgrinaker commented 6 years ago

Sure, I've removed SENTRY_NAME.

mattrobenolt commented 6 years ago

Thanks! 🌭