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

[APM] ML jobs should support metric documents #101734

Closed
Tracked by #108466
sorenlouv opened this issue Jun 9, 2021 · 6 comments · Fixed by #111957 or #117836
Closed
Tracked by #108466

[APM] ML jobs should support metric documents #101734

sorenlouv opened this issue Jun 9, 2021 · 6 comments · Fixed by #111957 or #117836
Assignees
Labels
apm:transaction-metrics APM UI - Transaction Metrics Work :ml Team:APM All issues that need APM UI Team support v8.0.0

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Jun 9, 2021

Currently ML jobs calculate the average duration like:

aggs: {
  duration: {
    avg: { field: "transaction.duration.us" }
  }
}

For histogram based docs (metrics) this should be calculated using the field transaction.duration.histogram:

aggs: {
  duration: {
    avg: { field: "transaction.duration.histogram" }
  }
}

Metric sample document

Click to view sample
{
  "_index": "apm-7.13.0-metric-live-000001",
  "_type": "_doc",
  "_id": "Pyh98HkBevSlma3Qvbow",
  "_score": 1,
  "fields": {
    "transaction.name.text": [
      "POST /add-cart"
    ],
    "observer.name": [
      "instance-0000000000"
    ],
    "service.node.name": [
      "5e88585c93cd551f19c8aadfe40ae4f7376c53f9b92aea108c9f7f2c9278110c"
    ],
    "transaction.result": [
      "HTTP 2xx"
    ],
    "container.id": [
      "5e88585c93cd551f19c8aadfe40ae4f7376c53f9b92aea108c9f7f2c9278110c"
    ],
    "processor.event": [
      "metric"
    ],
    "kubernetes.pod.name": [
      "frontend-node-685bfb4649-ln2sw"
    ],
    "agent.name": [
      "nodejs"
    ],
    "event.outcome": [
      "success"
    ],
    "service.environment": [
      "prod"
    ],
    "_doc_count": [
      15
    ],
    "service.name": [
      "frontend-node"
    ],
    "processor.name": [
      "metric"
    ],
    "observer.version_major": [
      7
    ],
    "observer.hostname": [
      "17d26171120f"
    ],
    "transaction.duration.histogram": [
      {
        "counts": [
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1
        ],
        "values": [
          1146879,
          1163263,
          1384447,
          1597439,
          1843199,
          2342911,
          3325951,
          3817471,
          6127615,
          7176191,
          8257535,
          9043967,
          10747903,
          11075583,
          12058623
        ]
      }
    ],
    "transaction.type": [
      "request"
    ],
    "metricset.name": [
      "transaction"
    ],
    "observer.id": [
      "219aa009-7229-4210-b76f-39d12a5af7f2"
    ],
    "@timestamp": [
      "2021-06-09T11:17:21.842Z"
    ],
    "service.version": [
      "1.6"
    ],
    "timeseries.instance": [
      "frontend-node:POST /add-cart:5b87bf3db1e822f7"
    ],
    "observer.ephemeral_id": [
      "69d4ce18-e4ac-4a87-a033-b4baf4726217"
    ],
    "observer.version": [
      "7.13.0"
    ],
    "ecs.version": [
      "1.8.0"
    ],
    "observer.type": [
      "apm-server"
    ],
    "transaction.name": [
      "POST /add-cart"
    ]
  }
}
@sorenlouv sorenlouv added Team:APM All issues that need APM UI Team support :ml labels Jun 9, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@graphaelli
Copy link
Member

graphaelli commented Sep 2, 2021

The ML team has made a number of recommendations related to this effort that we can choose to investigate - we can determine which are required along the way:

@graphaelli
Copy link
Member

It may also make sense to tackle #92839 while creating this new job.

@dgieselaar
Copy link
Member

Re-opening due to the revert in #114961

@peteharverson
Copy link
Contributor

Note that when re-implementing the changes made in #111957, the following additions should also be made:

dgieselaar added a commit that referenced this issue Nov 11, 2021
Closes #101734.

This reverts commit 008421f.

Additionally, incorporate suggested changes from #101734 (comment).
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 11, 2021
Closes elastic#101734.

This reverts commit 008421f.

Additionally, incorporate suggested changes from elastic#101734 (comment).
kibanamachine added a commit that referenced this issue Nov 11, 2021
Closes #101734.

This reverts commit 008421f.

Additionally, incorporate suggested changes from #101734 (comment).

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
claudiopro pushed a commit to claudiopro/kibana that referenced this issue Nov 11, 2021
Closes elastic#101734.

This reverts commit 008421f.

Additionally, incorporate suggested changes from elastic#101734 (comment).
fkanout pushed a commit to fkanout/kibana that referenced this issue Nov 17, 2021
Closes elastic#101734.

This reverts commit 008421f.

Additionally, incorporate suggested changes from elastic#101734 (comment).
dmlemeshko pushed a commit that referenced this issue Nov 29, 2021
Closes #101734.

This reverts commit 008421f.

Additionally, incorporate suggested changes from #101734 (comment).
roeehub pushed a commit to build-security/kibana that referenced this issue Dec 16, 2021
Closes elastic#101734.

This reverts commit 008421f.

Additionally, incorporate suggested changes from elastic#101734 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:transaction-metrics APM UI - Transaction Metrics Work :ml Team:APM All issues that need APM UI Team support v8.0.0
Projects
None yet
9 participants