Skip to content

Commit e1ac5d5

Browse files
authored
chore: fix types in flagd readme
Signed-off-by: Michael Beemer <[email protected]>
1 parent 5844e2a commit e1ac5d5

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

Diff for: providers/flagd/README.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This is the default mode of operation of the provider.
2323
In this mode, `FlagdProvider` communicates with [flagd](https://github.com/open-feature/flagd) via the gRPC protocol.
2424
Flag evaluations take place remotely at the connected flagd instance.
2525

26-
Instantiate a new FlagdProvider instance, and configure the OpenFeature SDK to use it:
26+
Instantiate a new FlagdProvider instance and configure the OpenFeature SDK to use it:
2727

2828
```java
2929
// Create a flagd instance with default options
@@ -36,7 +36,7 @@ OpenFeatureAPI.getInstance().setProvider(flagd);
3636

3737
This mode performs flag evaluations locally (in-process). Flag configurations for evaluation are obtained via gRPC protocol using [sync protobuf schema](https://buf.build/open-feature/flagd/file/main:sync/v1/sync_service.proto) service definition.
3838

39-
Consider following example to create a `FlagdProvider` with in-process evaluations,
39+
Consider the following example to create a `FlagdProvider` with in-process evaluations,
4040

4141
```java
4242
FlagdProvider flagdProvider = new FlagdProvider(
@@ -47,8 +47,8 @@ FlagdProvider flagdProvider = new FlagdProvider(
4747

4848
In the above example, in-process handlers attempt to connect to a sync service on address `localhost:8013` to obtain [flag definitions](https://github.com/open-feature/schemas/blob/main/json/flagd-definitions.json).
4949

50-
In-process resolver can also work in an offline mode. To enable this mode, you should provide a valid flag configuration file with the option `offlineFlagSourcePath`.
51-
The file must contain a valid flagd flag source file.
50+
In-process resolvers can also work in an offline mode.
51+
To enable this mode, you should provide a valid flag configuration file with the option `offlineFlagSourcePath`.
5252

5353
```java
5454
FlagdProvider flagdProvider = new FlagdProvider(
@@ -59,7 +59,7 @@ FlagdProvider flagdProvider = new FlagdProvider(
5959
```
6060

6161
Provider will not detect file changes nor re-read the file after the initial read.
62-
This mode is useful for local development, test cases and for offline application.
62+
This mode is useful for local development, test cases, and offline applications.
6363
For a full-featured, production-ready file-based implementation, use the RPC evaluator in combination with the flagd standalone application, which can be configured to watch files for changes.
6464

6565
### Configuration options
@@ -90,13 +90,13 @@ Given below are the supported configurations:
9090
9191
### Unix socket support
9292

93-
Unix socket communication with flag is facilitated via usage of the linux-native `epoll` library on `linux-x86_64`
94-
only (ARM support is pending relase of `netty-transport-native-epoll` v5). Unix sockets are not supported on other
93+
Unix socket communication with flagd is facilitated by usaging of the linux-native `epoll` library on `linux-x86_64`
94+
only (ARM support is pending the release of `netty-transport-native-epoll` v5). Unix sockets are not supported on other
9595
platforms or architectures.
9696

9797
### Reconnection
9898

99-
Reconnection is supported by the underlying GRPCBlockingStub. If connection to flagd is lost, it will reconnect
99+
Reconnection is supported by the underlying GRPCBlockingStub. If the connection to flagd is lost, it will reconnect
100100
automatically.
101101

102102
### Deadline (gRPC call timeout)
@@ -106,7 +106,7 @@ If the gRPC call is not completed within this deadline, the gRPC call is termina
106106
and the evaluation will default.
107107
The default deadline is 500ms, though evaluations typically take on the order of 10ms.
108108
For the in-process provider, the deadline is used when establishing the initial streaming connection.
109-
A failure to connect within this timeout will result an [error event](https://openfeature.dev/docs/reference/concepts/events#provider_error) from the provider, though it will attempt to reconnect indefinitely.
109+
A failure to connect within this timeout will result in an [error event](https://openfeature.dev/docs/reference/concepts/events#provider_error) from the provider, though it will attempt to reconnect indefinitely.
110110

111111
### TLS
112112

@@ -129,34 +129,34 @@ FlagdProvider flagdProvider = new FlagdProvider(
129129
### Caching (RPC only)
130130

131131
> [!NOTE]
132-
> The in-process resolver does not benefit from caching, since all evaluations are done locally and do not involve I/O.
132+
> The in-process resolver does not benefit from caching since all evaluations are done locally and do not involve I/O.
133133
134134
The provider attempts to establish a connection to flagd's event stream (up to 5 times by default).
135-
If the connection is successful and caching is enabled each flag returned with reason `STATIC` is cached until an event is received
136-
concerning the cached flag (at which point it is removed from cache).
135+
If the connection is successful and caching is enabled, each flag returned with the reason `STATIC` is cached until an event is received
136+
concerning the cached flag (at which point it is removed from the cache).
137137

138-
On invocation of a flag evaluation (if caching is available) an attempt is made to retrieve the entry from cache, if
139-
found the flag is returned with reason `CACHED`.
138+
On invocation of a flag evaluation (if caching is available), an attempt is made to retrieve the entry from the cache, if
139+
found the flag is returned with the reason `CACHED`.
140140

141141
By default, the provider is configured to
142142
use [least recently used (lru)](https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/LRUMap.html)
143143
caching with up to 1000 entries.
144144

145145
### OpenTelemetry tracing (RPC only)
146146

147-
flagd provider support OpenTelemetry traces for gRPC backed remote evaluations.
147+
flagd provider support OpenTelemetry traces for gRPC-backed remote evaluations.
148148

149149
There are two ways you can configure OpenTelemetry for the provider,
150150

151151
- [Using automatic instrumentation](https://opentelemetry.io/docs/instrumentation/java/automatic/)
152152
- [Using manual instrumentation](https://opentelemetry.io/docs/instrumentation/java/manual/)
153153

154154
When using automatic instrumentation, traces for gRPC will be automatically added by the OpenTelemetry Java library.
155-
These traces however will not include extra attributes added when using manual instrumentation.
155+
These traces, however will not include extra attributes added when using manual instrumentation.
156156

157157
When using manual instrumentation, you have two options to construct flagd provider to enable traces.
158158

159-
First(preferred) option is by constructing the provider with an OpenTelemetry instance,
159+
The first(preferred) option is to construct the provider with an OpenTelemetry instance,
160160

161161
```java
162162
FlagdOptions options =
@@ -167,7 +167,7 @@ FlagdOptions options =
167167
FlagdProvider flagdProvider = new FlagdProvider(options);
168168
```
169169

170-
Second option is useful if you have set up a GlobalOpenTelemetry in your runtime.
170+
The second option is useful if you have set up a GlobalOpenTelemetry in your runtime.
171171
You can allow flagd to derive the OpenTelemetry instance by enabling `withGlobalTelemetry` option.
172172

173173
```java
@@ -179,6 +179,6 @@ FlagdOptions options =
179179
FlagdProvider flagdProvider = new FlagdProvider(options);
180180
```
181181

182-
Please refer [OpenTelemetry example](https://opentelemetry.io/docs/instrumentation/java/manual/#example) for best practice guideline.
182+
Please refer [OpenTelemetry example](https://opentelemetry.io/docs/instrumentation/java/manual/#example) for best practice guidelines.
183183

184184
Provider telemetry combined with [flagd OpenTelemetry](https://flagd.dev/reference/monitoring/#opentelemetry) allows you to have distributed traces.

0 commit comments

Comments
 (0)