jerryshao opened a new issue, #13041:
URL: https://github.com/apache/gravitino/issues/13041
### What would you like to be improved?
`JobOperations` has nine endpoints. Eight of them carry both `@Timed` and
`@ResponseMetered`; `cancelJob` carries only `@Timed`:
```java
//
server/src/main/java/org/apache/gravitino/server/web/rest/JobOperations.java:441
@POST
@Path("runs/{jobId}")
@Produces("application/vnd.gravitino.v1+json")
@Timed(name = "cancel-job." + MetricNames.HTTP_PROCESS_DURATION, absolute =
true)
@AuthorizationExpression(expression = "METALAKE::OWNER || JOB::OWNER")
public Response cancelJob(
```
The Jersey listener registered by `HttpServerMetricsSource` creates
response-class meters only for methods annotated with `@ResponseMetered`.
Without it, `gravitino-server.cancel-job.2xx-responses` and the matching
`4xx`/`5xx` meters are never registered, so `/metrics` reports the latency of a
cancel but never its outcome. A cancel that consistently fails with a 5xx
increments nothing and is invisible to any dashboard or alert built on those
meters, while every sibling endpoint in the same class reports its outcome
normally.
### How should we improve?
Add the missing annotation next to the existing `@Timed`, matching the eight
sibling endpoints:
```java
@Timed(name = "cancel-job." + MetricNames.HTTP_PROCESS_DURATION, absolute =
true)
@ResponseMetered(name = "cancel-job", absolute = true)
```
Good first issue: a one-line change in a single file, with the pattern to
copy right above it in the same class.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]