Package org.tailormap.api.controller
Class IngestMetricsController
java.lang.Object
org.tailormap.api.controller.IngestMetricsController
- All Implemented Interfaces:
TagNames
-
Field Summary
Fields inherited from interface org.tailormap.api.prometheus.TagNames
APP_ID_REPLACE_TOKEN, METRICS_APP_ID_TAG, METRICS_APP_LAYER_ID_TAG, METRICS_APP_LAYER_NAME_TAG, METRICS_APP_LAYER_TITLE_TAG, METRICS_APP_NAME_TAG, METRICS_APP_REQUEST_COUNTER_NAME, METRICS_APP_TYPE_TAG, NUMBER_OF_DAYS_REPLACE_TOKEN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Serializable>
ingestMetric
(Application app, ViewerResponse.KindEnum viewerKind, Set<String> appLayerIds, String allowedMetric) Ingests a metric for the given application layers and viewer kind.
-
Constructor Details
-
IngestMetricsController
public IngestMetricsController()
-
-
Method Details
-
ingestMetric
@PutMapping(path="${tailormap-api.base-path}/{viewerKind}/{viewerName}/metrics/ingest/{appLayerIds}/{allowedMetric}") public org.springframework.http.ResponseEntity<Serializable> ingestMetric(@ModelAttribute Application app, @ModelAttribute ViewerResponse.KindEnum viewerKind, @PathVariable Set<String> appLayerIds, @PathVariable String allowedMetric) Ingests a metric for the given application layers and viewer kind.- Parameters:
app
- the applicationviewerKind
- the kind of viewerappLayerIds
- the application layer IDs to ingest the metric forallowedMetric
- the metric to ingest- Returns:
- a ResponseEntity with status 204 No Content if successful, or 400 Bad Request if the metric is not allowed
-