Skip to content

Conversation

@askpt
Copy link
Member

@askpt askpt commented Oct 17, 2025

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

@askpt askpt marked this pull request as ready for review October 17, 2025 20:20
@askpt askpt requested a review from a team as a code owner October 17, 2025 20:20
Comment on lines +36 to +38
- **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")
Copy link

@slashmo slashmo Oct 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

@askpt askpt Oct 22, 2025

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?

Copy link
Member

@beeme1mr beeme1mr left a 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?

Comment on lines +36 to +38
- **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")
Copy link
Member

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.

@askpt
Copy link
Member Author

askpt commented Oct 22, 2025

I'm assuming this is geared towards server use cases. Should we add any considerations for web or mobile?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt SDK Configuration Pattern using Environment Variables

4 participants