Skip to content
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

Add more Metrics to the new Metrics API #397

Open
aaronbrethorst opened this issue Mar 2, 2025 · 3 comments
Open

Add more Metrics to the new Metrics API #397

aaronbrethorst opened this issue Mar 2, 2025 · 3 comments

Comments

@aaronbrethorst
Copy link
Member

aaronbrethorst commented Mar 2, 2025

We are extracting code from the onebusaway-watchdog-webapp module and moving it into onebusaway-transit-data-federation and onebusaway-api-webapp in order to flesh out our new, easier-to-use Metrics API that will be used to power our new standalone Watchdog service.

See here for the original PR that added the Metrics API: #395

How to

Adding a new metric to the Metrics API will require you to edit two files:

  1. onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/beans/MetricsBeanServiceImpl.java
  2. onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/MetricsBean.java
@SmilingPixel
Copy link

SmilingPixel commented Mar 3, 2025

Hi, I’m working on moving the metrics to the new Metrics API. I noticed that some metrics (e.g., last-update-delta) require agencyId and feedId as parameters, but the current MetricsBean and MetricsBeanServiceImpl don’t seem to support these parameters.

Could you please provide guidance on how to proceed? Should we modify the MetricsBean to include these parameters, introduce a new interface (e.g., getMetrics(String agencyId, String feedId)), or is there another recommended approach? Any advice would be greatly appreciated!

Thanks!

@Satyam709
Copy link
Contributor

I'm working on this issue and implementing remaining metrics.

@Satyam709
Copy link
Contributor

@aaronbrethorst please review #413 i have added few more metrics , let me know if something to be changed.

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

No branches or pull requests

3 participants