Skip to content

Instantly share code, notes, and snippets.

@codefromthecrypt
Created February 16, 2017 19:38
Show Gist options
  • Save codefromthecrypt/3ed301de18b75ddd415e4a8a4b4c7cca to your computer and use it in GitHub Desktop.
Save codefromthecrypt/3ed301de18b75ddd415e4a8a4b4c7cca to your computer and use it in GitHub Desktop.
searching for multiple service names
# substitute 2017-01-18 for the correct date and foo and bar for the two services names you're interested in
curl -s localhost:9200/zipkin-2017-01-18/span/_search -d'{
"query": {
"bool": {
"should": [
{
"nested": {
"path": "annotations",
"query": {
"bool": {
"must": {
"term": {
"annotations.endpoint.serviceName": "foo"
}
}
}
}
}
},
{
"nested": {
"path": "annotations",
"query": {
"bool": {
"must": {
"term": {
"annotations.endpoint.serviceName": "bar"
}
}
}
}
}
}
]
}
}
}'|jq '.hits.hits[]|._source.traceId'|uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment