Skip to content

Conversation

@cshiels-ie
Copy link
Contributor

@cshiels-ie cshiels-ie commented Oct 28, 2025

  • Updated aap-mcp.sample.yaml to include configuration options for Prometheus metrics and Segment analytics.
  • Implemented AnalyticsService for tracking tool usage and service events with anonymized data.
  • Updated index.ts to initialize analytics and metrics services based on configuration.

Sends an initial message and then checks every 5 hours and updates the metrics to Segment.com

- Updated `aap-mcp.sample.yaml` to include configuration options for Prometheus metrics and Segment analytics.
- Added new `MetricsService` class for collecting and exposing metrics.
- Implemented `AnalyticsService` for tracking tool usage and service events with anonymized data.
- Enhanced `ToolLogger` to record metrics and analytics during tool execution.
- Introduced `/metrics` endpoint for Prometheus scraping.
- Updated `index.ts` to initialize analytics and metrics services based on configuration.
@goneri
Copy link
Contributor

goneri commented Oct 30, 2025

This is really cool. I believe we can merge the Prometheus support fairly quickly. Could you prepare a new PR with just this part? Could you also record which category is used?

@benthomasson
Copy link

@cshiels-ie please rebase this after your prometheus PR?

@benthomasson
Copy link

@jameswnl can you take a look at this PR?

@cshiels-ie cshiels-ie reopened this Nov 4, 2025
- Added configuration options for enabling analytics reporting and specifying the Segment write key in the YAML configuration file.
- Updated the Segment analytics-node dependency from version 2.1.2 to 2.3.0.
- Improved logging and error handling in the analytics service.
- Refactored code for better readability and maintainability, including consistent formatting and comments.
- Introduced a helper function for boolean configuration with environment variable overrides.
@cshiels-ie cshiels-ie changed the title [AI POC for Inspiration only] Add Prometheus metrics and Segment analytics integration [POC] Segment analytics integration Polls /Metrics (Prometheus Endpoint) every 5 hours Nov 4, 2025
@cshiels-ie
Copy link
Contributor Author

image Added Screenshot from data sent to segment.com

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.

3 participants