Comments (5)
Yes, we'd be happy to accept a PR with this functionality. Thanks.
from go-wavefront.
In addition, can I add two more features to my PR?
- According to the API,
QueryResult {
warnings (string, optional): The warnings incurred by this query ,
name (string, optional): The name of this query ,
query (string, optional): The query used to obtain this result ,
timeseries (Array[Timeseries], optional),
stats (StatsModel, optional),
events (Array[QueryEvent], optional),
granularity (integer, optional): The granularity of the returned results, in seconds
}
I would like to add warnings
as an attribute to the queryResponse struct https://github.com/spaceapegames/go-wavefront/blob/master/query.go#L72
This will be helpful for debugging purposes. For example, sometiimes the returned Timeseries
is empty and the warnings
tell you the reason, even if the response.statuscode is still 200 (query succeeded).
- The
Execute()
function (https://github.com/spaceapegames/go-wavefront/blob/master/query.go#L127) doesn't check the response statuscode. I want to update this function so that it returns an error with the response message as a string if the statuscode is not 200.
from go-wavefront.
Those both sound like great ideas. Look forward to your PR.
from go-wavefront.
@louism517 Here is my PR #11
I just noticed that the http statuscode was already handled properly in client.go. So I didn't make any changes to the Execute()
function.
from go-wavefront.
close it per PR #11
from go-wavefront.
Related Issues (13)
- Request to become a contributor to this project. HOT 2
- Add support for updating tags on Alerts and Dashboards HOT 1
- Add HTML format support for Email Alert Targets HOT 3
- Support for multi-threshold alerts
- Add support to fetch metric source from Alerts
- Boolean params in wavefront.QueryParams not set correctly in http request to wavefront API HOT 1
- QueryResponse must include errorType and errorMessage types
- Add support configuring http.client timeout
- Query interval
- Current Release 1.7.2 is missing v and making it difficult to use with gomod HOT 2
- Add chartAttributes support HOT 2
- Support for chartSettings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-wavefront.