google / google/mtail

Runtime errors should be more visible to users

Open
#221 14 comments 0 reactions 0 assignees View on GitHub
enhancement mtail-Operating
Dominant language
Go
Stars
4k
Forks
392
PR merge metrics
No merged PRs in 30d

Description

Details :
Problem : Metrics are not getting exposed.

Mtail version:
mtail version v3.0.0-rc16 git revision 77eeba903db0ffd90e29c1ee778fdefb0112bfab go version go1.11

Filesystem: NFS

Logs from the mtail:
```
I0325 01:19:17.267495 14907 file.go:171] /home/coherence_app_log/jmxreports/2019032510-memory-status.txt: file type does not support deadline
I0325 01:19:17.267802 14907 tail.go:246] Tailing /home/coherence_app_log/jmxreports/2019032510-memory-status.txt
I0325 01:19:17.267993 14907 file.go:112] open succeeded /home/coherence_app_log/jmxreports/2019032510-memory-status.txt
I0325 01:19:17.268001 14907 tail.go:236] Adding a file watch on "/home/coherence_app_log/jmxreports/2019032510-memory-status.txt"
I0325 01:19:17.268005 14907 log_watcher.go:277] Resolved path for lookup "/home/coherence_app_log/jmxreports/2019032510-memory-status.txt"
I0325 01:19:17.590447 14907 log_watcher.go:174] No modtime change for /home/coherence_app_log/jmxreports/2019032510-memory-status.txt, no send
I0325 01:19:17.820442 14907 file.go:171] /home/coherence_app_log/jmxreports/2019032510-memory-status.txt: file type does not support deadline
```

Log type:

```
1962 ?? 3 25 10:16:32 JST 2019 597277688 246 ParNew 2243 1.0 58409 18.0 597137142 19.0 4093640704 4294967296 4093640704 1635710024
1962 ?? 3 25 10:16:32 JST 2019 597273217 247 ParNew 2237 2.0 58401 37.0 597176319 17.0 4093640704 4294967296 4093640704 1252907928
1962 ?? 3 25 10:16:32 JST 2019 597270204 248 ParNew 2242 1.0 58623 15.0 597112242 15.0 4093640704 4294967296 4093640704 1715023800
1962 ?? 3 25 10:16:32 JST 2019 597267193 249 ParNew 2232 2.0 58527 37.0 597159391 18.0 4093640704 4294967296 4093640704 1267338656
1962 ?? 3 25 10:16:32 JST 2019 597262215 250 ParNew 2228 1.0 58006 19.0 597092171 19.0 4093640704 4294967296 4093640704 1730664056
1962 ?? 3 25 10:16:32 JST 2019 597258907 251 ParNew 2233 1.0 57737 23.0 597098542 23.0 4093640704 4294967296 4093640704 1639189488
1962 ?? 3 25 10:16:32 JST 2019 597255899 252 ParNew 2242 1.0 58491 17.0 597095164 16.0 4093640704 4294967296 4093640704 1697487040
```

Mtail program:
```
counter total_heap_committed by node_id, gc_name
counter total_heap_used by node_id, gc_name
counter total_heap_max by node_id, gc_name
counter total_heap_init by node_id, gc_name

def coherenceMemoryStatus {
/[\d]+\s[\?]+\s[\d]+\s[\d]+\s[\d]+:[\d]+:[\d]+\s[A-Za-z]+\s[\d]+\s[\d]+\s(?P[\d]+)\s(?P[A-Za-z]+)\s[\d]+\s[\d+\.\d+]+\s[\d]+\s[\d+\.\d+]+\s+[\d]+\s[\d+\.\d+]+\s(?P[\d]+)\s(?P[\d]+)\s(?P[\d]+)\s(?P[\d]+)/ {
next
}
}

@coherenceMemoryStatus {
total_heap_committed[$node_id][$gc_name] += $heap_committed
total_heap_used[$node_id][$gc_name] += $heap_used
total_heap_max[$node_id][$gc_name] += $heap_max
total_heap_init[$node_id][$gc_name] += $heap_init
}
```

**Some debug steps I used:**

I ran the simple line count program with the same file using --one_shot parameter. It given me the exact result.

Also locally I was able to parse the file and was able to get the result. But with NFS filesystem seems I was not able to get the similar result.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.