You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: providers/flagd/README.md
+63-21
Original file line number
Diff line number
Diff line change
@@ -17,50 +17,92 @@ A feature flag daemon with a Unix philosophy.
17
17
18
18
## Usage
19
19
20
-
The `FlagdProvider` communicates with flagd via the gRPC protocol. Instantiate a new FlagdProvider instance, and configure the OpenFeature SDK to use it:
20
+
The `FlagdProvider` communicates with flagd via the gRPC protocol. Instantiate a new FlagdProvider instance, and
Please refer [OpenTelemetry example](https://opentelemetry.io/docs/instrumentation/java/manual/#example) for best
66
+
practice guideline.
67
+
68
+
Telemetry configuration combined with [flagd telemetry ](https://github.com/open-feature/flagd/blob/main/docs/configuration/flagd_telemetry.md)
69
+
allows distributed tracing.
39
70
40
71
### Unix socket support
41
72
42
-
Unix socket communication with flag is facilitated via usage of the linux-native `epoll` library on `linux-x86_64` only (ARM support is pending relase of `netty-transport-native-epoll` v5). Unix sockets are not supported on other platforms or architectures.
73
+
Unix socket communication with flag is facilitated via usage of the linux-native `epoll` library on `linux-x86_64`
74
+
only (ARM support is pending relase of `netty-transport-native-epoll` v5). Unix sockets are not supported on other
75
+
platforms or architectures.
43
76
44
77
### Reconnection
45
78
46
-
Reconnection is supported by the underlying GRPCBlockingStub. If connection to flagd is lost, it will reconnect automatically.
79
+
Reconnection is supported by the underlying GRPCBlockingStub. If connection to flagd is lost, it will reconnect
80
+
automatically.
47
81
48
82
### Deadline (gRPC call timeout)
49
83
50
84
The deadline for an individual flag evaluation can be configured by calling `setDeadline(< deadline in millis >)`.
51
-
If the gRPC call is not completed within this deadline, the gRPC call is terminated with the error `DEADLINE_EXCEEDED` and the evaluation will default.
85
+
If the gRPC call is not completed within this deadline, the gRPC call is terminated with the error `DEADLINE_EXCEEDED`
86
+
and the evaluation will default.
52
87
The default deadline is 500ms, though evaluations typically take on the order of 10ms.
53
88
54
89
### TLS
55
90
56
91
Though not required in deployments where flagd runs on the same host as the workload, TLS is available.
57
92
58
-
:warning: Note that there's a [vulnerability](https://security.snyk.io/vuln/SNYK-JAVA-IONETTY-1042268) in [netty](https://github.com/netty/netty), a transitive dependency of the underlying gRPC libraries used in the flagd-provider that fails to correctly validate certificates. This will be addressed in netty v5.
93
+
:warning: Note that there's a [vulnerability](https://security.snyk.io/vuln/SNYK-JAVA-IONETTY-1042268)
94
+
in [netty](https://github.com/netty/netty), a transitive dependency of the underlying gRPC libraries used in the
95
+
flagd-provider that fails to correctly validate certificates. This will be addressed in netty v5.
59
96
60
97
## Caching
61
98
62
-
The provider attempts to establish a connection to flagd's event stream (up to 5 times by default). If the connection is successful and caching is enabled each flag returned with reason `STATIC` is cached until an event is received concerning the cached flag (at which point it is removed from cache).
99
+
The provider attempts to establish a connection to flagd's event stream (up to 5 times by default). If the connection is
100
+
successful and caching is enabled each flag returned with reason `STATIC` is cached until an event is received
101
+
concerning the cached flag (at which point it is removed from cache).
63
102
64
-
On invocation of a flag evaluation (if caching is available) an attempt is made to retrieve the entry from cache, if found the flag is returned with reason `CACHED`.
103
+
On invocation of a flag evaluation (if caching is available) an attempt is made to retrieve the entry from cache, if
104
+
found the flag is returned with reason `CACHED`.
65
105
66
-
By default, the provider is configured to use [least recently used (lru)](https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/LRUMap.html) caching with up to 1000 entries.
106
+
By default, the provider is configured to
107
+
use [least recently used (lru)](https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/LRUMap.html)
0 commit comments