Skip to content

Commit 5f95518

Browse files
authored
Merge pull request #115 from openfga/docs/otel/update-tables
docs(OpenTelemetry): update Metrics and Attributes tables
2 parents 664f98a + cc978d0 commit 5f95518

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

docs/OpenTelemetry.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,31 @@ In cases when metrics events are sent, they will not be viewable outside of infr
1010

1111
### Supported Metrics
1212

13-
| Metric Name | Type | Description |
14-
| --------------------------------- | --------- | ------------------------------------------------------------------------------------ |
15-
| `fga-client.credentials.request` | Counter | The total number of times a new token was requested when using ClientCredentials |
16-
| `fga-client.query.duration` | Histogram | The amount of time the FGA server took to internally process nd evaluate the request |
17-
| `fga-client.request.duration` | Histogram | The total request time for FGA requests |
18-
19-
### Supported attributes
20-
21-
| Attribute Name | Type | Description |
22-
| ------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
23-
| `fga-client.request.client_id` | `string` | The client ID associated with the request, if any |
24-
| `fga-client.request.method` | `string` | The FGA method/action that was performed (e.g. `Check`, `ListObjects`, ...) in TitleCase |
25-
| `fga-client.request.model_id` | `string` | The authorization model ID that was sent as part of the request, if any |
26-
| `fga-client.request.store_id` | `string` | The store ID that was sent as part of the request |
27-
| `fga-client.response.model_id` | `string` | The authorization model ID that the FGA server used |
28-
| `fga-client.user` | `string` | The user that is associated with the action of the request for check and list objects |
29-
| `http.host` | `string` | Host identifier of the origin the request was sent to |
30-
| `http.request.method` | `string` | The HTTP method for the request |
31-
| `http.request.resend_count` | `int` | The number of retries attempted (Only sent if the request was retried. Count of `1` means the request was retried once in addition to the original request) |
32-
| `http.response.status_code` | `int` | The status code of the response |
33-
| `url.full` | `string` | Full URL of the request |
34-
| `url.scheme` | `string` | HTTP Scheme of the request (`http`/`https`) |
35-
| `user_agent.original` | `string` | User Agent used in the query |
13+
| Metric Name | Type | Enabled by Default | Description |
14+
| -------------------------------- | --------- | ------------------ | --------------------------------------------------------------------------------- |
15+
| `fga-client.request.duration` | Histogram | Yes | Total request time for FGA requests, in milliseconds |
16+
| `fga-client.query.duration` | Histogram | Yes | Time taken by the FGA server to process and evaluate the request, in milliseconds |
17+
| `fga-client.credentials.request` | Counter | Yes | Total number of new token requests initiated using the Client Credentials flow |
18+
19+
### Supported Attributes
20+
21+
| Attribute Name | Type | Enabled by Default | Description |
22+
| ------------------------------ | ------ | ------------------ | --------------------------------------------------------------------------------- |
23+
| `fga-client.request.client_id` | string | Yes | Client ID associated with the request, if any |
24+
| `fga-client.request.method` | string | Yes | FGA method/action that was performed (e.g., Check, ListObjects) in TitleCase |
25+
| `fga-client.request.model_id` | string | Yes | Authorization model ID that was sent as part of the request, if any |
26+
| `fga-client.request.store_id` | string | Yes | Store ID that was sent as part of the request |
27+
| `fga-client.response.model_id` | string | Yes | Authorization model ID that the FGA server used |
28+
| `fga-client.user` | string | No | User associated with the action of the request for check and list users |
29+
| `http.client.request.duration` | int | No | Duration for the SDK to complete the request, in milliseconds |
30+
| `http.host` | string | Yes | Host identifier of the origin the request was sent to |
31+
| `http.request.method` | string | Yes | HTTP method for the request |
32+
| `http.request.resend_count` | int | Yes | Number of retries attempted, if any |
33+
| `http.response.status_code` | int | Yes | Status code of the response (e.g., `200` for success) |
34+
| `http.server.request.duration` | int | No | Time taken by the FGA server to process and evaluate the request, in milliseconds |
35+
| `url.scheme` | string | Yes | HTTP scheme of the request (`http`/`https`) |
36+
| `url.full` | string | Yes | Full URL of the request |
37+
| `user_agent.original` | string | Yes | User Agent used in the query |
3638

3739
## Examples
3840

@@ -142,6 +144,7 @@ public class Example {
142144
attributes.put(Attributes.FGA_CLIENT_REQUEST_STORE_ID, Optional.empty());
143145
attributes.put(Attributes.FGA_CLIENT_RESPONSE_MODEL_ID, Optional.empty());
144146
attributes.put(Attributes.HTTP_HOST, Optional.empty());
147+
attributes.put(Attributes.HTTP_REQUEST_METHOD, Optional.empty());
145148
attributes.put(Attributes.HTTP_REQUEST_RESEND_COUNT, Optional.empty());
146149
attributes.put(Attributes.HTTP_RESPONSE_STATUS_CODE, Optional.empty());
147150
attributes.put(Attributes.URL_FULL, Optional.empty());

0 commit comments

Comments
 (0)