podaac / swodlr

swodlr (swaa·dler) is a system for generating on demand raster products from SWOT L2 data
Apache License 2.0
4 stars 2 forks source link

Modify SWODLR component logs to support Cloud Metrics dashboards #127

Closed nikki-t closed 1 month ago

nikki-t commented 2 months ago

5/1/24: Additional request from viviant (5/1/24): Capture cycle, pass and scene in the logs to support Cloud Metrics dashboards.

4/23/24: We should modify the following components to support Cloud Metrics dashboards based on OPS team feedback.

SWODLR-APP Logs (service-swodlr-{venue}/service-swodlr-{venue}-app) and/or SWODLR-PROXY Logs (service-swodlr-{venue}/service-swodlr-{venue}-proxy)

Raster Create - Preflight (/aws/lambda/service-swodlr-{venue}-raster-create-preflight)

Raster Create - Wait For Complete (/aws/lambda/service-swodlr-{venue}-raster-create-wait_for_complete)

Raster Create Submit Evaluate (/aws/lambda/service-swodlr-{venue}-raster-create-submit_evaluate)

Raster Create Submit Raster (/aws/lambda/service-swodlr-{venue}-raster-create-submit_raster)

Google Sheet field mappings. Yellow indicates modifications required.

nikki-t commented 2 months ago

It looks like errors are not being captured in the Cloud Metrics platform. According to the Cloud Metrics team this may be because the tracebacks captured by a field are too long.

It would be good to log the error message independent of the traceback and capture that as a field in the Cloud Metrics platform. I have updated the Google Sheet to reflect the need for error messages.

joshgarde commented 2 months ago

PR opened for raster-create changes - https://github.com/podaac/swodlr-raster-create/pull/30

Changes requested for raster-create/ingest-to-sds regarding error logging would need to be handled in a separate ticket as it requires an overhaul of our error handling

viviant100 commented 2 months ago

Add additional request to capture cycle, pass and scene in the logs to support Cloud Metrics dashboards. Also updated in the original ticket description.

viviant100 commented 2 months ago

PR opened for raster-create changes - podaac/swodlr-raster-create#30

Changes requested for raster-create/ingest-to-sds regarding error logging would need to be handled in a separate ticket as it requires an overhaul of our error handling

@joshgarde Could you add the separate ticket number here for reference?

joshgarde commented 2 months ago

Add additional request to capture cycle, pass and scene in the logs to support Cloud Metrics dashboards. Also updated in the original ticket description.

CPS has been captured as part of the full input parameter dump in the SDS metrics log message. Lmk if that's insufficient

https://github.com/podaac/swodlr-raster-create/blob/adbd96f8ae0aeba5d42383c052535ead94d0e118/podaac/swodlr_raster_create/wait_for_complete.py#L54

viviant100 commented 2 months ago

Add additional request to capture cycle, pass and scene in the logs to support Cloud Metrics dashboards. Also updated in the original ticket description.

CPS has been captured as part of the full input parameter dump in the SDS metrics log message. Lmk if that's insufficient

https://github.com/podaac/swodlr-raster-create/blob/adbd96f8ae0aeba5d42383c052535ead94d0e118/podaac/swodlr_raster_create/wait_for_complete.py#L54

Could you provide an example of what full input parameter dump look like?

joshgarde commented 2 months ago

The log messages look like this

[INFO] 2024-05-02T02:26:32.322Z 71405e69-65f0-4c10-8dd2-31a485ab1f46 [product_id: dddc01df-ce80-4f7e-9882-d6323cb6b852, job_id: 95c91f57-1dd2-4b1e-86c7-9e48af6cac71] SDS metrics: {"metrics": {"time_queued": "2024-05-02T01:37:15.106528Z", "time_start": "2024-05-02T01:38:11.371278Z", "time_end": "2024-05-02T02:25:47.097290Z"}, "input": {"product_id": "dddc01df-ce80-4f7e-9882-d6323cb6b852", "output_granule_extent_flag": false, "output_sampling_grid_type": "UTM", "raster_resolution": 1000, "utm_zone_adjust": 0, "mgrs_band_adjust": 0, "cycle": 9, "pass": 39, "scene": 113}} 
joshgarde commented 2 months ago

PR opened for raster-create changes - podaac/swodlr-raster-create#30 Changes requested for raster-create/ingest-to-sds regarding error logging would need to be handled in a separate ticket as it requires an overhaul of our error handling

@joshgarde Could you add the separate ticket number here for reference?

https://github.com/podaac/swodlr/issues/131

viviant100 commented 1 month ago

swodlr field mapping: https://docs.google.com/spreadsheets/d/1uvl4APYAIAlprBfe44gDuXeYPSTExpdzpBnE_TKzwFQ/edit?pli=1#gid=0