question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to search annotations or binaryAnnotations in kibana?

See original GitHub issue

i send trace info to es5, and i want to search annotations or binaryAnnotations from kibana.

i have one span json like this:

{
  "_index": "zipkin-2016-11-17",
  "_type": "span",
  "_id": "AVhw8k-GQpNFwf9ty7hN",
  "_score": null,
  "_source": {
    "traceId": "0f56baad2910df69",
    "timestamp_millis": 1479363860752,
    "annotations": [
      {
        "endpoint": {
          "ipv4": "10.8.0.2",
          "port": 18088,
          "serviceName": "first-example-dev"
        },
        "value": "cs",
        "timestamp": 1479363860752000
      },
      {
        "endpoint": {
          "ipv4": "10.8.0.2",
          "port": 18088,
          "serviceName": "first-example-dev"
        },
        "value": "cr",
        "timestamp": 1479363860903752
      }
    ],
    "parentId": "20c251aac430bf39",
    "duration": 151752,
    "binaryAnnotations": [
      {
        "endpoint": {
          "ipv4": "10.8.0.2",
          "port": 19091,
          "serviceName": "thrift"
        },
        "value": true,
        "key": "sa"
      }
    ],
    "name": "secondadd",
    "collector_timestamp_millis": "2016-11-17T06:21:18.086+0000",
    "id": "f83891ef110158ef",
    "timestamp": 1479363860752000
  },
  "fields": {
    "timestamp_millis": [
      1479363860752
    ],
    "collector_timestamp_millis": [
      1479363678086
    ]
  },
  "sort": [
    1479363678086
  ]
}

i want to search annotations’s endpoint’s serviceName is first-example-dev, and i direct search first-example-dev from kibana, no result 😦, and i search annotations:first-example-dev also nothing.

how can i search this content?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
codefromthecryptcommented, Nov 21, 2016

well, it could only be better if you use elasticsearch 😃 ps whatever isn’t good should at least be noted for improvement in with a screen shot of what’s better (since good is subjective and not always guessable) https://github.com/openzipkin/zipkin-ui/issues

Anyway, in case it helps, here’s a complex query that the http implementation sends on the wire. It might help you figure out what to do (or not).

ex.

QueryRequest.builder().serviceName("service")
    .spanName("methodcall")
    .addAnnotation("custom")
    .addBinaryAnnotation("BAH", "BEH").build();

becomes this http request:

POST zipkin/span/_search?allow_no_indices=true&expand_wildcards=open&ignore_unavailable=true
...

{
  "size" : 0,
  "query" : {
    "bool" : {
      "must" : {
        "match_all" : { }
      },
      "filter" : {
        "bool" : {
          "must" : [ {
            "range" : {
              "timestamp_millis" : {
                "from" : 0,
                "to" : 1479693481467,
                "include_lower" : true,
                "include_upper" : true
              }
            }
          }, {
            "bool" : {
              "should" : [ {
                "nested" : {
                  "query" : {
                    "term" : {
                      "annotations.endpoint.serviceName" : "service"
                    }
                  },
                  "path" : "annotations"
                }
              }, {
                "nested" : {
                  "query" : {
                    "term" : {
                      "binaryAnnotations.endpoint.serviceName" : "service"
                    }
                  },
                  "path" : "binaryAnnotations"
                }
              } ]
            }
          }, {
            "term" : {
              "name" : "methodcall"
            }
          }, {
            "nested" : {
              "query" : {
                "bool" : {
                  "must" : [ {
                    "term" : {
                      "annotations.value" : "custom"
                    }
                  }, {
                    "term" : {
                      "annotations.endpoint.serviceName" : "service"
                    }
                  } ]
                }
              },
              "path" : "annotations"
            }
          }, {
            "nested" : {
              "query" : {
                "bool" : {
                  "must" : [ {
                    "term" : {
                      "binaryAnnotations.key" : "BAH"
                    }
                  }, {
                    "term" : {
                      "binaryAnnotations.value" : "BEH"
                    }
                  }, {
                    "term" : {
                      "binaryAnnotations.endpoint.serviceName" : "service"
                    }
                  } ]
                }
              },
              "path" : "binaryAnnotations"
            }
          } ]
        }
      }
    }
  },
  "aggregations" : {
    "traceId_agg" : {
      "terms" : {
        "field" : "traceId",
        "size" : 10,
        "order" : {
          "timestamps_agg" : "desc"
        }
      },
      "aggregations" : {
        "timestamps_agg" : {
          "min" : {
            "field" : "timestamp_millis"
          }
        }
      }
    }
  }
}
0reactions
codefromthecryptcommented, Oct 23, 2018

closing as it is antiquated especially now we have a different model

Read more comments on GitHub >

github_iconTop Results From Across the Web

Track deployments with annotations | Kibana Guide [master]
For enhanced visibility into your deployments, we offer deployment annotations on all transaction charts. This feature enables you to easily determine if ...
Read more >
Using Elasticsearch with Spring Boot - Reflectoring
How to index and search Data with Spring Boot and Elasticsearch. ... with annotations to define the mapping into an Elasticsearch document.
Read more >
Deprecated List (Hibernate Search 5.11.11.Final)
org.hibernate.search.annotations.Key. Custom filter cache keys are a deprecated feature scheduled to be removed in Hibernate Search 6.
Read more >
Create annotations in Kibana - reelyActive Developers
Adding annotations Step 2 of 2 · Select your Index pattern · Choose timestamp in the Time field · Enter your query string...
Read more >
Spring Data Elasticsearch - Reference Documentation
Templates as a high-level abstraction for storing, searching, sorting documents ... The intermediate repository interface is annotated with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found