-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable OpenTelemetry tracing for usage service
added docs, changeset and updated README
- Loading branch information
1 parent
cc86bc5
commit aa195c2
Showing
23 changed files
with
668 additions
and
513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'hive': minor | ||
--- | ||
|
||
Added a new environment variable `OPENTELEMETRY_TRACE_USAGE_REQUESTS` for `rate-limit` and `tokens` services. | ||
|
||
Self-hosters who wish to report telemetry information for `usage` service, can opt-in and set `OPENTELEMETRY_TRACE_USAGE_REQUESTS=1` to these services. This will skip sampling and will always trace requests originating from the `usage` service. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'hive': minor | ||
--- | ||
|
||
Added OpenTelemetry traces to Usage service using a new `OPENTELEMETRY_COLLECTOR_ENDPOINT` env var. | ||
|
||
This option is disabled by default for self-hosting, you can opt-in by setting `OPENTELEMETRY_COLLECTOR_ENDPOINT`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,23 +5,24 @@ you don't need this service. | |
|
||
## Configuration | ||
|
||
| Name | Required | Description | Example Value | | ||
| ----------------------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | | ||
| `PORT` | **Yes** | The HTTP port of the service. | `4012` | | ||
| `LIMIT_CACHE_UPDATE_INTERVAL_MS` | No | The cache update interval limit in milliseconds. | `60_000` | | ||
| `POSTGRES_HOST` | **Yes** | Host of the postgres database | `127.0.0.1` | | ||
| `POSTGRES_PORT` | **Yes** | Port of the postgres database | `5432` | | ||
| `POSTGRES_DB` | **Yes** | Name of the postgres database. | `registry` | | ||
| `POSTGRES_USER` | **Yes** | User name for accessing the postgres database. | `postgres` | | ||
| `POSTGRES_PASSWORD` | **Yes** | Password for accessing the postgres database. | `postgres` | | ||
| `USAGE_ESTIMATOR_ENDPOINT` | **Yes** | The endpoint of the usage estimator service. | `http://127.0.0.1:4011` | | ||
| `EMAILS_ENDPOINT` | No (if not provided no limit emails will be sent.) | The endpoint of the GraphQL Hive Email service. | `http://127.0.0.1:6260` | | ||
| `ENVIRONMENT` | No | The environment of your Hive app. (**Note:** This will be used for Sentry reporting.) | `staging` | | ||
| `SENTRY` | No | Whether Sentry error reporting should be enabled. | `1` (enabled) or `0` (disabled) | | ||
| `SENTRY_DSN` | No | The DSN for reporting errors to Sentry. | `https://[email protected]/12121212` | | ||
| `PROMETHEUS_METRICS` | No | Whether Prometheus metrics should be enabled | `1` (enabled) or `0` (disabled) | | ||
| `PROMETHEUS_METRICS_LABEL_INSTANCE` | No | The instance label added for the prometheus metrics. | `rate-limit` | | ||
| `WEB_APP_URL` | No | The base url of the web app | `https://your-instance.com` | | ||
| `REQUEST_LOGGING` | No | Log http requests | `1` (enabled) or `0` (disabled) | | ||
| `LOG_LEVEL` | No | The verbosity of the service logs. One of `trace`, `debug`, `info`, `warn` ,`error`, `fatal` or `silent` | `info` (default) | | ||
| `OPENTELEMETRY_COLLECTOR_ENDPOINT` | No | OpenTelemetry Collector endpoint. The expected traces transport is HTTP (port `4318`). | `http://localhost:4318/v1/traces` | | ||
| Name | Required | Description | Example Value | | ||
| ------------------------------------ | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | | ||
| `PORT` | **Yes** | The HTTP port of the service. | `4012` | | ||
| `LIMIT_CACHE_UPDATE_INTERVAL_MS` | No | The cache update interval limit in milliseconds. | `60_000` | | ||
| `POSTGRES_HOST` | **Yes** | Host of the postgres database | `127.0.0.1` | | ||
| `POSTGRES_PORT` | **Yes** | Port of the postgres database | `5432` | | ||
| `POSTGRES_DB` | **Yes** | Name of the postgres database. | `registry` | | ||
| `POSTGRES_USER` | **Yes** | User name for accessing the postgres database. | `postgres` | | ||
| `POSTGRES_PASSWORD` | **Yes** | Password for accessing the postgres database. | `postgres` | | ||
| `USAGE_ESTIMATOR_ENDPOINT` | **Yes** | The endpoint of the usage estimator service. | `http://127.0.0.1:4011` | | ||
| `EMAILS_ENDPOINT` | No (if not provided no limit emails will be sent.) | The endpoint of the GraphQL Hive Email service. | `http://127.0.0.1:6260` | | ||
| `ENVIRONMENT` | No | The environment of your Hive app. (**Note:** This will be used for Sentry reporting.) | `staging` | | ||
| `SENTRY` | No | Whether Sentry error reporting should be enabled. | `1` (enabled) or `0` (disabled) | | ||
| `SENTRY_DSN` | No | The DSN for reporting errors to Sentry. | `https://[email protected]/12121212` | | ||
| `PROMETHEUS_METRICS` | No | Whether Prometheus metrics should be enabled | `1` (enabled) or `0` (disabled) | | ||
| `PROMETHEUS_METRICS_LABEL_INSTANCE` | No | The instance label added for the prometheus metrics. | `rate-limit` | | ||
| `WEB_APP_URL` | No | The base url of the web app | `https://your-instance.com` | | ||
| `REQUEST_LOGGING` | No | Log http requests | `1` (enabled) or `0` (disabled) | | ||
| `LOG_LEVEL` | No | The verbosity of the service logs. One of `trace`, `debug`, `info`, `warn` ,`error`, `fatal` or `silent` | `info` (default) | | ||
| `OPENTELEMETRY_COLLECTOR_ENDPOINT` | No | OpenTelemetry Collector endpoint. The expected traces transport is HTTP (port `4318`). | `http://localhost:4318/v1/traces` | | ||
| `OPENTELEMETRY_TRACE_USAGE_REQUESTS` | No | If enabled, requests send to this service from `usage` service will be monitored with OTEL. | `1` (enabled, or ``) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.