{"ref":"content:adding-custom-metrics-to-a-cap-application-using-cap-js-telementry-plugin-and-sa","page":"/content/adding-custom-metrics-to-a-cap-application-using-cap-js-telementry-plugin-and-sa","json":"/content/adding-custom-metrics-to-a-cap-application-using-cap-js-telementry-plugin-and-sa.json","generated":"2026-10-30","drafted_with_ai":true,"entity":{"id":"adding-custom-metrics-to-a-cap-application-using-cap-js-telementry-plugin-and-sa","title":"Adding Custom Metrics to a CAP application using cap-js/telementry plugin and SAP Cloud Logging","url":"https://community.sap.com/t5/technology-blog-posts-by-sap/adding-custom-metrics-to-a-cap-application-using-cap-js-telementry-plugin/ba-p/13744222","content_type":"blog","published_on":"source:sap-community","explains":[{"ref":"capability:telemetry","applies_to":{"ecosystems":["btp","cap"]}}],"summary":"Walks through adding a custom OpenTelemetry counter metric to a CAP application on top of [@cap-js/telemetry](artifact:cap-js-telemetry)'s built-in database-pool metrics, incrementing and decrementing it from a service handler on CREATE and UPDATE of high-urgency incidents. Shows the resulting metric in [SAP Cloud Logging](artifact:btp-cloud-logging)'s Discover and Visualize screens, building a custom visualisation from the exported metrics data.","short":"Custom OpenTelemetry metric in CAP with @cap-js/telemetry","author":"gopalanand","published":"2024-06-27","provenance":{"discovered_via":[{"source":"source:sap-community","channel":"kyma-tag"}],"first_seen":"2026-09-18"},"drafted_with_ai":true,"history":[{"date":"2026-10-17","field":"explains","from":null,"to":"applies_to on capability:telemetry (cap, btp)","reason":"Door scope proposed from the title and summary, so a door page lists the piece only where it holds (docs/concepts/content-on-doors.md)."}]},"readings":{"liveness":[{"label":"Checked against the source","tier":"unknown","evidence":"nobody has checked it"},{"label":"Source reachable","tier":"unknown","evidence":"not crawled"},{"label":"Age","tier":"fair","evidence":"published 28 months ago"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"good","evidence":"no recorded change after 2024-06-27"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":3766,"unit":"views"},{"value":1,"unit":"comments"},{"value":4,"unit":"likes"}]},"signals":{"views":3766,"likes":4,"comments":1,"metrics_at":"2026-10-25"},"series":null,"edges":{"authors":[]}}