-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add standardized environment variable configuration pattern for OFREP SDKs #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… OFREP SDKs Signed-off-by: André Silva <[email protected]>
| - **OFREP_ENDPOINT**: The base URL for the OFREP service (e.g., `http://localhost:2321`) | ||
| - **OFREP_HEADERS**: Additional HTTP headers in comma-separated key=value format (e.g., "Authorization=Bearer 123,Content-Type=application/json") | ||
| - **OFREP_TIMEOUT**: Request timeout in milliseconds (e.g., "5000") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - **OFREP_ENDPOINT**: The base URL for the OFREP service (e.g., `http://localhost:2321`) | |
| - **OFREP_HEADERS**: Additional HTTP headers in comma-separated key=value format (e.g., "Authorization=Bearer 123,Content-Type=application/json") | |
| - **OFREP_TIMEOUT**: Request timeout in milliseconds (e.g., "5000") | |
| - **OPEN_FEATURE_PROVIDER_OFREP_ENDPOINT**: The base URL for the OFREP service (e.g., `http://localhost:2321`) | |
| - **OPEN_FEATURE_PROVIDER_OFREP_HEADERS**: Additional HTTP headers in comma-separated key=value format (e.g., "Authorization=Bearer 123,Content-Type=application/json") | |
| - **OPEN_FEATURE_PROVIDER_OFREP_TIMEOUT**: Request timeout in milliseconds (e.g., "5000") |
Quoting myself from #53 (comment):
I like how the OTel spec groups everything into OTel at the first level and then nests the OTLP specific configuration inside. Have you considered this approach for OFREP as well so we leave room for a common root key that's used by OFREP but also any other potential top-level OpenFeature configuration?
Following the example of OTEL_EXPORTER_OTLP_ENDPOINT, we could have OPEN_FEATURE_PROVIDER_OFREP_ENDPOINT, OPENFEATURE_PROVIDER_OFREP_ENDPOINT, OF_PROVIDER_OFREP_ENDPOINT, OPEN_FEATURE_OFREP_ENDPOINT, OPENFEATURE_OFREP_ENDPOINT or OF_OFREP_ENDPOINT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also prefer your idea. Leaving this open for further discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong preference either way but OPEN_FEATURE_PROVIDER_OFREP_ENDPOINT feels overly verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beeme1mr What are your thoughts on OPEN_FEATURE_OFREP_ENDPOINT only?
beeme1mr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this is geared towards server use cases. Should we add any considerations for web or mobile?
| - **OFREP_ENDPOINT**: The base URL for the OFREP service (e.g., `http://localhost:2321`) | ||
| - **OFREP_HEADERS**: Additional HTTP headers in comma-separated key=value format (e.g., "Authorization=Bearer 123,Content-Type=application/json") | ||
| - **OFREP_TIMEOUT**: Request timeout in milliseconds (e.g., "5000") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong preference either way but OPEN_FEATURE_PROVIDER_OFREP_ENDPOINT feels overly verbose.
At this point it is only considering server use cases. I don’t know if it should be part of this ADR or a separate one for the client/web uses. |
Signed-off-by: André Silva [email protected]
This PR
This pull request adds a new Architecture Decision Record (ADR) describing a standardized pattern for configuring OFREP SDKs using environment variables. The ADR proposes aligning with industry best practices from OpenTelemetry, aiming to improve consistency, flexibility, and cloud-native compatibility for SDK configuration.
Related Issues
Fixes #53