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] Refactoring service and transaction links #86986

Merged
merged 5 commits into from
Jan 7, 2021

Conversation

cauemarcondes
Copy link
Contributor

No description provided.

@cauemarcondes cauemarcondes added release_note:skip Skip the PR/issue when compiling release notes v7.12.0 labels Dec 29, 2020
@cauemarcondes cauemarcondes requested a review from a team as a code owner December 29, 2020 10:44
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Dec 29, 2020
@elasticmachine
Copy link
Contributor

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

@cauemarcondes
Copy link
Contributor Author

@elasticmachine merge upstream

@cauemarcondes
Copy link
Contributor Author

@elasticmachine merge upstream

{...rest}
/>
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love deleted code <3

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for doing this.
I would like to see APMLink killed entirely and replaced by just getAPMHref but that's not needed for now and might be fixed by the bigger changes to client side linking we've talked about

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Chrome X-Pack UI Plugin Functional Tests.x-pack/test/plugin_functional/test_suites/resolver.Resolver test app when the user is interacting with the node with ID: secondChild when the user hovers over the primary button when the user has clicked the primary button (which selects the node.) should render as expected

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 6 times on tracked branches: https://github.com/elastic/kibana/issues/87425

[00:00:00]       │
[00:00:00]         └-: Resolver test app
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ debg navigating to resolverTest url: http://localhost:6111/app/resolverTest
[00:00:00]             │ debg navigate to: http://localhost:6111/app/resolverTest
[00:00:00]             │ debg browser[INFO] http://localhost:6111/login?next=%2Fapp%2FresolverTest%3F_t%3D1610015111159 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:00]             │
[00:00:00]             │ debg browser[INFO] http://localhost:6111/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:00]             │ debg ... sleep(700) start
[00:00:01]             │ debg ... sleep(700) end
[00:00:01]             │ debg returned from get, calling refresh
[00:00:01]             │ debg browser[INFO] http://localhost:6111/login?next=%2Fapp%2FresolverTest%3F_t%3D1610015111159 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:01]             │
[00:00:01]             │ debg browser[INFO] http://localhost:6111/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:02]             │ debg currentUrl = http://localhost:6111/login?next=%2Fapp%2FresolverTest%3F_t%3D1610015111159
[00:00:02]             │          appUrl = http://localhost:6111/app/resolverTest
[00:00:02]             │ debg TestSubjects.find(kibanaChrome)
[00:00:02]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:02]             │ debg Found login page
[00:00:02]             │ debg TestSubjects.setValue(loginUsername, test_user)
[00:00:02]             │ debg TestSubjects.click(loginUsername)
[00:00:02]             │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:02]             │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:03]             │ debg TestSubjects.setValue(loginPassword, changeme)
[00:00:03]             │ debg TestSubjects.click(loginPassword)
[00:00:03]             │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:03]             │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:03]             │ debg TestSubjects.click(loginSubmit)
[00:00:03]             │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:03]             │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:03]             │ debg Find.waitForDeletedByCssSelector('.kibanaWelcomeLogo') with timeout=10000
[00:00:03]             │ proc [kibana]   log   [10:25:14.460] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:00:03]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1610010446102475299] [.ds-ilm-history-5-2021.01.07-000001] creating index, cause [initialize_data_stream], templates [ilm-history], shards [1]/[0]
[00:00:03]             │ info [o.e.c.m.MetadataCreateDataStreamService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1610010446102475299] adding data stream [ilm-history-5] with write index [.ds-ilm-history-5-2021.01.07-000001] and backing indices []
[00:00:03]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1610010446102475299] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.ds-ilm-history-5-2021.01.07-000001][0]]])." previous.health="YELLOW" reason="shards started [[.ds-ilm-history-5-2021.01.07-000001][0]]"
[00:00:03]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1610010446102475299] moving index [.ds-ilm-history-5-2021.01.07-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:03]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1610010446102475299] moving index [.ds-ilm-history-5-2021.01.07-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ilm-history-ilm-policy]
[00:00:03]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1610010446102475299] moving index [.ds-ilm-history-5-2021.01.07-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ilm-history-ilm-policy]
[00:00:03]             │ debg browser[INFO] http://localhost:6111/app/resolverTest?_t=1610015111159 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:03]             │
[00:00:03]             │ debg browser[INFO] http://localhost:6111/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:03]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:05]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"] nav:not(.ng-hide)') with timeout=60000
[00:00:06]             │ debg browser[INFO] http://localhost:6111/app/resolverTest?_t=1610015117086 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:06]             │
[00:00:06]             │ debg browser[INFO] http://localhost:6111/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:07]             │ debg Finished login process currentUrl = http://localhost:6111/app/resolverTest
[00:00:07]             │ debg ... sleep(501) start
[00:00:07]             │ debg ... sleep(501) end
[00:00:07]             │ debg in navigateTo url = http://localhost:6111/app/resolverTest
[00:00:07]             │ debg TestSubjects.exists(statusPageContainer)
[00:00:07]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:10]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:10]             │ debg ======browser======== setWindowSize 3840 2400
[00:00:11]             │ debg ======browser======== actual initial screenshot size width=1200, height=800
[00:00:11]             │ debg ======browser======== actual second screenshot size width= 600, height=400
[00:00:11]             │ debg ======browser======== calculated values xBorder= 0, yBorder=0, xScaling=1, yScaling=1
[00:00:11]             │ debg ======browser======== setting browser size to 3840 x 2400
[00:00:13]             │ debg ======browser======== final screenshot size width=3840, height=2400
[00:00:13]           └-> renders at least one node
[00:00:13]             └-> "before each" hook: global before each
[00:00:13]             │ debg TestSubjects.exists(resolver:node)
[00:00:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="resolver:node"]') with timeout=120000
[00:00:13]             └- ✓ pass  (75ms) "Resolver test app renders at least one node"
[00:00:13]           └-> renders a node list
[00:00:13]             └-> "before each" hook: global before each
[00:00:13]             │ debg TestSubjects.exists(resolver:node-list)
[00:00:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="resolver:node-list"]') with timeout=120000
[00:00:13]             └- ✓ pass  (32ms) "Resolver test app renders a node list"
[00:00:13]           └-> renders at least one edge line
[00:00:13]             └-> "before each" hook: global before each
[00:00:13]             │ debg TestSubjects.exists(resolver:graph:edgeline)
[00:00:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="resolver:graph:edgeline"]') with timeout=120000
[00:00:13]             └- ✓ pass  (76ms) "Resolver test app renders at least one edge line"
[00:00:13]           └-> renders graph controls
[00:00:13]             └-> "before each" hook: global before each
[00:00:13]             │ debg TestSubjects.exists(resolver:graph-controls)
[00:00:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="resolver:graph-controls"]') with timeout=120000
[00:00:13]             └- ✓ pass  (29ms) "Resolver test app renders graph controls"
[00:00:13]           └-: when the user is interacting with the node with ID: origin
[00:00:13]             └-> "before all" hook
[00:00:39]           └-: when the user is interacting with the node with ID: secondChild
[00:00:39]             └-> "before all" hook
[00:00:39]             └-> should render as expected
[00:00:39]               └-> "before each" hook: global before each
[00:00:39]               └-> "before each" hook
[00:00:39]               │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:39]               │ debg compareAgainstBaseline
[00:00:39]               │ info Taking screenshot "/dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/session/second_child.png"
[00:00:40]               │ debg comparePngs: /dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/session/second_child.png vs /dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/baseline/second_child.png
[00:00:40]               │ debg calculating diff pixels...
[00:00:40]               │ debg percent different: 0.046875
[00:00:40]               └- ✓ pass  (1.4s) "Resolver test app when the user is interacting with the node with ID: secondChild should render as expected"
[00:00:40]             └-: when the user hovers over the primary button
[00:00:40]               └-> "before all" hook
[00:00:40]               └-> should render as expected
[00:00:40]                 └-> "before each" hook: global before each
[00:00:40]                 └-> "before each" hook
[00:00:40]                 └-> "before each" hook
[00:00:40]                   │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:41]                 │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:41]                 │ debg compareAgainstBaseline
[00:00:41]                 │ info Taking screenshot "/dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/session/second_child_with_primary_button_hovered.png"
[00:00:42]                 │ debg comparePngs: /dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/session/second_child_with_primary_button_hovered.png vs /dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/baseline/second_child_with_primary_button_hovered.png
[00:00:42]                 │ debg calculating diff pixels...
[00:00:42]                 │ debg percent different: 0.05201388888888889
[00:00:42]                 └- ✓ pass  (1.4s) "Resolver test app when the user is interacting with the node with ID: secondChild when the user hovers over the primary button should render as expected"
[00:00:42]               └-: when the user has clicked the primary button (which selects the node.)
[00:00:42]                 └-> "before all" hook
[00:00:42]                 └-> should render as expected
[00:00:42]                   └-> "before each" hook: global before each
[00:00:42]                   └-> "before each" hook
[00:00:42]                   └-> "before each" hook
[00:00:42]                     │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:42]                   └-> "before each" hook
[00:00:43]                   │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:43]                   │ debg compareAgainstBaseline
[00:00:43]                   │ info Taking screenshot "/dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/session/second_child_selected_with_primary_button_hovered.png"
[00:00:45]                   │ debg comparePngs: /dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/session/second_child_selected_with_primary_button_hovered.png vs /dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/baseline/second_child_selected_with_primary_button_hovered.png
[00:00:45]                   │ debg calculating diff pixels...
[00:00:45]                   │ debg percent different: 0.09689814814814815
[00:00:45]                   │ info Taking screenshot "/dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/screenshots/failure/Resolver test app when the user is interacting with the node with ID_ secondChild when the user hovers over the primary button when the user has clicked the primary button _which selects the node_ should render as expected.png"
[00:00:46]                   │ info Current URL is: http://localhost:6111/app/resolverTest?resolver-test=(panelParameters%3A(nodeID%3AsecondChild)%2CpanelView%3AnodeDetail)
[00:00:46]                   │ info Saving page source to: /dev/shm/workspace/parallel/1/kibana/x-pack/test/plugin_functional/failure_debug/html/Resolver test app when the user is interacting with the node with ID_ secondChild when the user hovers over the primary button when the user has clicked the primary button _which selects the node_ should render as expected.html
[00:00:46]                   └- ✖ fail: Resolver test app when the user is interacting with the node with ID: secondChild when the user hovers over the primary button when the user has clicked the primary button (which selects the node.) should render as expected
[00:00:46]                   │      Error: expected 0.09689814814814815 to be below 0.09
[00:00:46]                   │       at Assertion.assert (/dev/shm/workspace/parallel/1/kibana/packages/kbn-expect/expect.js:100:11)
[00:00:46]                   │       at Assertion.lessThan.Assertion.below (/dev/shm/workspace/parallel/1/kibana/packages/kbn-expect/expect.js:336:8)
[00:00:46]                   │       at Function.lessThan (/dev/shm/workspace/parallel/1/kibana/packages/kbn-expect/expect.js:531:15)
[00:00:46]                   │       at Context.<anonymous> (test/plugin_functional/test_suites/resolver/index.ts:119:23)
[00:00:46]                   │       at Object.apply (/dev/shm/workspace/parallel/1/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)
[00:00:46]                   │ 
[00:00:46]                   │ 

Stack Trace

Error: expected 0.09689814814814815 to be below 0.09
    at Assertion.assert (/dev/shm/workspace/parallel/1/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.lessThan.Assertion.below (/dev/shm/workspace/parallel/1/kibana/packages/kbn-expect/expect.js:336:8)
    at Function.lessThan (/dev/shm/workspace/parallel/1/kibana/packages/kbn-expect/expect.js:531:15)
    at Context.<anonymous> (test/plugin_functional/test_suites/resolver/index.ts:119:23)
    at Object.apply (/dev/shm/workspace/parallel/1/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 5.4MB 5.4MB -3.1KB

Distributable file count

id before after diff
default 47262 48025 +763

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@cauemarcondes cauemarcondes merged commit 2d564dd into elastic:master Jan 7, 2021
@cauemarcondes cauemarcondes deleted the apm-transacion-link branch January 7, 2021 12:00
cauemarcondes added a commit to cauemarcondes/kibana that referenced this pull request Jan 7, 2021
* refactoring service and transaction links

* refactoring links

* addressing PR comments

Co-authored-by: Kibana Machine <[email protected]>
cauemarcondes added a commit to cauemarcondes/kibana that referenced this pull request Jan 7, 2021
* refactoring service and transaction links

* refactoring links

* addressing PR comments

Co-authored-by: Kibana Machine <[email protected]>
cauemarcondes added a commit that referenced this pull request Jan 7, 2021
* refactoring service and transaction links

* refactoring links

* addressing PR comments

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
cauemarcondes added a commit that referenced this pull request Jan 7, 2021
* refactoring service and transaction links

* refactoring links

* addressing PR comments

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
smith added a commit to smith/kibana that referenced this pull request Feb 18, 2021
For a non-Java service, the previous link was like:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?rangeFrom=now-15m&rangeTo=now
```

which did not filter by the `service.node.name`.

It now is:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?kuery=service.node.name:%226a7f116fe344aee7e92fceeb426cbfdf6a534a8e3ba6345c16a47793eba6daf5%22&rangeFrom=now-15m&rangeTo=now
````

Which links to the metrics page with the filter applied.

The component is using a `MetricOverviewLink` which was using a `EuiLink` and passing throught the props, including `mergeQuery`, which includes the `kuery` parameter.

Replace the `EuiLink` with an `APMLink` which does use the `mergeQuery` prop and does pass the parameters through correctly.

Looks like this was changed to an `EuiLink` by a refactor in elastic#86986.

Since we'll be making some further changes to how `kuery` is handled in elastic#84526, I'm just making the minimal change to fix this bug at this time.
smith added a commit that referenced this pull request Feb 18, 2021
For a non-Java service, the previous link was like:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?rangeFrom=now-15m&rangeTo=now
```

which did not filter by the `service.node.name`.

It now is:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?kuery=service.node.name:%226a7f116fe344aee7e92fceeb426cbfdf6a534a8e3ba6345c16a47793eba6daf5%22&rangeFrom=now-15m&rangeTo=now
````

Which links to the metrics page with the filter applied.

The component is using a `MetricOverviewLink` which was using a `EuiLink` and passing throught the props, including `mergeQuery`, which includes the `kuery` parameter.

Replace the `EuiLink` with an `APMLink` which does use the `mergeQuery` prop and does pass the parameters through correctly.

Looks like this was changed to an `EuiLink` by a refactor in #86986.

Since we'll be making some further changes to how `kuery` is handled in #84526, I'm just making the minimal change to fix this bug at this time.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 18, 2021
For a non-Java service, the previous link was like:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?rangeFrom=now-15m&rangeTo=now
```

which did not filter by the `service.node.name`.

It now is:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?kuery=service.node.name:%226a7f116fe344aee7e92fceeb426cbfdf6a534a8e3ba6345c16a47793eba6daf5%22&rangeFrom=now-15m&rangeTo=now
````

Which links to the metrics page with the filter applied.

The component is using a `MetricOverviewLink` which was using a `EuiLink` and passing throught the props, including `mergeQuery`, which includes the `kuery` parameter.

Replace the `EuiLink` with an `APMLink` which does use the `mergeQuery` prop and does pass the parameters through correctly.

Looks like this was changed to an `EuiLink` by a refactor in elastic#86986.

Since we'll be making some further changes to how `kuery` is handled in elastic#84526, I'm just making the minimal change to fix this bug at this time.
kibanamachine added a commit that referenced this pull request Feb 18, 2021
…1842)

For a non-Java service, the previous link was like:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?rangeFrom=now-15m&rangeTo=now
```

which did not filter by the `service.node.name`.

It now is:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?kuery=service.node.name:%226a7f116fe344aee7e92fceeb426cbfdf6a534a8e3ba6345c16a47793eba6daf5%22&rangeFrom=now-15m&rangeTo=now
````

Which links to the metrics page with the filter applied.

The component is using a `MetricOverviewLink` which was using a `EuiLink` and passing throught the props, including `mergeQuery`, which includes the `kuery` parameter.

Replace the `EuiLink` with an `APMLink` which does use the `mergeQuery` prop and does pass the parameters through correctly.

Looks like this was changed to an `EuiLink` by a refactor in #86986.

Since we'll be making some further changes to how `kuery` is handled in #84526, I'm just making the minimal change to fix this bug at this time.

Co-authored-by: Nathan L Smith <[email protected]>
smith added a commit to smith/kibana that referenced this pull request Mar 2, 2021
For a non-Java service, the previous link was like:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?rangeFrom=now-15m&rangeTo=now
```

which did not filter by the `service.node.name`.

It now is:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?kuery=service.node.name:%226a7f116fe344aee7e92fceeb426cbfdf6a534a8e3ba6345c16a47793eba6daf5%22&rangeFrom=now-15m&rangeTo=now
````

Which links to the metrics page with the filter applied.

The component is using a `MetricOverviewLink` which was using a `EuiLink` and passing throught the props, including `mergeQuery`, which includes the `kuery` parameter.

Replace the `EuiLink` with an `APMLink` which does use the `mergeQuery` prop and does pass the parameters through correctly.

Looks like this was changed to an `EuiLink` by a refactor in elastic#86986.

Since we'll be making some further changes to how `kuery` is handled in elastic#84526, I'm just making the minimal change to fix this bug at this time.
smith added a commit that referenced this pull request Mar 2, 2021
…3240)

For a non-Java service, the previous link was like:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?rangeFrom=now-15m&rangeTo=now
```

which did not filter by the `service.node.name`.

It now is:

```
http://localhost:5601/kbn/app/apm/services/opbeans-python/metrics?kuery=service.node.name:%226a7f116fe344aee7e92fceeb426cbfdf6a534a8e3ba6345c16a47793eba6daf5%22&rangeFrom=now-15m&rangeTo=now
````

Which links to the metrics page with the filter applied.

The component is using a `MetricOverviewLink` which was using a `EuiLink` and passing throught the props, including `mergeQuery`, which includes the `kuery` parameter.

Replace the `EuiLink` with an `APMLink` which does use the `mergeQuery` prop and does pass the parameters through correctly.

Looks like this was changed to an `EuiLink` by a refactor in #86986.

Since we'll be making some further changes to how `kuery` is handled in #84526, I'm just making the minimal change to fix this bug at this time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants