Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop deprecated span.{start,http} fields #6602

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Conversation

axw
Copy link
Member

@axw axw commented Nov 14, 2021

Motivation/summary

Drop deprecated span.{start,http} fields:

  • span.start.us is not used by the UI
  • span.http.* fields have been copied to ECS field sets, http.* and url.*, since 7.14

A minor change to the UI is required to pick up the ECS fields: elastic/kibana#118485

Checklist

How to test these changes

  1. Send some RUM transactions and spans, check the spans have no span.start.us field
  2. Send some HTTP client spans, check they have no span.http.* fields

Related issues

Closes #5995
Closes #6000

@axw axw added v8.0.0 backport-7.16 Automated backport with mergify to the 7.16 branch backport-8.0 Automated backport with mergify labels Nov 14, 2021
@apmmachine
Copy link
Contributor

apmmachine commented Nov 14, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-11-14T08:20:52.817+0000

  • Duration: 40 min 48 sec

  • Commit: 0e5dde7

Test stats 🧪

Test Results
Failed 0
Passed 6036
Skipped 19
Total 6055

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /hey-apm : Run the hey-apm benchmark.

  • /package : Generate and publish the docker images.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@axw axw marked this pull request as ready for review November 15, 2021 00:45
@axw axw removed the backport-7.16 Automated backport with mergify to the 7.16 branch label Nov 15, 2021
@axw axw merged commit fa14836 into elastic:master Nov 15, 2021
@axw axw deleted the drop-span-start branch November 15, 2021 00:46
mergify bot pushed a commit that referenced this pull request Nov 15, 2021
axw added a commit that referenced this pull request Nov 15, 2021
(cherry picked from commit fa14836)

Co-authored-by: Andrew Wilkins <axw@elastic.co>
@marclop marclop self-assigned this Dec 21, 2021
@marclop
Copy link
Contributor

marclop commented Dec 21, 2021

Verified with 9bb5e4c:

$ curl -H "Content-type: application/x-ndjson" --data-binary @testdata/intake-v2/transactions_spans_rum_2.ndjson http://localhost:8200/intake/v2/rum/events
GET traces-apm.rum*/_search
{
  "_source": [false], 
  "fields": ["span.*"],
  "query": {
    "exists": {
      "field": "span.id"
    }
  }
}
{
  "took" : 7,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : ".ds-traces-apm.rum-default-2021.12.21-000001",
        "_id" : "1jPK230ByDpadNqDCz2H",
        "_score" : 1.0,
        "_source" : { },
        "fields" : {
          "span.name" : [
            "transaction"
          ],
          "span.duration.us" : [
            643000
          ],
          "span.id" : [
            "aaaaaaaaaaaaaaaa"
          ],
          "span.type" : [
            "transaction"
          ]
        }
      }
    ]
  }
}
  1. Send spans with http client info:
$ curl -H "Content-type: application/x-ndjson" --data-binary @testdata/intake-v2/spans.ndjson http://localhost:8200/intake/v2/events
GET traces-apm-*/_search
{
  "_source": [false], 
  "fields": ["span.*"],
  "query": {
    "exists": {
      "field": "span.id"
    }
  }
}
{
  "took" : 4,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 7,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : ".ds-traces-apm-default-2021.12.21-000001",
        "_id" : "bDPR230ByDpadNqDoECd",
        "_score" : 1.0,
        "_source" : { },
        "fields" : {
          "span.name" : [
            "GET /api/types"
          ],
          "span.action" : [
            "query.custom"
          ],
          "span.duration.us" : [
            141581
          ],
          "span.subtype" : [
            "postgresql"
          ],
          "span.id" : [
            "abcdef01234567"
          ],
          "span.type" : [
            "db"
          ]
        }
      },
      {
        "_index" : ".ds-traces-apm-default-2021.12.21-000001",
        "_id" : "bTPR230ByDpadNqDoECd",
        "_score" : 1.0,
        "_source" : { },
        "fields" : {
          "span.name" : [
            "GET /api/types"
          ],
          "span.duration.us" : [
            32592
          ],
          "span.id" : [
            "1234abcdef567895"
          ],
          "span.type" : [
            "request"
          ]
        }
      },
      {
        "_index" : ".ds-traces-apm-default-2021.12.21-000001",
        "_id" : "bjPR230ByDpadNqDoECd",
        "_score" : 1.0,
        "_source" : { },
        "fields" : {
          "span.name" : [
            "GET /api/types"
          ],
          "span.duration.us" : [
            3564
          ],
          "span.subtype" : [
            "http"
          ],
          "span.id" : [
            "0123456a89012345"
          ],
          "span.type" : [
            "request"
          ]
        }
      },
      {
        "_index" : ".ds-traces-apm-default-2021.12.21-000001",
        "_id" : "bzPR230ByDpadNqDoECd",
        "_score" : 1.0,
        "_source" : { },
        "fields" : {
          "span.name" : [
            "get /api/types"
          ],
          "span.action" : [
            "call"
          ],
          "span.duration.us" : [
            13980
          ],
          "span.subtype" : [
            "http"
          ],
          "span.id" : [
            "abcde56a89012345"
          ],
          "span.sync" : [
            false
          ],
          "span.type" : [
            "request"
          ]
        }
      },
      {
        "_index" : ".ds-traces-apm-default-2021.12.21-000001",
        "_id" : "cDPR230ByDpadNqDoECd",
        "_score" : 1.0,
        "_source" : { },
        "fields" : {
          "span.name" : [
            "SELECT FROM product_types"
          ],
          "span.destination.service.type" : [
            "db"
          ],
          "span.action" : [
            "query"
          ],
          "span.duration.us" : [
            3781
          ],
          "span.db.link" : [
            "other.db.com"
          ],
          "span.db.rows_affected" : [
            2
          ],
          "span.subtype" : [
            "postgresql"
          ],
          "span.id" : [
            "1234567890aaaade"
          ],
          "span.destination.service.name" : [
            "postgresql"
          ],
          "span.destination.service.resource" : [
            "postgresql"
          ],
          "span.sync" : [
            true
          ],
          "span.type" : [
            "db"
          ]
        }
      },
      {
        "_index" : ".ds-traces-apm-default-2021.12.21-000001",
        "_id" : "cTPR230ByDpadNqDoECd",
        "_score" : 1.0,
        "_source" : { },
        "fields" : {
          "span.message.age.ms" : [
            1577958057123
          ],
          "span.name" : [
            "Rabbitmq receive"
          ],
          "span.action" : [
            "receive"
          ],
          "span.duration.us" : [
            141581
          ],
          "span.message.queue.name" : [
            "new_users"
          ],
          "span.subtype" : [
            "JMS"
          ],
          "span.id" : [
            "00xxx12312312312"
          ],
          "span.type" : [
            "messaging"
          ]
        }
      },
      {
        "_index" : ".ds-traces-apm-default-2021.12.21-000001",
        "_id" : "cjPR230ByDpadNqDoECd",
        "_score" : 1.0,
        "_source" : { },
        "fields" : {
          "span.name" : [
            "SELECT FROM p_details"
          ],
          "span.action" : [
            "query"
          ],
          "span.duration.us" : [
            378191
          ],
          "span.composite.compression_strategy" : [
            "exact_match"
          ],
          "span.subtype" : [
            "postgresql"
          ],
          "span.id" : [
            "abcdef01234567"
          ],
          "span.composite.sum.us" : [
            359298
          ],
          "span.composite.count" : [
            10
          ],
          "span.type" : [
            "db"
          ]
        }
      }
    ]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove span.start.us Remove copying deprecated span http fields
4 participants