Skip to content

Commit

Permalink
Migrate trace analytics to OpenSearch Dashboards (#1)
Browse files Browse the repository at this point in the history
* Refactor trace analytics for opensearch

* bump to opensearch 1.15

* Remove kibana in comments/docs

* Update github workflows to opensearch

* More renaming

* Remove opendistro in trace analytics

* Update documents for repo

* Address comments
  • Loading branch information
joshuali925 authored Apr 16, 2021
1 parent d927a66 commit 5ad2e01
Show file tree
Hide file tree
Showing 26 changed files with 197 additions and 82 deletions.
6 changes: 3 additions & 3 deletions .cypress/integration/dashboard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { delay, setTimeFilter } from '../utils/constants';

describe('Testing dashboard table empty state', () => {
beforeEach(() => {
cy.visit('app/opendistro-trace-analytics#/dashboard');
cy.visit('app/trace-analytics-dashboards#/dashboard');
cy.wait(delay * 3);
});

Expand All @@ -31,7 +31,7 @@ describe('Testing dashboard table empty state', () => {

describe('Testing dashboard table', () => {
beforeEach(() => {
cy.visit('app/opendistro-trace-analytics#/dashboard');
cy.visit('app/trace-analytics-dashboards#/dashboard');
setTimeFilter();
});

Expand Down Expand Up @@ -85,7 +85,7 @@ describe('Testing dashboard table', () => {

describe('Testing plots', () => {
beforeEach(() => {
cy.visit('app/opendistro-trace-analytics#/dashboard');
cy.visit('app/trace-analytics-dashboards#/dashboard');
setTimeFilter();
});

Expand Down
8 changes: 4 additions & 4 deletions .cypress/integration/services.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { delay, setTimeFilter, SERVICE_NAME } from '../utils/constants';

describe('Testing services table empty state', () => {
beforeEach(() => {
cy.visit('app/opendistro-trace-analytics#/services');
cy.visit('app/trace-analytics-dashboards#/services');
cy.wait(delay * 3);
});

Expand All @@ -31,7 +31,7 @@ describe('Testing services table empty state', () => {

describe('Testing services table', () => {
beforeEach(() => {
cy.visit('app/opendistro-trace-analytics#/services');
cy.visit('app/trace-analytics-dashboards#/services');
setTimeFilter();
});

Expand All @@ -53,7 +53,7 @@ describe('Testing services table', () => {

describe('Testing service view empty state', () => {
beforeEach(() => {
cy.visit(`app/opendistro-trace-analytics#/services/${SERVICE_NAME}`);
cy.visit(`app/trace-analytics-dashboards#/services/${SERVICE_NAME}`);
cy.wait(delay * 3);
});

Expand All @@ -66,7 +66,7 @@ describe('Testing service view empty state', () => {

describe('Testing service view', () => {
beforeEach(() => {
cy.visit(`app/opendistro-trace-analytics#/services/${SERVICE_NAME}`);
cy.visit(`app/trace-analytics-dashboards#/services/${SERVICE_NAME}`);
setTimeFilter(undefined, undefined, false);
});

Expand Down
6 changes: 3 additions & 3 deletions .cypress/integration/traces.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { delay, setTimeFilter, TRACE_ID, SPAN_ID } from '../utils/constants';

describe('Testing traces table empty state', () => {
beforeEach(() => {
cy.visit('app/opendistro-trace-analytics#/traces');
cy.visit('app/trace-analytics-dashboards#/traces');
cy.wait(delay * 3);
});

Expand All @@ -31,7 +31,7 @@ describe('Testing traces table empty state', () => {

describe('Testing traces table', () => {
beforeEach(() => {
cy.visit('app/opendistro-trace-analytics#/traces');
cy.visit('app/trace-analytics-dashboards#/traces');
setTimeFilter();
});

Expand All @@ -53,7 +53,7 @@ describe('Testing traces table', () => {

describe('Testing trace view', () => {
beforeEach(() => {
cy.visit(`app/opendistro-trace-analytics#/traces/${TRACE_ID}`);
cy.visit(`app/trace-analytics-dashboards#/traces/${TRACE_ID}`);
cy.wait(delay * 3);
});

Expand Down
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Plugins**
Please list all plugins currently enabled.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Host/Environment (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 🎆 Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
21 changes: 11 additions & 10 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- 'v*'

env:
PLUGIN_NAME: opendistroTraceAnalyticsKibana
OD_VERSION: 1.13.0.0-alpha
PLUGIN_NAME: traceanalyticsDashboards
OD_VERSION: 1.15.0.0

jobs:

Expand All @@ -25,33 +25,34 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Checkout Kibana
# TODO change to opensearch dashboards
- name: Checkout OpenSerach Dashboards
uses: actions/checkout@v1
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: 7.10.2
token: ${{secrets.OD_ACCESS}}
path: kibana
repository: opensearch-project/Opensearch-Dashboards
ref: 1.x
path: OpenSearch-Dashboards

- name: Checkout Plugin
uses: actions/checkout@v1
with:
path: kibana/plugins/trace-analytics
path: OpenSearch-Dashboards/plugins/trace-analytics

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.23.1'

- name: Kibana Pluign Bootstrap
- name: Pluign Bootstrap
run: |
yarn kbn bootstrap
yarn osd bootstrap
- name: Build Artifact
run: |
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip
artifact=`ls ./build/*.zip`
# TODO change to new bucket
aws s3 cp $artifact s3://artifacts.opendistroforelasticsearch.amazon.com/downloads/kibana-plugins/opendistro-trace-analytics/
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/downloads/*"
19 changes: 10 additions & 9 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Test and Build Trace Analytics
on: [pull_request, push]

env:
PLUGIN_NAME: opendistroTraceAnalyticsKibana
OD_VERSION: 1.13.0.0-alpha
PLUGIN_NAME: traceanalyticsDashboards
OD_VERSION: 1.15.0.0

jobs:

Expand All @@ -14,23 +14,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Kibana
# TODO change to opensearch dashboards
- name: Checkout OpenSerach Dashboards
uses: actions/checkout@v1
with:
repository: elastic/kibana
ref: v7.10.2
path: kibana
repository: opensearch-project/Opensearch-Dashboards
ref: 1.x
path: OpenSearch-Dashboards
- name: Checkout Plugin
uses: actions/checkout@v1
with:
path: kibana/plugins/trace-analytics
path: OpenSearch-Dashboards/plugins/trace-analytics
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.23.1'
- name: Kibana Pluign Bootstrap
- name: Pluign Bootstrap
run: |
yarn kbn bootstrap
yarn osd bootstrap
- name: Test
run: |
yarn test
Expand Down
29 changes: 25 additions & 4 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.

This code of conduct applies to all spaces provided by the OpenSource project including in code, documentation, issue trackers, mailing lists, chat channels, wikis, blogs, social media and any other communication channels used by the project.


**Our open source communities endeavor to:**

* Be Inclusive: We are committed to being a community where everyone can join and contribute. This means using inclusive and welcoming language.
* Be Welcoming: We are committed to maintaining a safe space for everyone to be able to contribute.
* Be Respectful: We are committed to encouraging differing viewpoints, accepting constructive criticism and work collaboratively towards decisions that help the project grow. Disrespectful and unacceptable behavior will not be tolerated.
* Be Collaborative: We are committed to supporting what is best for our community and users. When we build anything for the benefit of the project, we should document the work we do and communicate to others on how this affects their work.


**Our Responsibility. As contributors, members, or bystanders we each individually have the responsibility to behave professionally and respectfully at all times. Disrespectful and unacceptable behaviors include, but are not limited to:**

* The use of violent threats, abusive, discriminatory, or derogatory language;
* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, race, political or religious affiliation;
* Posting of sexually explicit or violent content;
* The use of sexualized language and unwelcome sexual attention or advances;
* Public or private harassment of any kind;
* Publishing private information, such as physical or electronic address, without permission;
* Other conduct which could reasonably be considered inappropriate in a professional setting;
* Advocating for or encouraging any of the above behaviors.
* Enforcement and Reporting Code of Conduct Issues:

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:[email protected]). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
28 changes: 27 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -173,3 +172,30 @@
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
7 changes: 7 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Trace Analytics Maintainers

## Maintainers
| Maintainer | GitHub ID | Affiliation |
|------------------------|---------------------------------------------------|-------------|
| David Cui | [davidcui-amzn](https://github.com/davidcui-amzn) | Amazon |
| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon |
13 changes: 12 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
OpenSearch
Copyright 2021 OpenSearch Contributors

This product includes software developed by
Elasticsearch (http://www.elastic.co).
Copyright 2009-2018 Elasticsearch

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).

This product includes software developed by
Joda.org (http://www.joda.org/).
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Open Distro for Elasticsearch Trace Analytics
# OpenSearch Dashboards Trace Analytics

The Open Distro for Elasticsearch Trace Analytics plugin provides instant on dashboards in Kibana for users to quickly analyze their logs. The plugin uses aggregated results from two indices, `otel-v1-apm-span-*` and `otel-v1-apm-service-map*` created by the otel-trace-raw-processor and service-map-processor, and renders three main views:
The OpenSearch Dashboards Trace Analytics plugin provides instant on dashboards in OpenSearch Dashboards for users to quickly analyze their logs. The plugin uses aggregated results from two indices, `otel-v1-apm-span-*` and `otel-v1-apm-service-map*` created by the otel-trace-raw-processor and service-map-processor, and renders three main views:

1. Dashboard: an overview of the trace groups and two charts: error rate and throughput.

Expand All @@ -16,21 +16,19 @@ Please see our technical [documentation](https://opendistro.github.io/for-elasti

## Setup

1. Download Elasticsearch for the version that matches the [Kibana version specified in package.json](./package.json#L5).
1. Download the Kibana source code for the [version specified in package.json](./package.json#L5) you want to set up.
1. Download OpenSearch for the version that matches the [OpenSearch Dashboards version specified in package.json](./package.json#L5).
1. Download the OpenSearch Dashboards source code for the [version specified in package.json](./package.json#L5) you want to set up.

See the [Kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#setting-up-your-development-environment) for more instructions on setting up your development environment.

1. Change your node version to the version specified in `.node-version` inside the Kibana root directory.
1. cd into `plugins` directory in the Kibana source code directory.
1. Change your node version to the version specified in `.node-version` inside the OpenSearch Dashboards root directory.
1. cd into `plugins` directory in the OpenSearch Dashboards source code directory.
1. Check out this package from version control into the `plugins` directory.
1. Run `yarn kbn bootstrap` inside `kibana/plugins/trace-analytics`.
1. Run `yarn osd bootstrap` inside `OpenSearch-Dashboards/plugins/trace-analytics`.

Ultimately, your directory structure should look like this:

```md
.
├── kibana
├── OpenSearch-Dashboards
│ └── plugins
│ └── trace-analytics
```
Expand All @@ -39,24 +37,22 @@ Ultimately, your directory structure should look like this:

To build the plugin's distributable zip simply run `yarn build`.

Example output: `./build/opendistroTraceAnalytics-*.zip`
Example output: `./build/traceanalyticsDashboards*.zip`


## Run

- `yarn start`

Starts Kibana and includes this plugin. Kibana will be available on `localhost:5601`.

## Contributing to Open Distro for Elasticsearch Trace Analytics
Starts OpenSearch Dashboards and includes this plugin. OpenSearch Dashboards will be available on `localhost:5601`.

We welcome you to get involved in development, documentation, testing the kibana reports plugin. See our [CONTRIBUTING.md](./CONTRIBUTING.md) and join in.
## Contributing to OpenSearch Dashboards Trace Analytics

Since this is a Kibana plugin, it can be useful to review the [Kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md) alongside the documentation around [Kibana plugins](https://www.elastic.co/guide/en/kibana/master/kibana-plugins.html) and [plugin development](https://www.elastic.co/guide/en/kibana/current/plugin-development.html).
We welcome you to get involved in development, documentation, testing the OpenSearch Dashboards Trace Analytics plugin. See our [CONTRIBUTING.md](./CONTRIBUTING.md) and join in.

## Bugs, Enhancements or Questions

Please file an issue to report any bugs you may find, enhancements you may need or questions you may have [here](https://github.com/opendistro-for-elasticsearch/trace-analytics/issues).
Please file an issue to report any bugs you may find, enhancements you may need or questions you may have [here](https://github.com/opensearch-project/trace-analytics/issues).

## License

Expand Down
Loading

0 comments on commit 5ad2e01

Please sign in to comment.