-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monitoring integration #272
Open
rpanic
wants to merge
15
commits into
develop
Choose a base branch
from
feature/monitoring
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
# Conflicts: # package-lock.json # packages/sequencer/src/protocol/production/sequencing/BlockProducerModule.ts
# Conflicts: # packages/sequencer/src/index.ts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a monitoring solution for protokit.
The architecture consists of the following components:
@proto-kit/api
package and is configurableAll docker-related files with default configuration of all services can be found in
packages/deployment/docker/monitoring
.Metrics: Prometheus
The SequencerModule
OpenTelemetryServer
is the base module for all things regarding metrics and traces. It receives a configuration for both functionalities.For metrics, the configuration should reflect the endpoint that this module should open up for
prometheus
to call into.Additionally, this endpoint has to be reachable from the
prometheus
container and be configured as a scrape_config in prometheus.yml.Note: Currently, Prometheus can currently only pick up metrics when the sequencer is run inside docker.
Traces: Otel-collector & Tempo
Traces work rather out-of-the-box by starting
otel-collector
andtempo
, and then configuring theOpenTelemetryServer
to use the otel-collector grpc endpoint. By default, this islocalhost:4318
(as to the port remapping indocker-compose.yml
). When running protokit inside a container, the hostname will obviously then beotel-collector
instead oflocalhost
.The role of the otel-collector is just to be a proxy to relay the data and add stability to the data pipeline (retries, etc).
Tempo is the actual trace database that grafana talks to.
Logs: Promtail & Loki
Configure your container with the following docker-compose config to attach labels to the container:
Note: Currently, Promtail can currently only pick up logs when the sequencer is run inside docker.
Things left to do:
How to start & test in framework
docker compose --profile monitoring up --force-recreate
packages/stack/test/start.test.ts