metrico / grafana-flow

Grafana 10+ Flow Diagram Visualization plugin
https://hepic.cloud
GNU Affero General Public License v3.0
9 stars 1 forks source link

On opening invite packet in method it shows it as invite. but in Line it shows it as 200 OK. #67

Closed naqashsaeed closed 4 months ago

naqashsaeed commented 5 months ago

Hi, I have tested new version of grafana-flow. I notice one thing that when we open an invite packet, in method it shows it as invite. but in Line, it shows it as 200 OK. image

lmangani commented 5 months ago

@AlexeyOplachko unless already patched, please reproduce and fix

AlexeyOplachko commented 5 months ago

This looks to be a confusion due to label naming. method label refers to method in CSeq, while response label is method is stated in Request-Line Evident from following excerpts from code in heplify-server

Source

methodResponses.WithLabelValues(srcTarget, "src", pkt.NodeName, pkt.SIP.FirstMethod, pkt.SIP.CseqMethod).Inc()

Note that FirstMethod (method in Request-Line set here) is set in 4th argument and Cseq method is set in 5th argument

Source

methodResponses = promauto.NewCounterVec(prometheus.CounterOpts{
        Name: "heplify_method_response",
        Help: "SIP method and response counter"},
        []string{"target_name", "direction", "node_id", "response", "method"})

And here you can see that response label is 4th in a struct and method is 5th

In addition to that, title of a flow item is set by response and type labels here