{"id":33414558,"url":"https://github.com/apache/incubator-resilientdb-reslens-middleware","last_synced_at":"2026-04-11T20:05:26.312Z","repository":{"id":265631070,"uuid":"891781903","full_name":"apache/incubator-resilientdb-ResLens-Middleware","owner":"apache","description":"Global-Scale Sustainable Blockchain Fabric","archived":false,"fork":false,"pushed_at":"2025-11-23T11:48:08.000Z","size":212,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-11-23T13:14:28.237Z","etag":null,"topics":["blockchain","blockchain-platform","crypto","distributed-database","distributed-ledger","key-value-database","smart-contracts","solidity","utxo"],"latest_commit_sha":null,"homepage":"https://resilientdb.incubator.apache.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-21T00:10:19.000Z","updated_at":"2025-11-23T11:48:11.000Z","dependencies_parsed_at":"2024-11-30T08:29:10.161Z","dependency_job_id":"de925785-1e40-4e3f-ac6f-df19b2118ce7","html_url":"https://github.com/apache/incubator-resilientdb-ResLens-Middleware","commit_stats":null,"previous_names":["harish876/memlens-middleware","resilientecosystem/memlens-middleware","resilientecosystem/reslens-middleware","apache/incubator-resilientdb-reslens-middleware"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/apache/incubator-resilientdb-ResLens-Middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ResLens-Middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ResLens-Middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ResLens-Middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ResLens-Middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/incubator-resilientdb-ResLens-Middleware/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-resilientdb-ResLens-Middleware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286020955,"owners_count":27272089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-23T02:00:06.149Z","response_time":135,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","blockchain-platform","crypto","distributed-database","distributed-ledger","key-value-database","smart-contracts","solidity","utxo"],"created_at":"2025-11-23T21:02:17.140Z","updated_at":"2025-11-23T21:02:21.074Z","avatar_url":"https://github.com/apache.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n**DEPRECATION NOTICE**\n\nThis repository is deprecated.\nActive development now continues in the [ResilientDB Monorepo](https://github.com/apache/incubator-resilientdb).\n\nThe ResilientDB ResLens Middleware service can be found at [ecosystem/monitoring/reslens-middleware](https://github.com/apache/incubator-resilientdb/tree/master/ecosystem/monitoring/reslens-middleware).\n\n# Monitoring Sidecar for ResLens\n\nThis repository contains the **Monitoring Sidecar** for the ResLens project. The sidecar is designed to monitor the parent process running on the host using tools like **Pyroscope** and **Process Exporter**. It runs as a Docker container and collects profiling and process-level metrics for real-time performance monitoring.\n\n---\n\n## Features\n\n- **Profiling with Pyroscope**: Captures CPU and memory profiling data for the parent process on the host.\n- **Process Monitoring with Process Exporter**: Exposes process-level metrics for Prometheus scraping.\n- **Containerized Deployment**: Runs as a Docker container for easy integration with the MemLens project.\n- **Host Monitoring**: Monitors the parent process running on the host by sharing the process namespace and filesystem.\n\n---\n\n## Folder Structure\n\nThe repository is organized as follows:\n\n`/pyroscope` Dockerfile # Builds the Pyroscope server and client image connect_pyroscope.js # Script to connect Pyroscope to the parent process pyroscope-data # Directory for storing Pyroscope server data\n\n`/process-exporter` Dockerfile # Builds the Process Exporter image config.yml # Configuration file for Process Exporter\n\n`/middleware` Dockerfile # Builds the middleware API service server.js # Main entry point for the middleware service package.json # Node.js dependencies for the middleware service\n\n`docker-compose.yml` # Orchestrates the Pyroscope and Process Exporter containers README.md # Documentation for the repository\n\n\n---\n\n## Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- **Docker**: Required to run the sidecar containers.\n- **Prometheus**: For scraping metrics exposed by the Process Exporter.\n- **Pyroscope**: For profiling data visualization.\n\n---\n\n## Usage\n\n### 1. Build and Run the Sidecar\nUse Docker Compose to build and run the monitoring sidecar:\n```bash\ndocker-compose down\n```\n```bash\ndocker-compose build\n```\n```bash\ndocker-compose up -d\n```\n### 2. Access Pyroscope\n```bash\nhttp://localhost:4040\n```\n### 3. Access Process Exporter Metrics\n```bash\nhttp://localhost:9256/metrics\n```\n\n---\n\n## How It Works\n### Pyroscope Client:\n\nThe Pyroscope client connects to the parent process running on the host using the connect_pyroscope.js script.\nIt uses eBPF or other profiling methods to capture CPU and memory usage.\n\n### Process Exporter:\n\nThe Process Exporter monitors the parent process and exposes metrics in a Prometheus-compatible format.\nIt uses a configuration file (config.yml) to specify which processes to monitor.\nHost Integration:\n\nThe containers share the host's process namespace (pid: \"host\") and mount the host's proc filesystem to access process information.\n\n### Security Considerations\nThe containers run with elevated privileges (privileged: true) to access host resources. Use this setup cautiously in production environments.\nEnsure that only trusted users can access the exposed metrics and profiling data.\n\n### Host Changes needed\n1. Add process-exporter to prometheus.conf file\n\n\n## TODO\n1. Add ResView as a sidecar service.\n2. Feature ideas for log tracing on both crow and resdb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fincubator-resilientdb-reslens-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fincubator-resilientdb-reslens-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fincubator-resilientdb-reslens-middleware/lists"}