jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.52k stars 2.44k forks source link

[Bug]: Is ‘tagType’ in ES jaeger-span mapping correct? Should it be ‘type’? #5967

Closed chinaran closed 2 months ago

chinaran commented 2 months ago

What happened?

Reference: https://github.com/jaegertracing/jaeger/blob/v1.60.0/plugin/storage/es/mappings/jaeger-span-8.json#L163C14-L163C21 Include logs, process.tags, tags.

Steps to reproduce

Not involved.

Expected behavior

{
    "type": "nested",
    "dynamic": false,
    "properties": {
        "key": {
            "type": "keyword",
            "ignore_above": 256
        },
        "value": {
            "type": "keyword",
            "ignore_above": 256
        },
        # "tagType"
        "type": {
            "type": "keyword",
            "ignore_above": 256
        }
    }
}

Relevant log output

No response

Screenshot

No response

Additional context

No response

Jaeger backend version

1.60.0

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

No response

Deployment model

No response

Deployment configs

No response

yurishkuro commented 2 months ago

Please explain the problem / symptom, not an implementation detail.

chinaran commented 2 months ago

Honestly, I haven't encountered any problems so far, except that when looking at the jaeger-span index settings, I found that the tagType in tags.properties doesn't match the actual span data, and the span example is as follows:

{
  "traceID": "3219429fd31cc773b2240ff3bff2d775",
  "spanID": "8bed21f30bd1d21f",
  "operationName": "asm-first-server.graph-mesh.svc.cluster.local:80/*",
  "startTime": 1726103224306509,
  "startTimeMillis": 1726103224306,
  "duration": 14289,
  "tags": [
    {
      "key": "user_agent",
      "type": "string",
      "value": "curl/7.88.1"
    },
    {
      "key": "component",
      "type": "string",
      "value": "proxy"
    }
  ],
  "logs": [
    {
      "timestamp": 1726103224321313,
      "fields": [
        {
          "key": "event",
          "type": "string",
          "value": "ss"
        }
      ]
    }
  ],
  "process": {
    "serviceName": "asm-first-server.graph-mesh",
    "tags": [
      {
        "key": "host.name",
        "type": "string",
        "value": "asm-first-server-5fd8c455d9-8t56v"
      },
      {
        "key": "cluster.name",
        "type": "string",
        "value": "business-1"
      }
    ]
  }
}

The three values of tags are key, type, value.

I think the fields in properties should be consistent with the stored json, not sure if the inconsistency is by design or a typo.

yurishkuro commented 2 months ago

fair enough. If CI passes with this change I have no objection.

chinaran commented 2 months ago

fair enough. If CI passes with this change I have no objection.

Thanks for your reply, I will submit a PR.