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] Endpoints without API tests #70739

Closed
15 of 38 tasks
sorenlouv opened this issue Jul 3, 2020 · 7 comments
Closed
15 of 38 tasks

[APM] Endpoints without API tests #70739

sorenlouv opened this issue Jul 3, 2020 · 7 comments
Labels
good first issue low hanging fruit low hanging fruit DO NOT USE. Use `good first issue` instead Team:APM All issues that need APM UI Team support technical debt Improvement of the software architecture and operational architecture

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Jul 3, 2020

How to run API tests

The tests are separated in two suites by license: "trial" (similar to Gold+ license) and "basic". To run the tests you must start the server first, and then run the test runner.

Basic

# Start server
node scripts/functional_tests_server --config x-pack/test/apm_api_integration/basic/config.ts

# Run tests
node scripts/functional_test_runner --config x-pack/test/apm_api_integration/basic/config.ts

The API tests tests for "basic" are located in x-pack/test/apm_api_integration/basic/tests.

Trial

# Start server
node scripts/functional_tests_server --config x-pack/test/apm_api_integration/trial/config.ts

# Run tests
node scripts/functional_test_runner --config x-pack/test/apm_api_integration/trial/config.ts

The API tests tests for "trial" are located in x-pack/test/apm_api_integration/trial/tests.

For debugging access Elasticsearch on http://localhost:9220` (elastic/changeme)

Endpoints in need for tests

Services overview page /app/apm#/services:

  • /api/apm/services

Transactions overview page /app/apm#/services/{service.name}/transactions:

  • /api/apm/services/{service.name}/agent_name
  • /api/apm/services/{service.name}/transaction_groups/charts
  • /api/apm/services/{service.name}/transaction_groups
  • /api/apm/services/{service.name}/transaction_types
  • /api/apm/services/{service.name}/annotation/search
  • /api/apm/services/{service.name}/transaction_groups/breakdown
  • /api/apm/services/{service.name}/node/{serviceNodeName}/metadata
  • /api/apm/services/{serviceName}/transaction_groups/error_rate
  • /api/apm/services/{serviceName}/transaction_groups/avg_duration_by_browser

Transactions details page /app/apm#/services/{service.name}/transactions/{transaction.name}:
tbd

Traces overview page (app/apm#/traces)

  • /api/apm/traces
  • /api/apm/traces/{traceId}

Transaction

  • /api/apm/transaction/{traceId}

Errors overview page (/app/apm#/services/{service.name}/errors)

  • /api/apm/services/{service.name}/errors/distribution
  • /api/apm/services/{service.name}/errors

Errors details page (/app/apm#/services/{service.name}/errors/{error.id})

  • /api/apm/services/{service.name}/errors/{error.id}
  • /api/apm/services/{service.name}/errors/rate?groupId={error.id}
  • /api/apm/services/{service.name}/errors/distribution?groupId={error.id}

Security

  • /api/apm/security/indices_privileges

Metrics page (/app/apm#/services/{service.name}/metrics)

  • /api/apm/services/{service.name}/metrics/charts

APM Indicies

  • /api/apm/settings/apm-index-settings

Custom links

  • /api/apm/settings/custom_links/transaction

Anomaly detection

  • /api/apm/settings/anomaly-detection
  • /api/apm/settings/anomaly-detection/jobs
  • /api/apm/settings/anomaly-detection/environments

Service Map

  • /api/apm/service-map
  • /api/apm/service-map/service/{serviceName}

Service nodes

  • /api/apm/services/{serviceName}/serviceNodes

UI Filters

  • /api/apm/ui_filters/environments
  • /api/apm/ui_filters/local_filters/metrics
  • /api/apm/ui_filters/local_filters/errorGroups
  • /api/apm/ui_filters/local_filters/traces
  • /api/apm/ui_filters/local_filters/services

index pattern

  • /api/apm/index_pattern/static
  • /api/apm/index_pattern/dynamic
  • /api/apm/index_pattern/title

Observability dashboard

  • /api/apm/observability_dashboard/has_data
  • /api/apm/observability_dashboard
@sorenlouv sorenlouv added [zube]: (7.9) Planned for release good first issue low hanging fruit low hanging fruit DO NOT USE. Use `good first issue` instead Team:APM All issues that need APM UI Team support technical debt Improvement of the software architecture and operational architecture labels Jul 3, 2020
@elasticmachine
Copy link
Contributor

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

@matjahs
Copy link

matjahs commented Jul 11, 2020

Is help still required? Would love to contribute!

@sorenlouv
Copy link
Member Author

sorenlouv commented Jul 11, 2020

Hi @Raven283

Yes, help would be much appreciated. As you can see many of our API's are not covered by api tests. We'd like to change that :)

The easiest way to get started is probably to look at one of the existing tests. Elasticsearch can be populated with sample data (this is very useful) like this:

before(() => esArchiver.load('8.0.0'));
after(() => esArchiver.unload('8.0.0'));

Any of the unchecked items on the list needs test. For instance /api/apm/services/{service.name}/transaction_groups/breakdown or /api/apm/security/indices_privileges.

Let me know if you have any questions. And thanks for reaching out!

@AnshuOnGit
Copy link

I would like to contribute towards this. Is it still available?

@matjahs
Copy link

matjahs commented Jul 19, 2020

@AnshuOnGit I've started at the top of the list. If you start at about halfway (APM indices) and work your way down we shouldn't get in each others way :)

@sorenlouv
Copy link
Member Author

@Raven283 That's great to hear 👍 👍 Please open a PR sooner rather than later to avoid conflicts.

@sorenlouv
Copy link
Member Author

No need to track this anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue low hanging fruit low hanging fruit DO NOT USE. Use `good first issue` instead Team:APM All issues that need APM UI Team support technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

4 participants