Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doodoocoder
prometheus
提交
af04cb22
P
prometheus
项目概览
doodoocoder
/
prometheus
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
prometheus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
af04cb22
编写于
2月 14, 2020
作者:
B
Björn Rabenstein
提交者:
GitHub
2月 14, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6821 from prometheus/release-2.16
Release 2.16
上级
fe76ccbf
b90be6f3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
48 addition
and
13 deletion
+48
-13
CHANGELOG.md
CHANGELOG.md
+30
-0
VERSION
VERSION
+1
-1
cmd/prometheus/query_log_test.go
cmd/prometheus/query_log_test.go
+13
-3
pkg/textparse/openmetricsparse.go
pkg/textparse/openmetricsparse.go
+2
-8
promql/engine.go
promql/engine.go
+2
-1
未找到文件。
CHANGELOG.md
浏览文件 @
af04cb22
## 2.16.0 / 2020-02-13
*
[FEATURE] React UI: Support local timezone on /graph #6692
*
[FEATURE] PromQL: add absent_over_time query function #6490
*
[FEATURE] Adding optional logging of queries to their own file #6520
*
[ENHANCEMENT] React UI: Add support for rules page and "Xs ago" duration displays #6503
*
[ENHANCEMENT] React UI: alerts page, replace filtering togglers tabs with checkboxes #6543
*
[ENHANCEMENT] TSDB: Export metric for WAL write errors #6647
*
[ENHANCEMENT] TSDB: Improve query performance for queries that only touch the most recent 2h of data. #6651
*
[ENHANCEMENT] PromQL: Refactoring in parser errors to improve error messages #6634
*
[ENHANCEMENT] PromQL: Support trailing commas in grouping opts #6480
*
[ENHANCEMENT] Scrape: Reduce memory usage on reloads by reusing scrape cache #6670
*
[ENHANCEMENT] Scrape: Add metrics to track bytes and entries in the metadata cache #6675
*
[ENHANCEMENT] promtool: Add support for line-column numbers for invalid rules output #6533
*
[ENHANCEMENT] Avoid restarting rule groups when it is unnecessary #6450
*
[BUGFIX] React UI: Send cookies on fetch() on older browsers #6553
*
[BUGFIX] React UI: adopt grafana flot fix for stacked graphs #6603
*
[BUFGIX] React UI: broken graph page browser history so that back button works as expected #6659
*
[BUGFIX] TSDB: ensure compactionsSkipped metric is registered, and log proper error if one is returned from head.Init #6616
*
[BUGFIX] TSDB: return an error on ingesting series with duplicate labels #6664
*
[BUGFIX] PromQL: Fix unary operator precedence #6579
*
[BUGFIX] PromQL: Respect query.timeout even when we reach query.max-concurrency #6712
*
[BUGFIX] PromQL: Fix string and parentheses handling in engine, which affected React UI #6612
*
[BUGFIX] PromQL: Remove output labels returned by absent() if they are produced by multiple identical label matchers #6493
*
[BUGFIX] Scrape: Validate that OpenMetrics input ends with
`# EOF`
#6505
*
[BUGFIX] Remote read: return the correct error if configs can't be marshal'd to JSON #6622
*
[BUGFIX] Remote write: Make remote client
`Store`
use passed context, which can affect shutdown timing #6673
*
[BUGFIX] Remote write: Improve sharding calculation in cases where we would always be consistently behind by tracking pendingSamples #6511
*
[BUGFIX] Ensure prometheus_rule_group metrics are deleted when a rule group is removed #6693
## 2.15.2 / 2020-01-06
*
[BUGFIX] TSDB: Fixed support for TSDB blocks built with Prometheus before 2.1.0. #6564
...
...
VERSION
浏览文件 @
af04cb22
2.1
5.2
2.1
6.0
cmd/prometheus/query_log_test.go
浏览文件 @
af04cb22
...
...
@@ -105,7 +105,7 @@ func (p *queryLogTest) query(t *testing.T) {
switch
p
.
origin
{
case
apiOrigin
:
r
,
err
:=
http
.
Get
(
fmt
.
Sprintf
(
"http://%s:%d%s/api/v1/query
?
query=%s"
,
"http://%s:%d%s/api/v1/query
_range?step=5&start=0&end=3600&
query=%s"
,
p
.
host
,
p
.
port
,
p
.
prefix
,
...
...
@@ -148,7 +148,15 @@ func (p *queryLogTest) queryString() string {
func
(
p
*
queryLogTest
)
validateLastQuery
(
t
*
testing
.
T
,
ql
[]
queryLogLine
)
{
q
:=
ql
[
len
(
ql
)
-
1
]
testutil
.
Equals
(
t
,
p
.
queryString
(),
q
.
Params
.
Query
)
testutil
.
Equals
(
t
,
0
,
q
.
Params
.
Step
)
switch
p
.
origin
{
case
apiOrigin
:
testutil
.
Equals
(
t
,
5
,
q
.
Params
.
Step
)
testutil
.
Equals
(
t
,
"1970-01-01T00:00:00.000Z"
,
q
.
Params
.
Start
)
testutil
.
Equals
(
t
,
"1970-01-01T01:00:00.000Z"
,
q
.
Params
.
End
)
default
:
testutil
.
Equals
(
t
,
0
,
q
.
Params
.
Step
)
}
if
p
.
origin
!=
ruleOrigin
{
host
:=
p
.
host
...
...
@@ -160,7 +168,7 @@ func (p *queryLogTest) validateLastQuery(t *testing.T, ql []queryLogLine) {
switch
p
.
origin
{
case
apiOrigin
:
testutil
.
Equals
(
t
,
p
.
prefix
+
"/api/v1/query"
,
q
.
Request
.
Path
)
testutil
.
Equals
(
t
,
p
.
prefix
+
"/api/v1/query
_range
"
,
q
.
Request
.
Path
)
case
consoleOrigin
:
testutil
.
Equals
(
t
,
p
.
prefix
+
"/consoles/test.html"
,
q
.
Request
.
Path
)
case
ruleOrigin
:
...
...
@@ -356,6 +364,8 @@ type queryLogLine struct {
Params
struct
{
Query
string
`json:"query"`
Step
int
`json:"step"`
Start
string
`json:"start"`
End
string
`json:"end"`
}
`json:"params"`
Request
struct
{
Path
string
`json:"path"`
...
...
pkg/textparse/openmetricsparse.go
浏览文件 @
af04cb22
...
...
@@ -90,7 +90,6 @@ type OpenMetricsParser struct {
hasTS
bool
start
int
offsets
[]
int
prev
token
eOffsets
[]
int
exemplar
[]
byte
...
...
@@ -233,19 +232,14 @@ func (p *OpenMetricsParser) Next() (Entry, error) {
p
.
exemplarVal
=
0
p
.
hasExemplarTs
=
false
t
:=
p
.
nextToken
()
defer
func
()
{
p
.
prev
=
t
}()
switch
t
{
switch
t
:=
p
.
nextToken
();
t
{
case
tEofWord
:
if
t
:=
p
.
nextToken
();
t
!=
tEOF
{
return
EntryInvalid
,
errors
.
New
(
"unexpected data after # EOF"
)
}
return
EntryInvalid
,
io
.
EOF
case
tEOF
:
if
p
.
prev
!=
tEofWord
{
return
EntryInvalid
,
errors
.
New
(
"data does not end with # EOF"
)
}
return
EntryInvalid
,
io
.
EOF
return
EntryInvalid
,
errors
.
New
(
"data does not end with # EOF"
)
case
tHelp
,
tType
,
tUnit
:
switch
t
:=
p
.
nextToken
();
t
{
case
tMName
:
...
...
promql/engine.go
浏览文件 @
af04cb22
...
...
@@ -446,7 +446,8 @@ func (ng *Engine) exec(ctx context.Context, q *query) (v Value, w storage.Warnin
if
eq
,
ok
:=
q
.
Statement
()
.
(
*
EvalStmt
);
ok
{
params
[
"start"
]
=
formatDate
(
eq
.
Start
)
params
[
"end"
]
=
formatDate
(
eq
.
End
)
params
[
"step"
]
=
eq
.
Interval
// The step provided by the user is in seconds.
params
[
"step"
]
=
int64
(
eq
.
Interval
/
(
time
.
Second
/
time
.
Nanosecond
))
}
f
:=
[]
interface
{}{
"params"
,
params
}
if
err
!=
nil
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录