Skip to content

Commit

Permalink
Use Lerna (#209)
Browse files Browse the repository at this point in the history
* Prep the repo for separately developed components
* Fix uberinternal yarn.lock issues
* Upgrade react to 16.3.2
* Update readme to account for on Lerna changes

Signed-off-by: Joe Farro <joef@uber.com>

Directed graph layout and presentation (#212)

* Prep the repo for separately developed components

Signed-off-by: Joe Farro <joef@uber.com>

* WIP - Very rough graph layout functionality

Signed-off-by: Joe Farro <joef@uber.com>

* Graph layout functionality is in solid shape

Outstanding:
* tests
* calculate edges via several workers when there are many edges

Signed-off-by: Joe Farro <joef@uber.com>

* Fix minor misc issues with plexus layout

Signed-off-by: Joe Farro <joef@uber.com>

* Fix uberinternal yarn.lock issues

Signed-off-by: Joe Farro <joef@uber.com>

* Fix uberinternal yarn.lock issues

Signed-off-by: Joe Farro <joef@uber.com>

* Upgrade react to 16.3.2

Signed-off-by: Joe Farro <joef@uber.com>

* Upgrade flow to 0.71.0

Signed-off-by: Joe Farro <joef@uber.com>

* Very rough React graph component

Signed-off-by: Joe Farro <joef@uber.com>

* Enable custom props for graph elements

Signed-off-by: Joe Farro <joef@uber.com>

* The graph refreshes when it gets new data

Signed-off-by: Joe Farro <joef@uber.com>

* Make the jaeger-ui package private

Signed-off-by: Joe Farro <joef@uber.com>

* Misc cleanup for plexus package.json

Signed-off-by: Joe Farro <joef@uber.com>

* Fix issues with plexus package.json

Signed-off-by: Joe Farro <joef@uber.com>

* Don't output a CSS file for plexus

Signed-off-by: Joe Farro <joef@uber.com>

* Increase plexus node spacing for neato layouts

Signed-off-by: Joe Farro <joef@uber.com>

* Update plexus to 0.0.1-dev.2

Signed-off-by: Joe Farro <joef@uber.com>

* Adding new issue and pull request template (#219)

Signed-off-by: Prakriti <prakritibansal98@gmail.com>

* plexus readme, remove `LayoutManager.dispose()`

Signed-off-by: Joe Farro <joef@uber.com>

* remove unecessary package

Signed-off-by: Joe Farro <joef@uber.com>

* Add more complex graphs to plexus demo

Signed-off-by: Joe Farro <joef@uber.com>

* Start the worker ID at 0

Signed-off-by: Joe Farro <joef@uber.com>

Search page functionality for trace diffs

Signed-off-by: Joe Farro <joef@uber.com>

Stub for trace diff page, update redux state shape

- Better redux state shape for trace diff
  - Refer to traces selected for comparison as trace diff cohort
- Better redux state shape for fetched trace data
  - Before: One loading prop to keep track of all search and individual
    trace fetching
  - After: Loading is tracked separately for serach and for each
    individual trace being fetched
  - This is better all around and lays the ground-work for fetching
    multiple individual traces which will be necessary for trace diff
    page when hit directly via URL (will need to fetch two or more
    traces)

Signed-off-by: Joe Farro <joef@uber.com>

Optimization for trace mini-map rendering

On a trace with ~16k spans reduced minimap rendering from ~250ms to
~20ms. For context, the initial render of the trace was around 1.22s.

Signed-off-by: Joe Farro <joef@uber.com>

Redux cleanup, hydrate diff cohort on search page

- Merge TraceSummary into Trace
- Redux action to fetch multiple traces by ID
- Create a small-sized variation of the loading indicator
- SearchTracePage loads trace data for traces in the diff cohort
  - Show loading indicator when trace data is being loaded
  - Show inline error when trace loading fails
  - Strip failed traces from diff cohort when linking to diff page
- Diff page forces redux state based on URL params

Signed-off-by: Joe Farro <joef@uber.com>

Trace diff page header functionality

- Fetch traces that need to be loaded
- Keep the URL and redux state in sync after changes to A or B
- Allow entering traces by ID
- Allow selecting other traces in the cohort
- Indicate when loading a trace failed

Signed-off-by: Joe Farro <joef@uber.com>

Convert trace to a DAG

Apply three transforms to spans when converting to DAG:

- Adopt peer.service for service name when a client span is missing
  the corresponding server span
- Ignore client spans when the only child is a reasonable server span
- Try to figure out a better operation name when operation === the
  http.method tag

The conversion can be optimized; it takes about 230ms on a trace with
~35k spans. A trace with ~9k spans takes about 50ms.

Signed-off-by: Joe Farro <joef@uber.com>

Add useDotEdges and totalMemory options to plexus

- Option in plexus to set the totalMemory viz.js uses
  - Sometimes viz.js runs out of memory on large graphs, especially
    when using the neato engine, increasing the total memeory can help
- Option in plexus to use dot edges in plexus graphs
  - Useful for trees (neato and plexus are very similar) or large
    graphs (neato is too slow)

Signed-off-by: Joe Farro <joef@uber.com>

Initial trace diff graph

- Ability to create diff of two TraceDag instances
- Additional transforms to trim superfluous nodes
  - skipAnnotationSpans
  - skipClientSpans

Signed-off-by: Joe Farro <joef@uber.com>

Add zoom and pan to plexus

- Zoom and pan
- Add graph state as param to setOn* props
- Enable scaling edge stroke based on zoom level

Signed-off-by: Joe Farro <joef@uber.com>

Add zoom to trace diff and increase color contrast

- Add zoom pan to trace diff
- On node hover show node @ 1x zoom (useful when zoomed out)
- Higher contrast colors for trace diff DAG
- Allowing scrolling for errors
- Fix issue with node sizing during measurement phase

Signed-off-by: Joe Farro <joef@uber.com>

Add a minimap to plexus to help zoom and pan

Also added to trace-diffs

Signed-off-by: Joe Farro <joef@uber.com>

Guard plexus zoom functionality with a flag

Signed-off-by: Joe Farro <joef@uber.com>

Fixes and optimizations to plexus and trace diffs

- Bug fix: Each graph should have a unique edge arrow def IRI

- Keep strokes from scaling into invisibility when zooming

  - Remove redundant root node

  - Apply zoom transforms to the node and edge containers

  - Scale the arrow def based on the current zoom (when zoom is
    enabled) by scaling the coords in the marker and path definitions

- Add a convenience prop-factory that toggles a class, "is-small",
  based on the current zoom level

  - Use "is-small" to toggle the visibility of node text and edge
    stroke width based on the current zoom level

- Change prop factories to be grouped by feature instead of context

  - In many cases the prop factory can be applied to multiple contexts,
    e.g. to both the edges container and an edge path

- Make Node and EdgePath components PureComponents

- Wrap rendering the nodes and edges in a PureComponent to prevent
  unnecessary renders

- Remove DirectedGraphState from the edge and node factory prop
  functions to prevent rendering with every transform change

Signed-off-by: Joe Farro <joef@uber.com>

Add additional layout options to plexus

Signed-off-by: Joe Farro <joef@uber.com>

Lighten trace diff color scheme

Signed-off-by: Joe Farro <joef@uber.com>

Use green instead of blue in trace diff coloring

Green is more commonly used to show additions

Signed-off-by: Joe Farro <joef@uber.com>

Add "Compare" to the top nav and other small fixes

Signed-off-by: Joe Farro <joef@uber.com>

Adding new issue and pull request template (#219)

Signed-off-by: Prakriti <prakritibansal98@gmail.com>

Integrate Google Analytics into Search Page (#220)

* Integrate GA into search page

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Review changes

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Remove tracking of actual values

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

Timeline Expand and Collapse Features (#221)

* Add expansion and collapsing features

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Use Icon component

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Use spans upstream

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Improve css

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Rotate collapse buttons

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Remove debug logging

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Remove spans from TimelineHeaderRow

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Add unit test for TimelineCollapser

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Use popover

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Add TimelineCollapser test

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Revert "Use popover"

This reverts commit 6152402

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Add tests for duck.js

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Add more tests for duck.js

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Add more tests for index.js

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Add keyboard shortcuts

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Update changelog

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

* Make review changes

Signed-off-by: Davit Yeghshatyan <davo@uber.com>

Squashed commits from develop-directed-graph (#224)

Signed-off-by: Joe Farro <joef@uber.com>

Lazily initialize the first worker in plexus

Signed-off-by: Joe Farro <joef@uber.com>

Fix issue with trace diff URL from auth redirects

The trace diff url was of the form:

    /trace/<trace-a-id>:diff?b=<trace-b-id>

But, during OneLogin / SAML auth redirects it would get URL encoded
and then not URL decoded resulting in it being interpreted as a trace
ID.

Move to the following form with three literal periods between the IDs:

    /trace/<trace-a-id>...<trace-b-id>

Other misc fixes and tweaks:

- Fix an issue where selecting a cohort of traces and then clicking the
  "Compare" button in the top nav cleared the cohort

- Fix an issue where removing a trace from the cohort on the search
  page would not clear the trace from A or B, effectively preventing
  traces set as A or B from ever being removed

- Clean up route definitions

Signed-off-by: Joe Farro <joef@uber.com>

Fix trace detail tracking for revised redux shape

Signed-off-by: Joe Farro <joef@uber.com>
  • Loading branch information
tiffon committed Jul 31, 2018
1 parent ba8349e commit 94cacc2
Show file tree
Hide file tree
Showing 346 changed files with 11,374 additions and 1,306 deletions.
12 changes: 6 additions & 6 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[ignore]
# node_module packages that have a .flowconfig in conflict with this file
<PROJECT_ROOT>/node_modules/uber-licence
<PROJECT_ROOT>/node_modules/redux-form
<PROJECT_ROOT>/node_modules/react-motion
<PROJECT_ROOT>/node_modules/draft-js
.*/node_modules/uber-licence/.*
.*/node_modules/redux-form/.*
.*/node_modules/react-motion/.*
.*/node_modules/draft-js/.*
.*/node_modules/nwb/.*

[include]

Expand All @@ -13,4 +13,4 @@
[options]

[version]
0.64.0
0.71.0
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
We appreciate your contribution to the Jaeger project! 👋🎉
Before creating a pull request, please make sure:
- Your PR is solving one problem
- You have read the guide for contributing
- See https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- You signed all your commits (otherwise we won't be able to merge the PR)
- See https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md#sign-your-work
- You added unit tests for the new functionality
- You mention in the PR description which issue it is addressing, e.g. "Resolves #123"
-->

## Which problem is this PR solving?
-

## Short description of the changes
-
47 changes: 18 additions & 29 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
<!--
If you are reporting a new issue, please make sure that we do not have any
duplicates already open. You can ensure this by searching the issue list for
this repository. If there is a duplicate, please close your issue and add a
comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to
include the BUG REPORT INFORMATION shown below. If you fail to provide this
information within 7 days, we cannot debug your issue and will close it. We
will, however, reopen it if you later provide the information.
---------------------------------------------------
BUG REPORT INFORMATION
---------------------------------------------------
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
Welcome to the Jaeger project! 👋🎉
- Please search for existing issues to avoid creating duplicate bugs/feature requests.
- Please be respectful and considerate of others when commenting on issues.
- Please provide as much information as possible so we all understand the issue.
- If you only have a question, you may get a faster response by asking in
- our chat room https://gitter.im/jaegertracing/Lobby, or
- the forum https://groups.google.com/d/forum/jaeger-tracing
(but please don't double post)
-->

**Description**
## Requirement - what kind of business use case are you trying to solve?

<!--
Briefly describe the problem you are having in a few paragraphs.
-->

**Steps to reproduce the issue:**
1.
2.
3.

**Describe the results you received:**
<!-- required section -->

## Problem - what in Jaeger blocks you from solving the requirement?

**Describe the results you expected:**
<!-- required section -->
<!-- If possible, describe the impact of the problem. -->

## Proposal - what do you suggest to solve the problem or improve the existing situation?

**Additional information you deem important (e.g. issue happens only occasionally):**
<!-- It's ok if you don't have one. -->

## Any open questions to address

**Additional environment details (Browser, etc.):**
<!-- Questions that should be answered before proceeding with implementation. -->
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ coverage
.DS_Store
npm-debug.log
.vscode
.idea
yarn-error.log
lerna-debug.log
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
language: node_js
node_js:
- '6'
cache:
directories:
- node_modules
cache: yarn
script:
- npm run lint
- npm run coverage
- npm run build
- yarn lint
- yarn coverage
- yarn build
after_success:
- npm install -g codecov
- yarn global add codecov
- codecov
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes merged into master

### [#221](https://github.com/jaegertracing/jaeger-ui/pull/221) Timeline Expand and Collapse Features

* Partially addresses [#160](https://github.com/jaegertracing/jaeger-ui/issues/160) - Heuristics for collapsing spans

### [#191](https://github.com/jaegertracing/jaeger-ui/pull/191) Add GA event tracking for actions in trace view

* Partially addresses [#157](https://github.com/jaegertracing/jaeger-ui/issues/157) - Enhanced Google Analytics integration
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ git clone https://github.com/jaegertracing/jaeger-ui.git
cd jaeger-ui
```

Use the recommended npm and Node versions: (defined in [.nvmrc](./.nvmrc) file):
Use the recommended Node versions: (defined in [.nvmrc](./.nvmrc) file):

```
nvm use
```

Install dependencies via `npm` or `yarn`:
Install dependencies via `yarn`:

```
npm install
yarn install
# or
yarn
```
Expand All @@ -46,25 +46,25 @@ ssh -fN -L 16686:$BACKEND_HOST:$BACKEND_PORT $BACKEND_PORT
Start the development server with hot loading:

```
npm start
cd packages/jaeger-ui && yarn start
```

#### Commands

| Command | Description |
| --------------- | ----------------------------------------------------------- |
| `npm start` | Starts development server with hot reloading and api proxy. |
| `npm test` | Runs all the tests |
| `npm run lint` | Lint the project (eslint, prettier, flow) |
| `npm run build` | Runs production build. Outputs files to `/dist`. |
| Command | Description |
| ------------------------------------- | ------------------------------------------------------------------- |
| `cd packages/jaeger-ui && yarn start` | Starts development server with hot reloading and api proxy. |
| `yarn test` | Run all the tests |
| `yarn lint` | Lint the project (eslint, prettier, flow) |
| `yarn build` | Runs production build. Outputs files to `packages/jaeger-ui/build`. |

## Build

Running build will output all the static files to the `./dist` folder:
Running build will output all the static files to the `packages/jaeger-ui/build` folder:

```
npm install
npm run build
yarn install
yarn build
```

## UI Configuration
Expand Down
7 changes: 7 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lerna": "2.10.2",
"packages": ["packages/*"],
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true
}
111 changes: 15 additions & 96 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
{
"name": "jaeger-ui",
"version": "0.0.1",
"main": "src/index.js",
"license": "MIT",
"proxy": {
"/api": {
"target": "http://localhost:16686",
"logLevel": "silent",
"secure": false,
"changeOrigin": true,
"ws": true,
"xfwd": true
}
},
"homepage": ".",
"private": true,
"license": "Apache-2.0",
"devDependencies": {
"babel-eslint": "^7.2.3",
"babel-plugin-import": "^1.6.3",
"bluebird": "^3.5.0",
"enzyme": "^3.2.0",
"enzyme-adapter-react-16": "^1.1.0",
"enzyme-to-json": "^3.3.0",
"eslint": "^4.5.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.3.0",
Expand All @@ -29,88 +11,25 @@
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.2.1",
"flow-bin": "^0.71.0",
"glow": "^1.2.2",
"husky": "^0.14.3",
"less-vars-to-js": "^1.2.1",
"lint-staged": "^4.0.3",
"prettier": "^1.10.2",
"react-app-rewire-less": "^2.1.0",
"react-app-rewired": "^1.4.0",
"react-scripts": "^1.0.11",
"react-test-renderer": "^15.6.1",
"sinon": "^3.2.1"
},
"dependencies": {
"antd": "^3.0.3",
"chance": "^1.0.10",
"classnames": "^2.2.5",
"combokeys": "^3.0.0",
"cytoscape": "^3.2.1",
"cytoscape-dagre": "^2.0.0",
"d3-scale": "^1.0.6",
"dagre": "^0.7.4",
"deep-freeze": "^0.0.1",
"flow-bin": "^0.64.0",
"fuzzy": "^0.1.3",
"global": "^4.3.2",
"history": "^4.6.3",
"is-promise": "^2.1.0",
"isomorphic-fetch": "^2.2.1",
"jest": "^21.2.1",
"json-markup": "^1.1.0",
"lodash": "^4.17.4",
"logfmt": "^1.2.0",
"moment": "^2.18.1",
"prop-types": "^15.5.10",
"query-string": "^5.0.0",
"raven-js": "^3.22.1",
"react": "^16.0.0",
"react-dimensions": "^1.3.0",
"react-dom": "^16.0.0",
"react-ga": "^2.4.1",
"react-helmet": "^5.1.3",
"react-icons": "^2.2.7",
"react-metrics": "^2.3.2",
"react-redux": "^5.0.6",
"react-router-dom": "^4.1.2",
"react-router-redux": "5.0.0-alpha.6",
"react-virtualized-select": "^3.1.0",
"react-vis": "^1.7.2",
"react-vis-force": "^0.3.1",
"recompose": "^0.25.0",
"redux": "^3.7.2",
"redux-actions": "^2.2.1",
"redux-async-middleware": "^0.0.0",
"redux-form": "^7.0.3",
"redux-promise-middleware": "^4.3.0",
"reselect": "^3.0.1",
"store": "^2.0.12",
"tween-functions": "^1.2.0",
"u-basscss": "2.0.0"
"lerna": "^2.10.2",
"lint-staged": "^7.0.4",
"prettier": "^1.10.2"
},
"workspaces": ["packages/*"],
"scripts": {
"start": "react-app-rewired start",
"start:ga-debug":
"REACT_APP_GA_DEBUG=1 REACT_APP_VSN_STATE=$(./scripts/get-tracking-version.js) react-app-rewired start",
"build": "REACT_APP_VSN_STATE=$(./scripts/get-tracking-version.js) react-app-rewired build",
"eject": "react-scripts eject",
"test": "CI=1 react-app-rewired test --env=jsdom --color",
"test-dev": "react-app-rewired test --env=jsdom",
"coverage": "npm run test -- --coverage",
"lint": "npm run eslint && npm run prettier && npm run flow && npm run check-license",
"eslint": "eslint src",
"build": "lerna run build",
"check-license": "./scripts/check-license.sh",
"prettier": "prettier --write 'src/**/*.{css,js,json,md}' '*.{css,js,json,md}'",
"coverage": "lerna run coverage",
"eslint": "eslint 'scripts/*.js' 'packages/*/src/**/*.js' 'packages/*/*.js'",
"flow": "glow",
"precommit": "lint-staged"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.js",
"!src/utils/DraggableManager/demo/*.js",
"!src/utils/test/**/*.js",
"!src/demo/**/*.js"
]
"lint": "npm run eslint && npm run prettier && npm run flow && npm run check-license",
"precommit": "lint-staged",
"prettier":
"prettier --write '{.,scripts}/*.{js,json,md}' 'packages/*/{src,demo/src}/**/*.{css,js,json,md}' 'packages/*/*.{css,js,json,md}'",
"test": "lerna run test"
},
"prettier": {
"printWidth": 110,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
@layout-zero-trigger-height : 42px;

@menu-dark-bg: #151515;

// Table
@table-row-hover-bg:#e5f2f2;
File renamed without changes.
Loading

0 comments on commit 94cacc2

Please sign in to comment.