Skip to content

Commit

Permalink
docs(go-sdk): update otel docs with contents off main
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Oct 9, 2024
1 parent 014b5c0 commit 08996ce
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions config/clients/go/template/docs/opentelemetry.md.mustache
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
# OpenTelemetry

- [Overview](#overview)
- [Metrics](#metrics)
- [Supported Metrics](#supported-metrics)
- [Supported Attributes](#supported-attributes)
- [Customizing Reporting](#customizing-reporting)
- [Usage](#usage)
- [Installation](#1-install-dependencies)
- [Configure OpenTelemetry](#2-configure-opentelemetry)
- [Configure OpenFGA](#3-configure-openfga)
- [Example Integration](#example-integration)
This SDK produces [metrics](https://opentelemetry.io/docs/concepts/signals/metrics/) using [OpenTelemetry](https://opentelemetry.io/) that allow you to view data such as request timings. These metrics also include attributes for the model and store ID, as well as the API called to allow you to build reporting.

## Overview
When an OpenTelemetry SDK instance is configured, the metrics will be exported and sent to the collector configured as part of your applications configuration. If you are not using OpenTelemetry, the metric functionality is a no-op and the events are never sent.

This SDK supports [OpenTelemetry](https://opentelemetry.io/) to export [metrics](https://opentelemetry.io/docs/concepts/signals/metrics/) that provide insights into your application's performance, such as request timings. These metrics include attributes like model and store IDs, and the API called, which you can use to build detailed reports and dashboards.

If you configure the OpenTelemetry SDK, these metrics will be exported and sent to a collector as specified in your application's configuration. If OpenTelemetry is not configured, metrics functionality is disabled, and no events are sent.
In cases when metrics events are sent, they will not be viewable outside of infrastructure configured in your application, and are never available to the OpenFGA team or contributors.

## Metrics

Expand All @@ -42,7 +31,7 @@ If you configure the OpenTelemetry SDK, these metrics will be exported and sent
| `http.request.method` | string | Yes | HTTP method for the request |
| `http.request.resend_count` | int | Yes | Number of retries attempted, if any |
| `http.response.status_code` | int | Yes | Status code of the response (e.g., `200` for success) |
| `http.server.request.duration` | int | Yes | Time taken by the FGA server to process and evaluate the request, in milliseconds |
| `http.server.request.duration` | int | No | Time taken by the FGA server to process and evaluate the request, in milliseconds |
| `url.scheme` | string | Yes | HTTP scheme of the request (`http`/`https`) |
| `url.full` | string | Yes | Full URL of the request |
| `user_agent.original` | string | Yes | User Agent used in the query |
Expand Down

0 comments on commit 08996ce

Please sign in to comment.