Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
fa2a240
Bump org.apache.maven.plugins:maven-clean-plugin from 3.1.0 to 3.5.0
dependabot[bot] Sep 1, 2025
31f0dd0
Bump org.apache.maven.plugins:maven-site-plugin from 3.7.1 to 3.21.0
dependabot[bot] Sep 1, 2025
c18ee6b
Bump org.junit.jupiter:junit-jupiter from 5.10.2 to 5.13.4
dependabot[bot] Sep 1, 2025
ee3afa7
Bump org.apache.maven.plugins:maven-surefire-plugin from 2.22.1 to 3.5.3
dependabot[bot] Sep 1, 2025
40a2663
Merge pull request #12 from splitio/dependabot/maven/org.apache.maven…
ZamoraEmmanuel Sep 1, 2025
4b0d88f
Merge branch 'development' into dependabot/maven/org.apache.maven.plu…
ZamoraEmmanuel Sep 1, 2025
f1dcde3
Merge pull request #13 from splitio/dependabot/maven/org.apache.maven…
ZamoraEmmanuel Sep 1, 2025
31e9b55
Merge branch 'development' into dependabot/maven/org.junit.jupiter-ju…
ZamoraEmmanuel Sep 1, 2025
41e99af
Merge pull request #14 from splitio/dependabot/maven/org.junit.jupite…
ZamoraEmmanuel Sep 1, 2025
d25d8d1
Merge branch 'development' into dependabot/maven/org.apache.maven.plu…
ZamoraEmmanuel Sep 1, 2025
9a16b8f
Merge pull request #15 from splitio/dependabot/maven/org.apache.maven…
ZamoraEmmanuel Sep 1, 2025
78d6a5f
Bump org.apache.maven.plugins:maven-project-info-reports-plugin
dependabot[bot] Sep 1, 2025
37c1a1c
Bump org.apache.maven.plugins:maven-resources-plugin from 3.0.2 to 3.3.1
dependabot[bot] Sep 1, 2025
6b4b966
Bump org.apache.maven.plugins:maven-site-plugin from 3.7.1 to 3.21.0
dependabot[bot] Sep 1, 2025
814fd20
Bump org.apache.maven.plugins:maven-compiler-plugin from 3.8.0 to 3.14.0
dependabot[bot] Sep 1, 2025
8134c73
Merge branch 'development' into dependabot/maven/org.apache.maven.plu…
ZamoraEmmanuel Sep 1, 2025
427c684
Merge pull request #16 from splitio/dependabot/maven/org.apache.maven…
ZamoraEmmanuel Sep 1, 2025
e7ae4c3
Merge branch 'development' into dependabot/maven/org.apache.maven.plu…
ZamoraEmmanuel Sep 1, 2025
818becd
Merge pull request #17 from splitio/dependabot/maven/org.apache.maven…
ZamoraEmmanuel Sep 1, 2025
aa6e1ba
Merge branch 'development' into dependabot/maven/org.apache.maven.plu…
ZamoraEmmanuel Sep 1, 2025
7f32abd
Merge pull request #18 from splitio/dependabot/maven/org.apache.maven…
ZamoraEmmanuel Sep 1, 2025
73dbded
Merge branch 'development' into dependabot/maven/org.apache.maven.plu…
ZamoraEmmanuel Sep 1, 2025
4f785d0
Merge pull request #19 from splitio/dependabot/maven/org.apache.maven…
ZamoraEmmanuel Sep 1, 2025
4612b57
Bump org.apache.maven.plugins:maven-install-plugin from 2.5.2 to 3.1.4
dependabot[bot] Sep 1, 2025
1d285c3
Merge branch 'development' into dependabot/maven/org.apache.maven.plu…
ZamoraEmmanuel Sep 1, 2025
a7ba21a
Merge pull request #22 from splitio/dependabot/maven/org.apache.maven…
ZamoraEmmanuel Sep 1, 2025
372f882
Bump org.sonatype.plugins:nexus-staging-maven-plugin
dependabot[bot] Sep 1, 2025
7001d88
Merge pull request #23 from splitio/dependabot/maven/org.sonatype.plu…
ZamoraEmmanuel Sep 1, 2025
25c1807
Bump org.apache.maven.plugins:maven-deploy-plugin from 2.8.2 to 3.1.4
dependabot[bot] Sep 1, 2025
c065e3a
Bump io.split.client:java-client from 4.16.1 to 4.17.0
dependabot[bot] Sep 1, 2025
5dd575f
Merge pull request #26 from splitio/dependabot/maven/development/org.…
ZamoraEmmanuel Sep 1, 2025
3072600
Merge branch 'development' into dependabot/maven/development/io.split…
ZamoraEmmanuel Sep 1, 2025
3b8efcb
Merge pull request #27 from splitio/dependabot/maven/development/io.s…
ZamoraEmmanuel Sep 1, 2025
fa99ff9
Bump org.mockito:mockito-core from 3.4.6 to 5.19.0
dependabot[bot] Sep 1, 2025
fbbb21d
Bump org.apache.maven.plugins:maven-jar-plugin from 3.0.2 to 3.4.2
dependabot[bot] Sep 1, 2025
e2c0f34
Merge pull request #28 from splitio/dependabot/maven/development/org.…
ZamoraEmmanuel Sep 1, 2025
0107c9f
Merge branch 'development' into dependabot/maven/development/org.apac…
ZamoraEmmanuel Sep 1, 2025
9cf08ef
Merge pull request #29 from splitio/dependabot/maven/development/org.…
ZamoraEmmanuel Sep 1, 2025
c6fe6cd
Bump org.apache.maven.plugins:maven-gpg-plugin from 1.5 to 3.2.8
dependabot[bot] Sep 1, 2025
e467f53
Merge pull request #30 from splitio/dependabot/maven/development/org.…
ZamoraEmmanuel Sep 1, 2025
44e3bc9
Update readme and changes file
ZamoraEmmanuel Sep 2, 2025
797203c
Remoce azure dependency and use jackson directly
Israphel Sep 2, 2025
49aa2d4
Merge pull request #32 from splitio/fix/remove-azure-dependency
ZamoraEmmanuel Sep 2, 2025
fadf25c
Merge branch 'development' into prepare-release
ZamoraEmmanuel Sep 2, 2025
46664b9
Merge pull request #31 from splitio/prepare-release
ZamoraEmmanuel Sep 2, 2025
b870cd4
use sonartype central
ZamoraEmmanuel Sep 3, 2025
d65fb3f
Merge pull request #33 from splitio/fme-9888
ZamoraEmmanuel Sep 3, 2025
d6bdc01
Merge branch 'main' of github.com:splitio/split-openfeature-provider-…
ZamoraEmmanuel Sep 3, 2025
17b8333
Merge pull request #35 from splitio/update-dev
ZamoraEmmanuel Sep 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
1.2.0 (August XX, 2025)
1.2.0 (September 3, 2025)
- Updated `io.split.client` dependency to 4.16.1
- Updated `dev.openfeature` dependency to 1.17.0
- Added tracking support
- Added “evaluate with details” support

1.1.0
- Up tp date with spec v0.5.0 and java sdk v0.3.1
Expand Down
52 changes: 49 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This SDK is compatible with Java 11 and higher.
<dependency>
<groupId>io.split.openfeature</groupId>
<artifactId>split-openfeature-provider</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
```
### Configure it
Expand All @@ -24,7 +24,7 @@ import dev.openfeature.sdk.OpenFeatureAPI;
import io.split.openfeature.SplitProvider;

OpenFeatureAPI api = OpenFeatureAPI.getInstance();
api.setProvider(new SplitProvider("YOUR_API_KEY"));
api.setProviderAndWait(new SplitProvider("YOUR_API_KEY"));
```

If you are more familiar with Split or want access to other initialization options, you can provide a `SplitClient` to the constructor. See the [Split Java SDK Documentation](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK) for more information.
Expand All @@ -42,7 +42,7 @@ SplitClientConfig config = SplitClientConfig.builder()
.setBlockUntilReadyTimeout(10000)
.build();
SplitClient splitClient = SplitFactoryBuilder.build("YOUR_API_KEY", config).client();
api.setProvider(new SplitProvider(splitClient));
api.setProviderAndWait(new SplitProvider(splitClient));
```

## Use of OpenFeature with Split
Expand All @@ -67,6 +67,52 @@ OpenFeatureAPI.getInstance().setEvaluationContext(context)
````
If the context was set at the client or api level, it is not required to provide it during flag evaluation.

## Evaluate with details

Use the get*Details(...) APIs to get the value and rich context (variant, reason, error code, metadata).
This provider includes the Split treatment config as a raw JSON string under flagMetadata["config"]
```java
// boolean/string/number/object all have *Details variants:
FlagEvaluationDetails<String> details =
client.getStringDetails("my-flag", "fallback", ctx);

Metadata md = details.getFlagMetadata();
if (md != null) {

Map<String, Value> meta = md.asMap();

Value config = meta.get("config"); // ← Split treatment config
}
```

## Tracking
To use track(eventName, context, details) you must provide:

- targetingKey on the EvaluationContext (non-blank).

- trafficType in the context (string, e.g. "user" or "account").

- A non-blank eventName.

Optional:

- details.value: numeric event value (defaults to 0).

- details.properties: map of attributes (prefer primitives: string/number/boolean/null).

Example:

```java
MutableContext ctx = new MutableContext("user-123");
ctx.add("trafficType", new Value("user"));

TrackingEventDetails details = new MutableTrackingEventDetails(19.99)
.add("plan", new Value("pro"))
.add("coupon", new Value("WELCOME10"));

client.track("checkout.completed", ctx, details);
```

## Submitting issues

The Split team monitors all issues submitted to this [issue tracker](https://github.com/splitio/split-openfeature-provider-java/issues). We encourage you to use this issue tracker to submit any bug reports, feedback, and feature enhancements. We'll do our best to respond in a timely manner.
Expand Down
63 changes: 35 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<junit.jupiter.version>5.10.2</junit.jupiter.version>
<junit.jupiter.version>5.13.4</junit.jupiter.version>
<maven.surefire.version>3.2.5</maven.surefire.version>
</properties>
<dependencies>
Expand All @@ -47,29 +47,34 @@
<dependency>
<groupId>io.split.client</groupId>
<artifactId>java-client</artifactId>
<version>4.16.1</version>
<version>4.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>io.split.integrations.azure</groupId>
<artifactId>impressions-listener</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.4.6</version>
<version>5.19.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<version>1.17.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.20.0</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
Expand All @@ -78,49 +83,49 @@
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<version>3.5.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.14.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<version>3.5.3</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>3.4.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<version>3.1.4</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>3.1.4</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
<version>3.21.0</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
<version>3.9.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<version>3.14.0</version>
<configuration>
<source>11</source>
<target>11</target>
Expand All @@ -143,15 +148,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -168,7 +164,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -179,6 +175,17 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>false</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading