mitchell852 opened a new issue #4741: URL: https://github.com/apache/trafficcontrol/issues/4741
## I'm submitting a ... <!-- (check all that apply with "[x]") --> <!--- security vulnerability (STOP!! - see above)--> - [ ] bug report - [ ] new feature / enhancement request - [x] improvement request (usability, performance, tech debt, etc.) - [ ] other <!--(Please do not submit support requests here - see above)--> ## Traffic Control components affected ... <!-- (check all that apply with "[x]") --> - [ ] CDN in a Box - [ ] Documentation - [ ] Grove - [ ] Traffic Control Client - [ ] Traffic Monitor - [x] Traffic Ops - [ ] Traffic Ops ORT - [ ] Traffic Portal - [ ] Traffic Router - [ ] Traffic Stats - [ ] Traffic Vault - [ ] unknown ## Current behavior: The current design of GET /deliveryservices_stats is not very flexible. For example: it has hardcoded aspects such as: https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/trafficstats/deliveryservice.go#L72 https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/trafficstats/deliveryservice.go#L80 what if i created a metric in influx called `foo.ds.5min`, it would not be accessible via this endpoint. The point of this endpoint is to allow system operators to store all types of metrics for a ds in influx and retrieve those metrics via this endpoint which has tenancy baked in. In addition, totals are calculated based on metric type and seem to assume that everything is "per second" https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/trafficstats/deliveryservice.go#L350 IMO totals can be calculated by the client from the data returned. ## Expected / new behavior: Design GET api/3.x/deliveryservice_stats to be more flexible and less specific to certain metrics (kbps/tps) or certain continuous queries (i.e. ds.1min) ## Minimal reproduction of the problem with instructions: n/a <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
