developmentseed / eoAPI

[Active Development] Earth Observation API (Metadata, Raster and Vector services)
https://eoapi.dev
MIT License
191 stars 20 forks source link

Add observability to STAC, Raster APIs #193

Open smohiudd opened 1 month ago

smohiudd commented 1 month ago

Problem description

Some partners may need usage metrics from the STAC or Raster API to assess most access collections, items etc. This could be be achieved by instrumenting the APIs to emit metrics, traces and logs. Observability data can then be visualized or analyzed in Cloudwatch or Grafana.

The VEDA Data Services team has implemented STAC and Raster Observability to get fine grained analytics in Grafana that can tell us the most accessed collections using the /collections/{collection_id} endpoint for example. Metrics could also be obtained for Raster endpoints.

See the VEDA implementation in the STAC API for more details: https://github.com/NASA-IMPACT/veda-backend/blob/develop/stac_api/runtime/src/monitoring.py

A potential feature implementation would instrument the APIs using OpenTelemetry or AWS Lambda Powertools. Grafana could also be be deployed as part of the infrastructure however this could be left to individual implementors as well.

zacharyDez commented 1 month ago

@vincentsarago; do you think we should move this conversation to https://github.com/developmentseed/eoapi-devseed?

vincentsarago commented 1 month ago

the issue can still live here but any dev should go either on eoapi-cdk or eoapi-devseed