Repository: google/mtail

Issue #202: del after duration / expire not working 
Created: 2019-01-16T04:03:40Z
mtail version
mtail version  git revision  go version go1.11.4 go arch amd64 go os darwin
git revision f8eca1029c15a6a9d3c125bb9d5771a0a6cc4b42 
what happened
trying to test expire metric by following linecount.mtail :
counter line_count_1 by a
counter line_count_2

/$/ {
  line_count_1["a"]++
  del line_count_1["a"] after 30s

  line_count_2++
  del line_count_2 after 30s
}


I0115 21:57:33.034933   56251 main.go:91] mtail version  git revision  go version go1.11.4 go arch amd64 go os darwin
I0115 21:57:33.035145   56251 main.go:92] Commandline: ["/private/var/folders/sd/n7x4tn6j0vz9jqn00w901ss95pmzml/T/___run" "--logtostderr" "--progs" "mtail/__test/linecount.mtail" "--logs" "mtail/__test/sample.log"]
I0115 21:57:33.035949   56251 loader.go:219] Loaded program linecount.mtail
I0115 21:57:33.035959   56251 loader.go:238] Program linecount.mtail has goroutine marker 0x6c696e65
I0115 21:57:33.035992   56251 vm.go:749] Starting program linecount.mtail
I0115 21:57:33.035998   56251 loader.go:242] Started linecount.mtail
I0115 21:57:33.036428   56251 tail.go:254] Tailing mtail/__test/sample.log
I0115 21:57:33.036544   56251 mtail.go:251] Listening on [::]:3903
browser output
# TYPE line_count_1 counter
# line_count_1 defined at linecount.mtail:1:9-20
line_count_1{a="a",prog="linecount.mtail"} 3
# TYPE line_count_2 counter
# line_count_2 defined at linecount.mtail:2:9-20
line_count_2{prog="linecount.mtail"} 3

expected behavior
line_count_1 and line_count_2 to be deleted after 30s
actual behavior
none of the metrics expire

Duplicate issue #204: del after duration / expire not working
Created: 2019-01-28T22:29:02Z
I had created an issue which got closed without resolution and requesting @jaqx0r  to re open didn't get any reply so re creating/opening for resolution.
mtail version
mtail version  git revision  go version go1.11.4 go arch amd64 go os darwin
git revision f8eca1029c15a6a9d3c125bb9d5771a0a6cc4b42 
what happened
trying to test expire metric by following linecount.mtail :
counter line_count_1 by a
counter line_count_2

/$/ {
  line_count_1["a"]++
  del line_count_1["a"] after 30s

  line_count_2++
  del line_count_2 after 30s
}


I0115 21:57:33.034933   56251 main.go:91] mtail version  git revision  go version go1.11.4 go arch amd64 go os darwin
I0115 21:57:33.035145   56251 main.go:92] Commandline: ["/private/var/folders/sd/n7x4tn6j0vz9jqn00w901ss95pmzml/T/___run" "--logtostderr" "--progs" "mtail/__test/linecount.mtail" "--logs" "mtail/__test/sample.log"]
I0115 21:57:33.035949   56251 loader.go:219] Loaded program linecount.mtail
I0115 21:57:33.035959   56251 loader.go:238] Program linecount.mtail has goroutine marker 0x6c696e65
I0115 21:57:33.035992   56251 vm.go:749] Starting program linecount.mtail
I0115 21:57:33.035998   56251 loader.go:242] Started linecount.mtail
I0115 21:57:33.036428   56251 tail.go:254] Tailing mtail/__test/sample.log
I0115 21:57:33.036544   56251 mtail.go:251] Listening on [::]:3903
browser output
# TYPE line_count_1 counter
# line_count_1 defined at linecount.mtail:1:9-20
line_count_1{a="a",prog="linecount.mtail"} 3
# TYPE line_count_2 counter
# line_count_2 defined at linecount.mtail:2:9-20
line_count_2{prog="linecount.mtail"} 3

expected behavior
line_count_1 and line_count_2 to be deleted after 30s
actual behavior
none of the metrics expire

Closing comment (2019-01-29T03:18:03Z): Closing as dupe of #202