Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
220f479f
Commit
220f479f
authored
Sep 28, 2018
by
Erik Sundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stackdriver: add support for int64 values
parent
4abd04a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
pkg/tsdb/stackdriver/stackdriver.go
+9
-1
pkg/tsdb/stackdriver/types.go
+2
-0
No files found.
pkg/tsdb/stackdriver/stackdriver.go
View file @
220f479f
...
...
@@ -305,7 +305,15 @@ func (e *StackdriverExecutor) parseResponse(queryRes *tsdb.QueryResult, data Sta
// reverse the order to be ascending
for
i
:=
len
(
series
.
Points
)
-
1
;
i
>=
0
;
i
--
{
point
:=
series
.
Points
[
i
]
points
=
append
(
points
,
tsdb
.
NewTimePoint
(
null
.
FloatFrom
(
point
.
Value
.
DoubleValue
),
float64
((
point
.
Interval
.
EndTime
)
.
Unix
())
*
1000
))
value
:=
point
.
Value
.
DoubleValue
if
series
.
ValueType
==
"INT64"
{
parsedValue
,
err
:=
strconv
.
ParseFloat
(
point
.
Value
.
IntValue
,
64
)
if
err
==
nil
{
value
=
parsedValue
}
}
points
=
append
(
points
,
tsdb
.
NewTimePoint
(
null
.
FloatFrom
(
value
),
float64
((
point
.
Interval
.
EndTime
)
.
Unix
())
*
1000
))
}
defaultMetricName
:=
series
.
Metric
.
Type
...
...
pkg/tsdb/stackdriver/types.go
View file @
220f479f
...
...
@@ -35,6 +35,8 @@ type StackdriverResponse struct {
Value
struct
{
DoubleValue
float64
`json:"doubleValue"`
StringValue
string
`json:"stringValue"`
BoolValue
bool
`json:"boolValue"`
IntValue
string
`json:"int64Value"`
}
`json:"value"`
}
`json:"points"`
}
`json:"timeSeries"`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment