Skip to content

Wrong mapping fields names for webtracking with ElasticSearch #26

@ghost

Description

In the doc (https://www.app-metrics.io/reporting/reporters/elasticsearch/) it is recommended to create an index and to send the mapping :

Add an index and the document mappings to Elasticsearch using the default mappings provided in the github repository

But when i send this command to ES :

PUT appmetricssandbox/_mapping/timer?update_all_types
{
  "properties": {
    "tags.env": { 
      "type":     "text",
      "fielddata": true
    },
    "tags.exception": { 
      "type":     "text",
      "fielddata": true
    },
    "tags.app": { 
      "type":     "text",
      "fielddata": true
    },
    "tags.route": { 
      "type":     "text",
      "fielddata": true
    },
    "tags.server": { 
      "type":     "text",
      "fielddata": true
    },
    "tags.item": { 
      "type":     "text",
      "fielddata": true
    },
    "tags.client_id": { 
      "type":     "text",
      "fielddata": true
    },
    "tags.http_status_code": { 
      "type":     "text",
      "fielddata": true
    },
    "tags.health_check_name": { 
      "type":     "text",
      "fielddata": true
    }
  }
}

I get this error for ES :

{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Field name [tags.env] cannot contain '.'"
}
],
"type": "mapper_parsing_exception",
"reason": "Field name [tags.env] cannot contain '.'"
},
"status": 400
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions