fastly / fastly-exporter

A Prometheus exporter for the Fastly Real-time Analytics API
Apache License 2.0
99 stars 36 forks source link

Reduce load on service endpoint by excluding versions from the response #119

Closed leklund closed 1 year ago

leklund commented 1 year ago

add query param filter[include_versions]=false to /services call. This ensures that the API doesn not return all versions for each service and will improve performance.

This has one small side effect -- services without an active version will no longer report the last active version as their version number bit will instead report version=0

before:

level=info component=api.fastly.com service=found service_id=SERVICE_ID name=bloggy version=2

after:

level=info component=api.fastly.com service=found service_id=SERVICE_ID name=bloggy version=0

This affects the fastly_rt_service_info gauge which has a version label. Since inactive services won't have any results from realtime stats I think this is an acceptable change.