mirror of
				https://github.com/taigrr/wtf
				synced 2025-01-18 04:03:14 -08:00 
			
		
		
		
	The NewRelic module relies on yfronto/newrelic, which no longer exists. yfronto deleted that directory quite awhile ago, and since then it has been vendored. But vendoring a missing repository creates problems when trying to update the vendored code. This PR brings the yfronto/newrelic code into the mainline. Signed-off-by: Chris Cummer <chriscummer@me.com>
		
			
				
	
	
		
			37 lines
		
	
	
		
			876 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			876 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package newrelic
 | |
| 
 | |
| import (
 | |
| 	"fmt"
 | |
| )
 | |
| 
 | |
| // GetMobileApplicationMetrics will return a slice of Metric items for a
 | |
| // particular MobileAplication ID, optionally filtering by
 | |
| // MetricsOptions.
 | |
| func (c *Client) GetMobileApplicationMetrics(id int, options *MetricsOptions) ([]Metric, error) {
 | |
| 	mc := NewMetricClient(c)
 | |
| 
 | |
| 	return mc.GetMetrics(
 | |
| 		fmt.Sprintf(
 | |
| 			"mobile_applications/%d/metrics.json",
 | |
| 			id,
 | |
| 		),
 | |
| 		options,
 | |
| 	)
 | |
| }
 | |
| 
 | |
| // GetMobileApplicationMetricData will return all metric data for a particular
 | |
| // MobileAplication and slice of metric names, optionally filtered by
 | |
| // MetricDataOptions.
 | |
| func (c *Client) GetMobileApplicationMetricData(id int, names []string, options *MetricDataOptions) (*MetricDataResponse, error) {
 | |
| 	mc := NewMetricClient(c)
 | |
| 
 | |
| 	return mc.GetMetricData(
 | |
| 		fmt.Sprintf(
 | |
| 			"mobile_applications/%d/metrics/data.json",
 | |
| 			id,
 | |
| 		),
 | |
| 		names,
 | |
| 		options,
 | |
| 	)
 | |
| }
 |