Skip to content

Commit

Permalink
feat: DEVOPS-1843 opentelemetry metrics for nodes (#90)
Browse files Browse the repository at this point in the history
* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes

* feat: DEVOPS-1843 opentelemetry metrics for nodes
  • Loading branch information
pavlops authored Feb 18, 2025
1 parent 192aefc commit 834633e
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 6 deletions.
40 changes: 40 additions & 0 deletions zq2/docs/nodes/monitoring/opentelemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
id: nodes/monitoring/opentelemetry
title: OpenTelemetry
keywords:
- Node
- Validator
- Monitor
- OpenTelemetry
- Metrics
description: OpenTelemetry
---

# OpenTelemetry Metrics

[OpenTelemetry](https://opentelemetry.io/) is an open-source observability framework designed to generate,
collect, and manage telemetry data (metrics, traces, and logs) in distributed systems. It provides a
standardized way to instrument, generate, collect, and export telemetry data for analysis, making it easier
to monitor and troubleshoot complex distributed applications.

## Integration with Zilliqa

A Zilliqa node contains various performance and operational metrics compatible with the OpenTelemetry
protocol specification. These metrics are useful for:

- Monitoring node performance and health
- Understanding system behavior under different conditions
- Enabling proactive maintenance and troubleshooting

To export the OpenTelemetry metrics, you can define a collector endpoint with the `--otlp-endpoint`
parameter in `z2 join`, for example `http://localhost:4317`:

```bash
z2 join --chain zq2-prototestnet --otlp-endpoint=http://localhost:4317
```

This endpoint should point to a OpenTelemetry compatible [collector](https://opentelemetry.io/docs/collector/)
in your monitoring stack such as:

- [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector)
- [Ops Agent](https://cloud.google.com/monitoring/agent/ops-agent/otlp)
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
id: nodes/validatormonitoring
id: nodes/monitoring/statsagent
title: Validator Monitoring
keywords:
- Node
- Validator
- Monitoring
description: Validator Monitoring
description: Validator Stats Agent
---

# Validator Stats Agent Setup Guide
Expand Down
14 changes: 12 additions & 2 deletions zq2/docs/nodes/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,25 @@ base. Follow the step by step guide to setup your node:
```
_NOTE: You can replace `zq2-prototestnet` with `zq2-protomainnet` depending on
which network you want your node to join._
8. Generate the node private key.

8. (Optional) A Zilliqa node contains various performance and operational metrics compatible with the OpenTelemetry
protocol specification. If you want to export these metrics you can define a [collector](https://opentelemetry.io/docs/collector/)
endpoint with the `--otlp-endpoint` parameter in `z2 join` pointing to your own OpenTelemetry monitoring stack, for example:
```bash
z2 join --chain zq2-prototestnet --otlp-endpoint=http://localhost:4317
```
_NOTE: For more details on testing and using the available OpenTelemetry
metrics refer to the [OpenTelemetry](monitoring/opentelemetry.md) page._

9. Generate the node private key.
```bash
openssl rand -hex 32 > node-private-key.txt
export PRIVATE_KEY=$(cat node-private-key.txt)
```
_NOTE: Please save the node key as described above. You may need it
in the future to restart the node to generate the BLS public
key of the node._
9. Now it's time to decide how the node will synchronize with the network.
10. Now it's time to decide how the node will synchronize with the network.
There are two options you can choose from:

- Synchronization from a checkpoint.
Expand Down
5 changes: 3 additions & 2 deletions zq2/mkdocs.in.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ nav:
- nodes/checkpoints/index.md
- Downloads: nodes/checkpoints/download.md
- Node FAQ: nodes/nodefaq.md
- Validator Monitoring: nodes/validatormonitoring.md

- Monitoring:
- Validator Stats Agent: nodes/monitoring/statsagent.md
- OpenTelemetry: nodes/monitoring/opentelemetry.md
- Staking:
- Overview: staking/index.md
- Delegated Staking: staking/delegatedstaking.md
Expand Down

0 comments on commit 834633e

Please sign in to comment.