You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this is enough to enable the basic cf push behaviour, it violates one of CF's abstractions that enables logs and metrics to be served by an external component that speaks a well-defined API.
Acceptance
GIVEN I have pushed an app to Korifi WHEN I run cf curl /api/v1/read/<app-guid>?envelope_types=GAUGE THEN I get a 403 Forbidden Response
WHEN I am bound to a role that is allowed to read cfapps WHEN I run cf curl /api/v1/read/<app-guid>?envelope_types=GAUGE THEN I get a resonse as follows
NOTE: this is the complete envelope as it is returned by classic cf. We should only support the minimal set of fields that enable basic cf commands (cf push, cf app)
georgethebeatle
changed the title
Expose Korifi's metrics-fetching capabilities via the /api/v1/read endpoint of the Korifi API
As a Korifi API user I want to be able to get app/process metrics via the /api/v1/read endpoint
Jan 24, 2025
* Allow `GAUGE` envelope type for the `envelope_type` query parameters
* The implementation assumes `LOGS` envelope type if not specified. This
is good enough for the current implementation and we do not have to
merge logs and gauges. We could change that in future if needed
* When the envelope type is `GAUGE` we ignore all the other query
paramters as we do not return historical data, i.e. all the gauge
values represent the current state.
Co-authored-by: Georgi Sabev <[email protected]>
Co-authored-by: Yusmen Zabanov <[email protected]>
Co-authored-by: Danail Branekov <[email protected]>
fixes#3752
* Allow `GAUGE` envelope type for the `envelope_type` query parameters
* The implementation assumes `LOGS` envelope type if not specified. This
is good enough for the current implementation and we do not have to
merge logs and gauges. We could change that in future if needed
* When the envelope type is `GAUGE` we ignore all the other query
paramters as we do not return historical data, i.e. all the gauge
values represent the current state.
Co-authored-by: Georgi Sabev <[email protected]>
Co-authored-by: Yusmen Zabanov <[email protected]>
Co-authored-by: Danail Branekov <[email protected]>
fixes#3752
Co-authored-by: Georgi Sabev <[email protected]>
Co-authored-by: Yusmen Zabanov <[email protected]>
Background
As of today Korifi implements metrics-fetching by directly querying the custom resources provided by the metrics server.
While this is enough to enable the basic
cf push
behaviour, it violates one of CF's abstractions that enables logs and metrics to be served by an external component that speaks a well-defined API.Acceptance
GIVEN I have pushed an app to Korifi
WHEN I run
cf curl /api/v1/read/<app-guid>?envelope_types=GAUGE
THEN I get a 403 Forbidden Response
WHEN I am bound to a role that is allowed to read cfapps
WHEN I run
cf curl /api/v1/read/<app-guid>?envelope_types=GAUGE
THEN I get a resonse as follows
NOTE: this is the complete envelope as it is returned by classic cf. We should only support the minimal set of fields that enable basic cf commands (cf push, cf app)
WHEN I run
cf curl /api/v1/read/<app-guid>?envelope_types=GAUGE&start_time=<timestamp>
THEN I only get envelopes newer than
WHEN I run
cf curl /api/v1/read/<app-guid>?envelope_types=GAUGE&limit=1
THEN I only get one envelope
WHEN I run
cf curl /api/v1/read/<app-guid>?envelope_types=GAUGE&descending=true
THEN I get a the newest envelopes first
Dev Notes
Log Cache API
The text was updated successfully, but these errors were encountered: