ExpediaDotCom / haystack

Top level repository for Haystack, containing documentation and deployment scripts
http://expediadotcom.github.io/haystack
Apache License 2.0
306 stars 44 forks source link

[Feature Request] Custom links based on tags #755

Open worldtiki opened 5 years ago

worldtiki commented 5 years ago

A common issue I have is linking events across different monitoring systems. For example, a very common scenario would be me having to copy a trace id from Haystack, open a new tab, open some centralized logging tool like and paste the traceid there to see the logs for that particular trace.

I propose to add a new feature to the Haystack UI where we can configure custom links. These could be defined in a json file where we would have a title and the rules to build the link itself based on placeholders where we could resolve the values of different tags and potentially time windows as well. Example below:

[
    {
        "text": "Kibana",
        "url": "http://kibana.mycompany.com/?query=foo_bar=${traceId}"
    },
    {
        "text": "Grafana",
        "url": "http://grafana.mycompany.com/?dashboard=foo_bar=${serviceName}&startTime=${timestamp-5m}&endTime=${timestamp+5m}"
    }
]

The following is a good read on this, and how the same/similar feature works in Jaeger https://itnext.io/custom-links-in-jaeger-ui-3479f72bb815 And a similar feature in Zipkin: https://github.com/openzipkin/zipkin-classic#how-do-i-find-logs-associated-with-a-particular-trace

mchandramouli commented 5 years ago

@worldtiki this was a feature in our previous UI - we lost it when we did the UI. In fact had the same templating like you suggested above with startTime, endTime, serviceName, operationName and traceId. Shouldnt be too hard to add it back in. Both from trends view (start/endtime/servicename and operation) and in trace view (traceid) to any external system.