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
c8ec3a34
Commit
c8ec3a34
authored
Sep 10, 2018
by
Erik Sundell
Committed by
Daniel Lee
Sep 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stackdriver: Parse datapoints correctly
parent
97727d16
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
pkg/tsdb/stackdriver/stackdriver.go
+7
-2
No files found.
pkg/tsdb/stackdriver/stackdriver.go
View file @
c8ec3a34
...
...
@@ -15,6 +15,7 @@ import (
"github.com/grafana/grafana/pkg/api/pluginproxy"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/components/null"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
...
...
@@ -103,13 +104,17 @@ func (e *StackdriverExecutor) Query(ctx context.Context, dsInfo *models.DataSour
queryRes
:=
tsdb
.
NewQueryResult
()
for
_
,
series
:=
range
data
.
TimeSeries
{
points
:=
make
([]
tsdb
.
TimePoint
,
0
)
for
_
,
point
:=
range
series
.
Points
{
points
=
append
(
points
,
tsdb
.
NewTimePoint
(
null
.
FloatFrom
(
point
.
Value
.
DoubleValue
),
float64
((
point
.
Interval
.
EndTime
)
.
Unix
())
*
1000
))
}
queryRes
.
Series
=
append
(
queryRes
.
Series
,
&
tsdb
.
TimeSeries
{
Name
:
series
.
Metric
.
Type
,
// Points: []
,
Points
:
points
,
})
if
setting
.
Env
==
setting
.
DEV
{
// glog.Debug("Graphite response", "target", series.Target, "datapoints", len(series.DataP
oints))
glog
.
Debug
(
"Stackdriver response"
,
"target"
,
points
,
"datapoints"
,
len
(
p
oints
))
}
}
...
...
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