This repository was archived by the owner on Dec 4, 2025. It is now read-only.
Draft
Conversation
…ometheus YAML files
…listen address to bind to all ports
Squashed commit of the following: commit 7caf024 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 15:51:42 2025 -0600 Update eliza to use latest aiden-stable w/ braintrust integration commit e3e0d9c Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 15:42:30 2025 -0600 Remove otel instrumentator. Lock prometheus instrumentator version commit caa6d9a Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 15:39:42 2025 -0600 Add gha for deploying prometheus to prod commit 7c9ae67 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 15:06:31 2025 -0600 Fix prometheus config for prod commit def172c Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 12:25:10 2025 -0600 Add GitHub Actions workflow for deploying Prometheus to staging commit 062e0af Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 12:24:31 2025 -0600 Rename stage environment from stage -> staging and update Prometheus listen address to bind to all ports commit 985e55e Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 12:24:02 2025 -0600 Name prometheus image commit 4c46596 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 10:17:58 2025 -0600 Add AWS ECR push command for Prometheus in Makefile commit df28165 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 10:17:52 2025 -0600 Add TODO comments for frontend and agent-runtime scrape configs in Prometheus YAML files commit 96382ef Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 10:09:24 2025 -0600 Add Prometheus configuration files for development and staging and prod envs. commit 3873332 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 10:08:55 2025 -0600 Move fastapi prometheus instrumentation outside of lifespan commit 6e4842b Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 10:08:10 2025 -0600 Update API port to be consistent, and not in conflict with frontend/runtime (to 8003) commit 758b9a3 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 10:07:36 2025 -0600 Add support for using different prometheus config depending on env. commit c16a281 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 09:06:18 2025 -0600 Add prometheus' fastapi instrumentor commit d65e9a4 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 08:59:14 2025 -0600 Add prometheus as an app commit a0539b4 Author: Michael Deng <michaeldeng2003@gmail.com> Date: Fri Feb 28 08:27:47 2025 -0600 Add .env.example to apps/runtime w/ info about observability for eliza agents commit 2e05cea Author: Michael Deng <michaeldeng2003@gmail.com> Date: Wed Feb 26 17:10:16 2025 -0600 Add otel and auto instrument api server
This reverts commit 49cdbbe.
This reverts commit 78cb5a8.
Contributor
Author
|
monsieur @abjjabjj if you could take a look at the instrumentation in this pr when you get back, that would be great prometheus will be available at http://localhost:9090 you can run some queriers about your frontend, |
Contributor
Author
|
ill put a pr for this into main after 34 is merged |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What's been implemented:
Prometheus exporter using open telemetry so that prometheus backend in
apps/prometheuscan scrape the frontend's/metricsendpoint.Info dump:
Predominantly yoinked from this dudes solution. Relevant parent discussion regarding sticking a prometheus exporter into a next.js server
Next.js version 15 makes telemetry stable, so you don't need to configure nextConfig w/ experimental telemetry hook.
I used a similar solution in eliza
Next.js documentation on adding instrumentation
Why prom-client was not used
Quickstart:
prometheus will be available at http://localhost:9090
make sure that frontend was discovered in the status -> service discovery drop down
you can run some queries on prometheus about your frontend:
{job="frontend"}will list all metrics (go to table view)example metric w/ nothing fancy:
nodejs_eventloop_timewill graph your eventloop time (go to the graph)TODO: