From 16c56085c6ba2dc5ac9ae5bc6d09aab54f95a34a Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 7 Nov 2023 10:53:45 +0100 Subject: [PATCH 1/4] rfc(decision): DRAFT: Environment Variable conventions --- README.md | 1 + ...-draft-environment-variable-conventions.md | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 text/0121-draft-environment-variable-conventions.md diff --git a/README.md b/README.md index ed5cfdda..5bfa18cd 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ This repository contains RFCs and DACIs. Lost? - [0116-sentry-semantic-conventions](text/0116-sentry-semantic-conventions.md): Sentry Semantic Conventions - [0118-mobile-transactions-and-spans](text/0118-mobile-transactions-and-spans.md): Transactions and Spans for Mobile Platforms - [0119-rust-in-sentry](text/0119-rust-in-sentry.md): Make it easier to use Rust code from Sentry/Python. +- [0121-draft-environment-variable-conventions](text/0121-draft-environment-variable-conventions.md): DRAFT: Environment Variable conventions - [0123-metrics-correlation](text/0123-metrics-correlation.md): This RFC addresses the high level metrics to span correlation system - [0126-sdk-spans-aggregator](text/0126-sdk-spans-aggregator.md): SDK Spans Aggregator - [0129-video-replay-envelope](text/0129-video-replay-envelope.md): Video-based replay envelope format diff --git a/text/0121-draft-environment-variable-conventions.md b/text/0121-draft-environment-variable-conventions.md new file mode 100644 index 00000000..5f433e08 --- /dev/null +++ b/text/0121-draft-environment-variable-conventions.md @@ -0,0 +1,35 @@ +- Start Date: 2023-11-07 +- RFC Type: decision +- RFC PR: https://github.com/getsentry/rfcs/pull/121 +- RFC Status: draft + +# Summary + +One paragraph explanation of the feature or document purpose. + +# Motivation + +Why are we doing this? What use cases does it support? What is the expected outcome? + +# Background + +The reason this decision or document is required. This section might not always exist. + +# Supporting Data + +[Metrics to help support your decision (if applicable).] + +# Options Considered + +If an RFC does not know yet what the options are, it can propose multiple options. The +preferred model is to propose one option and to provide alternatives. + +# Drawbacks + +Why should we not do this? What are the drawbacks of this RFC or a particular option if +multiple options are presented. + +# Unresolved questions + +- What parts of the design do you expect to resolve through this RFC? +- What issues are out of scope for this RFC but are known? From 13e028a8020e73881fc72eade818bcf890165232 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 7 Nov 2023 12:29:17 +0100 Subject: [PATCH 2/4] Add inital RFC --- ...-draft-environment-variable-conventions.md | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/text/0121-draft-environment-variable-conventions.md b/text/0121-draft-environment-variable-conventions.md index 5f433e08..16f3f809 100644 --- a/text/0121-draft-environment-variable-conventions.md +++ b/text/0121-draft-environment-variable-conventions.md @@ -5,31 +5,41 @@ # Summary -One paragraph explanation of the feature or document purpose. +We already expose certain environment variables that are consumed by SDKs, such as `SENTRY_DSN` and `SENTRY_RELEASE`. +To further ease usage, we should expose more options as such. +This RFC aims to find a set of conventions mainly aimed for server-side SDKs. # Motivation -Why are we doing this? What use cases does it support? What is the expected outcome? +Changing the SDK configuration most often requires a re-deployment of the application. This can be cumbersome for small changes, +such as updating the `traces_sample_rate`. Given the rise in populairty of server-less or containerized deployments, where +most configuration hails from envrionment variables, we should strive to make this workflow less cumbersome for our users. # Background -The reason this decision or document is required. This section might not always exist. +The Laravel SDK exposes the majority of its configuration as environment variables, making it a breeze to update the configuration of the SDK easily. +For a complete list of exposed variables, see https://github.com/getsentry/sentry-laravel/blob/9624a88c9cd9a50c22443fcdf3a0f77634b11210/config/sentry.php -# Supporting Data +# Options Considered -[Metrics to help support your decision (if applicable).] +A first list of environment variables that all server sides SDKs should support could look like: -# Options Considered +- `SENTRY_DSN` +- `SENTRY_RELEASE` +- `SENTRY_ENVIRONMENT` +- `SENTRY_SAMPLE_RATE` +- `SENTRY_TRACES_SAMPLE_RATE` +- `SENTRY_PROFILES_SAMPLE_RATE` -If an RFC does not know yet what the options are, it can propose multiple options. The -preferred model is to propose one option and to provide alternatives. +Further additions could include but are not limited to: -# Drawbacks +- `SENTRY_TAGS_` - An environment variable of `SENTRY_TAGS_foo = "bar"` would result in a tag of `foo: bar` being attached to all events. -Why should we not do this? What are the drawbacks of this RFC or a particular option if -multiple options are presented. +or SDK/framework-specific options, such as to control integrations or features -# Unresolved questions +- `SENTRY_BREADCRUMBS_LOGS_ENABLED` +- `SENTRY_TRACE_MISSING_ROUTES_ENABLED` + +# Drawbacks -- What parts of the design do you expect to resolve through this RFC? -- What issues are out of scope for this RFC but are known? +TBD From ee5b19d07e50223f85a66f387c5442865209a5e5 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 7 Nov 2023 12:37:56 +0100 Subject: [PATCH 3/4] Fix README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bfa18cd..d71a40b5 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ This repository contains RFCs and DACIs. Lost? - [0116-sentry-semantic-conventions](text/0116-sentry-semantic-conventions.md): Sentry Semantic Conventions - [0118-mobile-transactions-and-spans](text/0118-mobile-transactions-and-spans.md): Transactions and Spans for Mobile Platforms - [0119-rust-in-sentry](text/0119-rust-in-sentry.md): Make it easier to use Rust code from Sentry/Python. -- [0121-draft-environment-variable-conventions](text/0121-draft-environment-variable-conventions.md): DRAFT: Environment Variable conventions +- [0121-draft-environment-variable-conventions](text/0121-draft-environment-variable-conventions.md): Environment Variable conventions - [0123-metrics-correlation](text/0123-metrics-correlation.md): This RFC addresses the high level metrics to span correlation system - [0126-sdk-spans-aggregator](text/0126-sdk-spans-aggregator.md): SDK Spans Aggregator - [0129-video-replay-envelope](text/0129-video-replay-envelope.md): Video-based replay envelope format From 1b70176654fb40be63baa6694310435db88cd649 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Mon, 13 Nov 2023 10:35:16 +0100 Subject: [PATCH 4/4] Add `SENTRY_DEBUG` --- text/0121-draft-environment-variable-conventions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/text/0121-draft-environment-variable-conventions.md b/text/0121-draft-environment-variable-conventions.md index 16f3f809..96aee604 100644 --- a/text/0121-draft-environment-variable-conventions.md +++ b/text/0121-draft-environment-variable-conventions.md @@ -30,6 +30,7 @@ A first list of environment variables that all server sides SDKs should support - `SENTRY_SAMPLE_RATE` - `SENTRY_TRACES_SAMPLE_RATE` - `SENTRY_PROFILES_SAMPLE_RATE` +- `SENTRY_DEBUG` Further additions could include but are not limited to: