Skip to content

Commit 6eb0ad7

Browse files
committed
Reverted OpenTelemetry integration
1 parent e6690be commit 6eb0ad7

File tree

26 files changed

+72
-942
lines changed

26 files changed

+72
-942
lines changed

docker/docker-compose-with-prometheus-and-otel.yml

-96
This file was deleted.

docker/docker_files/otel-collector-config.yaml

-25
This file was deleted.

docker/docker_files/prometheus.yml

-14
This file was deleted.

documentation/docs/getting-started/configuration.mdx

+2-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Please use this table as a reference.
2525
| LOG_FILE_COMPRESSION | | |
2626
| LOG_FILE_SERIALIZE | Serialize log messages in file into json format (useful for log aggregation platforms) | |
2727
| LOG_FILE_LEVEL |
28-
| LOG_DIAGNOSE | Include diagnosis in log messages | |
28+
| LOG_DIAGNOSE | Include diagnosis in log messages | |
2929
| STATISTICS_ENABLED | Collect statistics about OPAL clients. | |
3030
| STATISTICS_ADD_CLIENT_CHANNEL | The topic to update about the new OPAL clients connection. | |
3131
| STATISTICS_REMOVE_CLIENT_CHANNEL | The topic to update about the OPAL clients disconnection. | |
@@ -40,11 +40,7 @@ Please use this table as a reference.
4040
| AUTH_PUBLIC_KEY | | |
4141
| AUTH_JWT_ALGORITHM | JWT algorithm. See possible values [here](https://pyjwt.readthedocs.io/en/stable/algorithms.html). | |
4242
| AUTH_JWT_AUDIENCE | | |
43-
| AUTH_JWT_ISSUER | | |
44-
| ENABLE_OPENTELEMETRY_TRACING | Set if OPAL should enable tracing with OpenTelemetry | |
45-
| ENABLE_OPENTELEMETRY_METRICS | Set if OPAL should enable metrics with OpenTelemetry | |
46-
| ENABLE_OPENTELEMETRY_TRACING | The OpenTelemetry OTLP endpoint to send traces to, set only if ENABLE_OPENTELEMETRY_TRACING is enabled | |
47-
43+
| AUTH_JWT_ISSUER | | |
4844

4945
## OPAL Server Configuration Variables
5046

documentation/docs/tutorials/monitoring_opal.mdx

-116
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ There are multiple ways you can monitor your OPAL deployment:
1111
- **Health-checks** - OPAL exposes HTTP health check endpoints ([See below](##health-checks))
1212
- [**Callbacks**](/tutorials/healthcheck_policy_and_update_callbacks#-data-update-callbacks) - Using the callback webhooks feature - having OPAL-clients report their updates
1313
- **Statistics** - Using the built-in statistics feature in OPAL ([See below](##opal-statistics))
14-
- **OpenTelemetry Metrics and Tracing** - OPAL can expose metrics and tracing information using OpenTelemetry for monitoring ([See below](#opentelemetry-metrics-and-tracing)).
1514

1615
## Health checks
1716

@@ -53,118 +52,3 @@ Available through `/pubsub_client_info` api route on the server.
5352
### Caveats:
5453
- When `UVICORN_NUM_WORKERS > 1`, retrieved information would only include clients connected to the replying server process.
5554
- This is an early access feature and is likely to change. Backward compatibility is not garaunteed.
56-
57-
## OpenTelemetry Metrics and Tracing
58-
59-
OPAL supports exporting metrics and tracing information using OpenTelemetry, which can be integrated with various monitoring and observability tools.
60-
61-
### Enabling OpenTelemetry Metrics and Tracing
62-
63-
To enable OpenTelemetry metrics and tracing, you need to set the following environment variables in both OPAL server and OPAL client:
64-
65-
```
66-
OPAL_ENABLE_OPENTELEMETRY_TRACING=true
67-
OPAL_ENABLE_OPENTELEMETRY_METRICS=true
68-
OPAL_OPENTELEMETRY_OTLP_ENDPOINT=<your-otel-collector-endpoint>
69-
```
70-
71-
- OPAL_ENABLE_OPENTELEMETRY_TRACING: Set to `true` to enable tracing.
72-
- OPAL_ENABLE_OPENTELEMETRY_METRICS: Set to `true` to enable metrics.
73-
- OPAL_OPENTELEMETRY_OTLP_ENDPOINT: Set the endpoint for the OpenTelemetry Collector
74-
75-
### Exposing Metrics and Traces
76-
77-
- Both the server and client will expose a `/metrics` endpoint that returns metrics in Prometheus format.
78-
- Traces are exported to the configured OpenTelemetry Collector endpoint using OTLP over gRPC.
79-
80-
### Available Metrics and Traces
81-
82-
Below is a list of the available metrics and traces in OPAL, along with their types, available tags (attributes), and explanations.
83-
84-
#### OPAL Server Metrics and Traces
85-
86-
##### 1) `opal_server_data_update`
87-
- **Type**: Trace
88-
- **Description**: Represents a data update operation in the OPAL server. This trace spans the process of publishing data updates to clients.
89-
- **Attributes**:
90-
- `topics_count`: Number of topics involved in the data update.
91-
- `entries_count`: Number of data update entries.
92-
- Additional attributes related to errors or execution time.
93-
94-
##### 2) `opal_server_policy_update`
95-
- **Type**: Trace
96-
- **Description**: Represents a policy update operation in the OPAL server. This trace spans the process of checking for policy changes and notifying clients.
97-
- **Attributes**:
98-
- Information about the policy repository, such as commit hashes.
99-
- Errors encountered during the update process.
100-
101-
##### 3) `opal_server_policy_bundle_request`
102-
- **Type**: Trace
103-
- **Description**: Represents a request for a policy bundle from a client. This trace spans the process of generating and serving the policy bundle to the client.
104-
- **Attributes**:
105-
- `bundle.type`: The type of bundle (full or diff).
106-
- `bundle.size`: The size of the bundle in number of files or bytes.
107-
- `scope_id`: The scope identifier if scopes are used.
108-
109-
##### 4) `opal_server_policy_bundle_size`
110-
- **Type**: Metric (Histogram)
111-
- **Unit**: Files
112-
- **Description**: Records the size of the policy bundles served by the OPAL server. The size is measured in the number of files included in the bundle.
113-
- **Attributes**:
114-
- `type`: The type of bundle (full or diff).
115-
116-
##### 5) `opal_server_active_clients`
117-
- **Type**: Metric (UpDownCounter)
118-
- **Description**: Tracks the number of active clients connected to the OPAL server.
119-
- **Attributes**:
120-
- `client_id`: The unique identifier of the client.
121-
- `source`: The source host and port of the client (e.g., 192.168.1.10:34567).
122-
123-
#### OPAL Client Metrics and Traces
124-
125-
##### 1) `opal_client_data_subscriptions`
126-
- **Type**: Metric (UpDownCounter)
127-
- **Description**: Tracks the number of data subscriptions per client.
128-
- **Attributes**:
129-
- `client_id`: The unique identifier of the client.
130-
- `topic`: The topic to which the client is subscribed.
131-
132-
##### 2) `opal_client_data_update_trigger`
133-
- **Type**: Trace
134-
- **Description**: Represents the operation of triggering a data update via the API in the OPAL client.
135-
- **Attributes**:
136-
- `source`: The source of the trigger (e.g., API).
137-
- Errors encountered during the trigger.
138-
139-
##### 3) `opal_client_data_update_apply`
140-
- **Type**: Trace
141-
- **Description**: Represents the application of a data update within the OPAL client. This trace spans the process of fetching and applying data updates from the server.
142-
- **Attributes**:
143-
- Execution time.
144-
- Errors encountered during the update.
145-
146-
##### 4) `opal_client_policy_update_apply`
147-
- **Type**: Trace
148-
- **Description**: Represents the application of a policy update within the OPAL client. This trace spans the process of fetching and applying policy updates from the server.
149-
- **Attributes**:
150-
- Execution time.
151-
- Errors encountered during the update.
152-
153-
##### 5) `opal_client_policy_store_status`
154-
- **Type**: Metric (Observable Gauge)
155-
- **Description**: Indicates the current status of the policy store's authentication type used by the OPAL client.
156-
- **Attributes**:
157-
- `auth_type`: The authentication type configured for the policy store (e.g., TOKEN, OAUTH, NONE).
158-
- **Value**: The metric has a value of 1 when the policy store is active with the specified authentication type.
159-
160-
### Example
161-
162-
To monitor OPAL using Prometheus and Grafana, a ready-to-use Docker Compose configuration is provided in the root directory of the repository under docker. The file is named docker-compose-with-prometheus-and-otel.yml.
163-
164-
Run the following command to start Prometheus and Grafana:
165-
166-
```
167-
docker compose -f docker/docker-compose-with-prometheus-and-otel.yml up
168-
```
169-
170-
This setup will start Prometheus to scrape metrics from OPAL server and client, and Grafana to visualize the metrics.

0 commit comments

Comments
 (0)