Skip to content

Commit 998f975

Browse files
chore: update sdk readmes
Signed-off-by: OpenFeature Bot <[email protected]>
1 parent 7400445 commit 998f975

File tree

14 files changed

+67
-45
lines changed

14 files changed

+67
-45
lines changed

docs/reference/technologies/client/kotlin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from kotlin-sdk.
1010
Edits should be made here: https://github.com/open-feature/kotlin-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Oct 28 2024 21:12:50 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

docs/reference/technologies/client/swift.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from swift-sdk.
1010
Edits should be made here: https://github.com/open-feature/swift-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Oct 28 2024 21:12:51 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

docs/reference/technologies/client/web/angular.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Oct 28 2024 21:12:51 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">
1717
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
1818
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
1919
</a>
2020

21-
<a href="https://github.com/open-feature/js-sdk/releases/tag/angular-sdk-v0.0.4-experimental">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.0.4-experimental&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/js-sdk/releases/tag/angular-sdk-v0.0.6-experimental">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.0.6-experimental&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<br/>

docs/reference/technologies/client/web/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Oct 28 2024 21:12:50 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

docs/reference/technologies/client/web/react.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Oct 28 2024 21:12:50 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

docs/reference/technologies/server/dotnet.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from dotnet-sdk.
1010
Edits should be made here: https://github.com/open-feature/dotnet-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Oct 28 2024 21:12:50 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
[![Specification](https://img.shields.io/static/v1?label=specification&message=v0.7.0&color=yellow&style=for-the-badge)](https://github.com/open-feature/spec/releases/tag/v0.7.0)

docs/reference/technologies/server/go.mdx

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ This content has been automatically generated from go-sdk.
99
Edits should be made here: https://github.com/open-feature/go-sdk
1010
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1111

12-
Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time)
12+
Last updated at Mon Oct 28 2024 21:12:50 GMT+0000 (Coordinated Universal Time)
1313
-->
1414

1515
<p align="center" class="github-badges">
1616
<a href="https://github.com/open-feature/spec/releases/tag/v0.7.0">
1717
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.7.0&color=yellow&style=for-the-badge" />
1818
</a>
1919

20-
<a href="https://github.com/open-feature/go-sdk/releases/tag/v1.13.0">
21-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.13.0&color=blue&style=for-the-badge" />
20+
<a href="https://github.com/open-feature/go-sdk/releases/tag/v1.13.1">
21+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.13.1&color=blue&style=for-the-badge" />
2222
</a>
2323

2424
<br/>
@@ -171,24 +171,46 @@ value, err := client.BooleanValue(
171171

172172
### Logging
173173

174-
The standard Go log package is used by default to show error logs.
175-
This can be overridden using the structured logging, [logr](https://github.com/go-logr/logr) API, allowing integration to any package.
176-
There are already [integration implementations](https://github.com/go-logr/logr#implementations-non-exhaustive) for many of the popular logger packages.
174+
Note that in accordance with the OpenFeature specification, the SDK doesn't generally log messages during flag evaluation.
175+
176+
#### Logging Hook
177+
178+
The GO SDK includes a `LoggingHook`, which logs detailed information at key points during flag evaluation, using [slog](https://pkg.go.dev/log/slog) structured logging API.
179+
This hook can be particularly helpful for troubleshooting and debugging; simply attach it at the global, client or invocation level and ensure your log level is set to "debug".
180+
181+
##### Usage example
177182

178183
```go
179-
var l logr.Logger
180-
l = integratedlogr.New() // replace with your chosen integrator
184+
// configure slog
185+
var programLevel = new(slog.LevelVar)
186+
programLevel.Set(slog.LevelDebug)
187+
h := slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{Level: programLevel})
188+
slog.SetDefault(slog.New(h))
189+
190+
// add a hook globally to run on all evaluations
191+
hook, err := NewLoggingHook(false)
192+
if err != nil {
193+
// handle error
194+
}
195+
196+
openfeature.AddHooks(hook)
181197

182-
openfeature.SetLogger(l) // set the logger at global level
198+
client.BooleanValueDetails(context.Background(), "not-exist", true, openfeature.EvaluationContext{})
183199

184-
c := openfeature.NewClient("log").WithLogger(l) // set the logger at client level
185200
```
186201

187-
[logr](https://github.com/go-logr/logr) uses incremental verbosity levels (akin to named levels but in integer form).
188-
The SDK logs `info` at level `0` and `debug` at level `1`. Errors are always logged.
202+
###### Output
203+
204+
```sh
205+
{"time":"2024-10-23T13:33:09.8870867+03:00","level":"DEBUG","msg":"Before stage","domain":"test-client","provider_name":"InMemoryProvider","flag_key":"not-exist","default_value":true}
206+
{"time":"2024-10-23T13:33:09.8968242+03:00","level":"ERROR","msg":"Error stage","domain":"test-client","provider_name":"InMemoryProvider","flag_key":"not-exist","default_value":true,"error_message":"error code: FLAG_NOT_FOUND: flag for key not-exist not found"}
207+
```
208+
209+
See [hooks](#hooks) for more information on configuring hooks.
189210

190211
### Domains
191-
Clients can be assigned to a domain. A domain is a logical identifier which can be used to associate clients with a particular provider. If a domain has no associated provider, the default provider is used.
212+
213+
Clients can be assigned to a domain. A domain is a logical identifier that can be used to associate clients with a particular provider. If a domain has no associated provider, the default provider is used.
192214

193215
```go
194216
import "github.com/open-feature/go-sdk/openfeature"

docs/reference/technologies/server/java.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This content has been automatically generated from java-sdk.
99
Edits should be made here: https://github.com/open-feature/java-sdk
1010
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1111

12-
Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time)
12+
Last updated at Mon Oct 28 2024 21:12:49 GMT+0000 (Coordinated Universal Time)
1313
-->
1414

1515
<p align="center" class="github-badges">
@@ -18,8 +18,8 @@ Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time)
1818
</a>
1919

2020

21-
<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.12.1">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.12.1&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.12.2">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.12.2&color=blue&style=for-the-badge" />
2323
</a>
2424

2525

@@ -54,7 +54,7 @@ Note that this library is intended to be used in server-side contexts and has no
5454
<dependency>
5555
<groupId>dev.openfeature</groupId>
5656
<artifactId>sdk</artifactId>
57-
<version>1.12.1</version>
57+
<version>1.12.2</version>
5858
</dependency>
5959
```
6060

@@ -77,7 +77,7 @@ If you would like snapshot builds, this is the relevant repository information:
7777

7878
```groovy
7979
dependencies {
80-
implementation 'dev.openfeature:sdk:1.12.1'
80+
implementation 'dev.openfeature:sdk:1.12.2'
8181
}
8282
```
8383

docs/reference/technologies/server/javascript/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Oct 28 2024 21:12:49 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

docs/reference/technologies/server/javascript/nestjs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Oct 28 2024 21:12:50 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

0 commit comments

Comments
 (0)