• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

torresj / infosas-api / 79

13 Nov 2025 10:16AM UTC coverage: 90.186% (-2.7%) from 92.857%
79

push

circleci

torresj
MEtrics endpoint added

2 of 13 new or added lines in 3 files covered. (15.38%)

340 of 377 relevant lines covered (90.19%)

0.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/src/main/java/com/torresj/infosas/controllers/MetricsController.java
1
package com.torresj.infosas.controllers;
2

3
import com.torresj.infosas.dtos.MetricsDto;
4
import com.torresj.infosas.services.MetricsService;
5
import io.swagger.v3.oas.annotations.Operation;
6
import io.swagger.v3.oas.annotations.media.ArraySchema;
7
import io.swagger.v3.oas.annotations.media.Content;
8
import io.swagger.v3.oas.annotations.media.Schema;
9
import io.swagger.v3.oas.annotations.responses.ApiResponse;
10
import io.swagger.v3.oas.annotations.responses.ApiResponses;
11
import lombok.RequiredArgsConstructor;
12
import lombok.extern.slf4j.Slf4j;
13
import org.springframework.http.ResponseEntity;
14
import org.springframework.web.bind.annotation.GetMapping;
15
import org.springframework.web.bind.annotation.RequestMapping;
16
import org.springframework.web.bind.annotation.RestController;
17

18
@RestController
19
@RequestMapping("/v1/metrics")
20
@Slf4j
1✔
21
@RequiredArgsConstructor
22
public class MetricsController {
23

24
    private final MetricsService metricsService;
25

26
    @Operation(summary = "Get INFOSAS metrics")
27
    @ApiResponses(
28
            value = {
29
                    @ApiResponse(
30
                            responseCode = "200",
31
                            description = "Success",
32
                            content = {
33
                                    @Content(
34
                                            mediaType = "application/json",
35
                                            array = @ArraySchema(schema = @Schema(implementation = MetricsDto.class)))
36
                            }),
37
            })
38
    @GetMapping()
39
    public ResponseEntity<MetricsDto> getMetrics(){
NEW
40
        log.info("Getting INFOSAS metrics");
×
NEW
41
        var metrics = metricsService.getMetrics();
×
NEW
42
        log.info("INFOSAS metrics found: {}", metrics);
×
NEW
43
        return ResponseEntity.ok(metrics);
×
44
    }
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc