Skip to content

Prom client#6

Merged
dantheuber merged 10 commits into
mainfrom
prom-client
Aug 17, 2025
Merged

Prom client#6
dantheuber merged 10 commits into
mainfrom
prom-client

Conversation

@dantheuber
Copy link
Copy Markdown
Member

  • integrate prom-client for Prometheus metrics
  • provide example http server utilizing pokeapi.co for a third party dependency
  • added integration tests
  • update readme to be more concise and remove emojis

@dantheuber dantheuber requested a review from Copilot August 17, 2025 04:23

This comment was marked as outdated.

@dantheuber dantheuber requested a review from Copilot August 17, 2025 04:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates Prometheus metrics collection using prom-client library, adds comprehensive testing infrastructure, and provides a practical example server. The main enhancement allows dependency monitoring with standardized Prometheus metrics while maintaining backward compatibility.

  • Replaced custom Prometheus format with industry-standard prom-client library
  • Added integration testing with mock server and real HTTP dependencies
  • Created example server demonstrating PokeAPI monitoring with metrics endpoint

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/monitor.test.ts Added unit tests for prom-client integration and registry management
test/integration/mock-server.ts New mock HTTP server for integration testing
test/integration/mock-server.integration.test.ts Integration tests using mock server with DependencyMonitor
src/types/dependency-monitor-options.ts Added registry and collectDefaultMetrics options
src/types/dependency-monitor-interface.ts Added getPrometheusRegistry method to interface
src/monitor.ts Major refactor to use prom-client instead of custom metrics formatting
package.json Added prom-client dependency and version bump
example/server.js Complete example HTTP server with PokeAPI monitoring
example/README.md Documentation for the example server
README.md Updated documentation to reflect new features and simplified structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread test/integration/mock-server.ts
Comment thread example/server.js
Comment thread README.md
Comment thread README.md
@dantheuber dantheuber merged commit 5492400 into main Aug 17, 2025
1 check passed
@dantheuber dantheuber deleted the prom-client branch August 17, 2025 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants