Skip to content

[FEATURE] Implement transaction context #243

@lukas-reining

Description

@lukas-reining

Requirements

We should implement transaction context propagation

What is transaction context?

From the spec:
Transaction context is a container for transaction-specific evaluation context (e.g. user id, user agent, IP).
Transaction context can be set where specific data is available (e.g. an auth service or request handler) and by using the transaction context propagator it will automatically be applied to all flag evaluations within a transaction (e.g. a request or thread).

Transaction context has been added in the following PR: open-feature/spec#227

Examples:

Implementation

The JS SDK implementation is implemented as a POC that is currently being hardened.
https://github.com/open-feature/js-sdk/blob/main/packages/server/src/transaction-context/transaction-context.ts

Usage

An example usage for the JS SDK implementation of the feature is the usage for propagating HTTP request information in the NestJS SDK.
https://github.com/open-feature/js-sdk/blob/main/packages/nest/src/evaluation-context-interceptor.ts#L31

Metadata

Metadata

Assignees

Labels

contribfestA good issue for Contribfest KubeCon EU '24good first issueGood for newcomersv0.8.0spec v0.8.0 compliance

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions