# Connecting from jaeger tracing to elasticsearch

**URL:** <https://discuss.elastic.co/t/connecting-from-jaeger-tracing-to-elasticsearch/365713>\
**Category:** Elastic Search\
**Created:** [August 28, 2024, 4:42pm UTC](https://discuss.elastic.co/t/connecting-from-jaeger-tracing-to-elasticsearch/365713 "2024-08-28T16:42:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob\_monty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bob_monty/32/102434_2.png) [@bob\_monty](https://discuss.elastic.co/u/bob_monty)\
**Post date:** [August 28, 2024, 4:42pm UTC](https://discuss.elastic.co/t/connecting-from-jaeger-tracing-to-elasticsearch/365713/1 "2024-08-28T16:42:14Z")

</div>

Greetings. im trying to connect to elasticsearch from yaeger tracing app, it looks like it is connected with the correct url and creds but when i look at the yaeger ui im seeing this error. Ideas please ? thanks,

### HTTP Error: search services failed: elastic: Error 400 (Bad Request): all shards failed [type=search\_phase\_execution\_exception]: RootCause[Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [serviceName] in order to load field data by uninverting the inverted index. Note that this can use significant memory. [type=illegal\_argument\_exception]]

---

<div class="post-metadata">

**Author:** ![Jerome\_Gournet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerome_gournet/32/137824_2.png) [@Jerome\_Gournet](https://discuss.elastic.co/u/Jerome_Gournet)\
**Post date:** [September 24, 2024, 5:54am UTC](https://discuss.elastic.co/t/connecting-from-jaeger-tracing-to-elasticsearch/365713/2 "2024-09-24T05:54:05Z")

</div>

Did you find how to fix it ?  
I've been going through quite a few github issues ... but I still don't know what's causing it.  
I'm running opensearch 2.13 if that makes a difference

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 24, 2024, 6:18am UTC](https://discuss.elastic.co/t/connecting-from-jaeger-tracing-to-elasticsearch/365713/3 "2024-09-24T06:18:13Z")

</div>

OpenSearch is not the same product.  
It's a fork of a tiny part of the code which was written 3+ years ago. Elasticsearch progressed a lot in the meantime. Even APIs are probably not compatible anymore.

---

<div class="post-metadata">

**Author:** ![Jerome\_Gournet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerome_gournet/32/137824_2.png) [@Jerome\_Gournet](https://discuss.elastic.co/u/Jerome_Gournet)\
**Post date:** [September 24, 2024, 10:27pm UTC](https://discuss.elastic.co/t/connecting-from-jaeger-tracing-to-elasticsearch/365713/4 "2024-09-24T22:27:59Z")

</div>

Actually, my issue was that OS is now using index\_template and not "\_template" anymore. So I just needed to copy the jaeger templates, and change them into index\_template, insert them and voila.

Code:

```auto
{
  "index_patterns": [
    "jaeger-span-*"
  ],
  "priority": 400,
  "template": {
    "settings": {
      "index": {
        "number_of_shards": "1",
        "number_of_replicas": "1",
        "mapping": {
          "nested_fields": {
            "limit": "50"
          },
          "ignore_malformed": "true"
        },
        "requests": {
          "cache": {
            "enable": "true"
          }
        }
      }
    },
    "mappings": {
      "dynamic_templates": [
        {
          "span_tags_map": {
            "path_match": "tag.*",
            "mapping": {
              "ignore_above": 256,
              "type": "keyword"
            }
          }
        },
        {
          "process_tags_map": {
            "path_match": "process.tag.*",
            "mapping": {
              "ignore_above": 256,
              "type": "keyword"
            }
          }
        }
      ],
      "properties": {
        "traceID": {
          "ignore_above": 256,
          "type": "keyword"
        },
        "process": {
          "properties": {
            "tag": {
              "type": "object"
            },
            "serviceName": {
              "ignore_above": 256,
              "type": "keyword"
            },
            "tags": {
              "dynamic": false,
              "type": "nested",
              "properties": {
                "tagType": {
                  "ignore_above": 256,
                  "type": "keyword"
                },
                "value": {
                  "ignore_above": 256,
                  "type": "keyword"
                },
                "key": {
                  "ignore_above": 256,
                  "type": "keyword"
                }
              }
            }
          }
        },
        "startTimeMillis": {
          "format": "epoch_millis",
          "type": "date"
        },
        "references": {
          "dynamic": false,
          "type": "nested",
          "properties": {
            "traceID": {
              "ignore_above": 256,
              "type": "keyword"
            },
            "spanID": {
              "ignore_above": 256,
              "type": "keyword"
            },
            "refType": {
              "ignore_above": 256,
              "type": "keyword"
            }
          }
        },
        "flags": {
          "type": "integer"
        },
        "operationName": {
          "ignore_above": 256,
          "type": "keyword"
        },
        "parentSpanID": {
          "ignore_above": 256,
          "type": "keyword"
        },
        "tags": {
          "dynamic": false,
          "type": "nested",
          "properties": {
            "tagType": {
              "ignore_above": 256,
              "type": "keyword"
            },
            "value": {
              "ignore_above": 256,
              "type": "keyword"
            },
            "key": {
              "ignore_above": 256,
              "type": "keyword"
            }
          }
        },
        "spanID": {
          "ignore_above": 256,
          "type": "keyword"
        },
        "duration": {
          "type": "long"
        },
        "startTime": {
          "type": "long"
        },
        "tag": {
          "type": "object"
        },
        "logs": {
          "dynamic": false,
          "type": "nested",
          "properties": {
            "fields": {
              "dynamic": false,
              "type": "nested",
              "properties": {
                "tagType": {
                  "ignore_above": 256,
                  "type": "keyword"
                },
                "value": {
                  "ignore_above": 256,
                  "type": "keyword"
                },
                "key": {
                  "ignore_above": 256,
                  "type": "keyword"
                }
              }
            },
            "timestamp": {
              "type": "long"
            }
          }
        }
      }
    }
  }
}

```

and:

```auto
{
  "index_patterns": [
    "jaeger-service-*"
  ],
  "priority": 400,
  "template": {
    "settings": {
      "index": {
        "number_of_shards": "1",
        "number_of_replicas": "1",
        "mapping": {
          "nested_fields": {
            "limit": "50"
          },
          "ignore_malformed": "true"
        },
        "requests": {
          "cache": {
            "enable": "true"
          }
        }
      }
    },
    "mappings": {
      "dynamic_templates": [
        {
          "span_tags_map": {
            "path_match": "tag.*",
            "mapping": {
              "ignore_above": 256,
              "type": "keyword"
            }
          }
        },
        {
          "process_tags_map": {
            "path_match": "process.tag.*",
            "mapping": {
              "ignore_above": 256,
              "type": "keyword"
            }
          }
        }
      ],
      "properties": {
        "operationName": {
          "ignore_above": 256,
          "type": "keyword"
        },
        "serviceName": {
          "ignore_above": 256,
          "type": "keyword"
        }
      }
    }
  }
}

```

and then insert with:

```auto
curl -H 'Content-Type: application/json' -v -X PUT https://$ES_HOST/_index_template/jaeger-span --data '
[...]
'

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 22, 2024, 10:28pm UTC](https://discuss.elastic.co/t/connecting-from-jaeger-tracing-to-elasticsearch/365713/5 "2024-10-22T22:28:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
