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

initial implementation of operation tracking #10

Draft
wants to merge 178 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
a3ecb9b
fix: reverse order in which TTR/TTI is emitted
niieani Apr 18, 2024
853ba21
feat: default detail object to an empty object
niieani Apr 18, 2024
8577593
feat: initial implementation of operation tracking
niieani Apr 18, 2024
1f4c9e3
fix: debouncing removal
niieani Jun 4, 2024
258ed45
feat: allow passing in blocking tasks without observing them
niieani Jun 4, 2024
c058f78
feat: track render count and use 'status' instead of status_code
niieani Jun 4, 2024
916bff6
fix: misc fixes
niieani Jun 4, 2024
ad884f3
fix: ensure not to assign the readonly entryType
niieani Jun 4, 2024
fd30d85
feat: allow filtering events in preprocessor
niieani Jun 4, 2024
a63653e
fix: improvements to getCommonUrlForTracing
niieani Jun 5, 2024
b57495b
feat: add 'keep' option to trackers
niieani Jun 5, 2024
7ea297f
chore: ignore storybook static output
niieani Jun 12, 2024
20d4f44
fix: correctly end the operation after all debounces
niieani Jun 12, 2024
bdf11d2
chore: story sorting so Visualizer loads firts
yojenkins Jun 12, 2024
25a4c49
refactor: move visualizer to separate dir from stories
yojenkins Jun 12, 2024
f79a322
refactor: setup visualizer to have a basic file input
yojenkins Jun 13, 2024
bdd78b1
feat: basic file drop
yojenkins Jun 13, 2024
8efea66
fix: restore multi select options functionality
yojenkins Jun 14, 2024
9a9ac60
Merge pull request #14 from zendesk/ejenkins/PINGU-1220-viz-improvements
yojenkins Jun 21, 2024
e9ef553
fix: correctly merge 'details' into 'metadata'
niieani Sep 25, 2024
9820343
fix: allow pre-populating event before processing
niieani Sep 27, 2024
d6f8d84
fix: rename metadata to attributes
niieani Sep 30, 2024
565de71
feat: add cancelOperation
niieani Oct 2, 2024
bec3b7d
fix: improvements to hooks
niieani Oct 2, 2024
614e44e
feat: allow useRenderProcessTrace to restarted with a depedency list
xnanodax Oct 2, 2024
f27922d
test: fix fixture
niieani Oct 2, 2024
6f83c1b
Revert "feat: add cancelOperation"
niieani Oct 2, 2024
5dc5881
feat: add cancelOperation
niieani Oct 2, 2024
ebd75e0
Merge pull request #15 from zendesk/pingu/hooks
xnanodax Oct 2, 2024
03ebb90
ci: add workflow for publishing storybook to gh pages
yojenkins Jun 14, 2024
299a8f3
chore: wip
niieani Oct 10, 2024
34b6ff5
chore: thursday wip
yojenkins Oct 10, 2024
311f454
chore: wip
niieani Oct 10, 2024
7feca3c
chore: wip
niieani Oct 10, 2024
16a3956
chore: more thursday wip
yojenkins Oct 10, 2024
b69339c
chore: friday morning wip
yojenkins Oct 11, 2024
92f6471
chore: wip
niieani Oct 11, 2024
dda15c2
chore: wip
niieani Oct 11, 2024
f28971d
chore: wip
niieani Oct 11, 2024
80cad11
chore: wip
niieani Oct 12, 2024
39883f1
chore: update TraceManager type
xnanodax Oct 14, 2024
f1ff292
test: move out entry match definition, update method, add test cases
xnanodax Oct 15, 2024
2ba72e7
chore: move constructor higher
xnanodax Oct 15, 2024
d9c135c
refactor: doesEntryMatchDefinition accepts annotation + entry
yojenkins Oct 15, 2024
4151bb8
fix: wip
niieani Oct 22, 2024
e04bf1b
feat: add map performance entry
xnanodax Oct 24, 2024
2928e12
feat: call func from active trace
xnanodax Oct 24, 2024
61d5997
chore: update return value, update types
xnanodax Oct 31, 2024
11a1c93
feat: add observer
xnanodax Nov 1, 2024
7a76006
fix: remove changes to active trace
xnanodax Nov 1, 2024
290df84
feat(wip): partial implementation of createTraceRecording
yojenkins Oct 24, 2024
3d996a2
feat(wip): convert trace recording to DD trace
yojenkins Oct 31, 2024
9384c30
fix: update process performance entry after pairing
xnanodax Nov 1, 2024
efcb3f4
refactor: rename (trace)entry -> span
xnanodax Nov 1, 2024
0cec6aa
feat: add preliminary deadline support
niieani Nov 4, 2024
c58a983
docs: add docs
niieani Nov 5, 2024
13ed846
refactor: extract into files
niieani Nov 6, 2024
f2b5d52
fix: update rename from entry to span for util file + test file
xnanodax Nov 12, 2024
4a1ca6f
feat: quietWindow implementation
niieani Nov 13, 2024
945b23b
refactor: improvements to quietWindow
niieani Nov 13, 2024
b605f77
feat: createQuietWindowDurationCalculator
niieani Nov 14, 2024
85e84e3
feat: add storybook for v3
xnanodax Nov 14, 2024
5f76e6d
test: add trace manager tests
xnanodax Nov 14, 2024
b9db806
test: add testing entries called w/ reportFn
xnanodax Nov 15, 2024
3a7d628
fix: fix test case
xnanodax Nov 15, 2024
a6c1bb8
test: update tests
xnanodax Nov 15, 2024
02c6552
test: add generateAsciiTimeline
niieani Nov 15, 2024
a79e102
fix: move onEnterState call to State Machine constructor
niieani Nov 15, 2024
c4370b3
feat: implement waiting-for-interactive in state machine
niieani Nov 15, 2024
3587f01
feat: allow re-processing the same entry
niieani Nov 15, 2024
b5db390
fix: type issue
niieani Nov 15, 2024
66a8a37
fix: SpanMatchCriteria takes in scopeKeys, not scope
niieani Nov 15, 2024
3cd6a2a
fix: make attributes optional for BeaconConfig
niieani Nov 15, 2024
be98080
docs: improvements to storybook
niieani Nov 15, 2024
31e7495
fix: fix some TODOs
niieani Nov 15, 2024
590f16d
chore: update todo
xnanodax Nov 15, 2024
cc371b7
chore: update Garden
niieani Nov 15, 2024
82185bb
refactor: extract recordingComputeUtils
niieani Nov 15, 2024
4e8d2ba
chore: fix storybook
niieani Nov 15, 2024
f03d4f9
feat: tag annotations
niieani Nov 15, 2024
b0e83b9
chore: add captureInteractive
niieani Nov 15, 2024
1efffef
fix: re-process events from debouncing
niieani Nov 15, 2024
c796c4e
refactor: move types around
niieani Nov 16, 2024
7b557be
test: update test cases to include spanAndAnnotation
xnanodax Nov 16, 2024
5f11c5e
feat: make SpanMatcher more flexible
niieani Nov 16, 2024
bc16203
refactor: use star import
niieani Nov 16, 2024
07a35f7
feat: allow MatchDefinitions
niieani Nov 16, 2024
ed7014b
fix: count occurrences by type+name
niieani Nov 18, 2024
fbaa2da
test: update test to use ascii timeline + extract process scan into func
xnanodax Nov 19, 2024
56ff797
test: add addt test cases
xnanodax Nov 19, 2024
4c21846
test: update test cases + add comment for missing test cases
xnanodax Nov 19, 2024
7f4015c
feat: implement ensureTimestamp and drift
niieani Nov 19, 2024
0955c12
feat: implement nonEmbeddedSpans
niieani Nov 19, 2024
6b46fe5
feat: implement operation-start and end anchors
niieani Nov 19, 2024
599b9fa
feat: keep events that overlapped the op startTime
niieani Nov 19, 2024
4f6c47b
refactor: extract prepareAndEmitRecording
niieani Nov 19, 2024
dd39ff7
refactor: extract getSpanKey
niieani Nov 19, 2024
027b183
test: fix lint & tests
niieani Nov 19, 2024
8674402
refactor: update wasInterrupted
niieani Nov 19, 2024
cd101a4
fix: additions from lotus integration, sess 1
xnanodax Nov 20, 2024
10a4fae
chore: resolve type errors from span union changes
yojenkins Nov 20, 2024
5fac466
test: add computed span and value
xnanodax Nov 21, 2024
b27c6e8
chore: add "dev" script for linked development
niieani Nov 21, 2024
fce6fed
test: add test cases for cpu idle and scope
xnanodax Nov 21, 2024
bc8e732
fix: various fixes
niieani Nov 22, 2024
c69a7ec
fix: use 'detail' not 'details'
niieani Nov 22, 2024
1f5d223
test: update tests and feat: add completeTillInteractive computaton
xnanodax Nov 23, 2024
ce05c42
chore: various small implementation improvements
niieani Nov 23, 2024
ea7e568
feat: allow 'SpanMatchDefinition' in computed spans/values
niieani Nov 25, 2024
f5042a9
chore: extract test options for test purposes
niieani Nov 25, 2024
ba326bc
feat: redefine matchEndEntry to search from the end
xnanodax Nov 25, 2024
4772f8f
test: update test snapshot
xnanodax Nov 25, 2024
3c23d81
feat: default isIdle based on 'renderedOutput'
niieani Nov 27, 2024
ba6d76e
feat: add computedRenderBeaconSpans
niieani Nov 27, 2024
8233daa
fix: output timeToContent and timeToLoading
niieani Nov 27, 2024
b4a471d
fix: add processedPerformanceEntriesByHash
niieani Dec 3, 2024
76adc7c
fix: make timeToLoading reflect the end time of the first render
niieani Dec 3, 2024
e16f114
feat: implement suppressErrorStatusPropagationOn
niieani Dec 6, 2024
eb24537
feat: add performanceEntryHash hashing
niieani Dec 6, 2024
88d59f6
feat: implement performance entry deduplication strategy
niieani Dec 6, 2024
628230d
feat: add type checking to trace definition with scopes, renames
xnanodax Dec 7, 2024
355c45a
refactor: update remaining types
niieani Dec 10, 2024
8e659f9
feat: add support for deriving scope on perf entry
yojenkins Dec 10, 2024
a7ce230
fix: update types in tests, update timing of tests
xnanodax Dec 10, 2024
cc59340
chore: formatting matchSpan
niieani Dec 10, 2024
73bd407
fix: update tests removing the intermediate constants
xnanodax Dec 11, 2024
01e0f67
fix: group fixtures together. update types in files
xnanodax Dec 11, 2024
f826341
fix: update import
xnanodax Dec 11, 2024
0e2a9b5
refactor: start using TracerScopeKeysT instead of TracerScopeT
niieani Dec 11, 2024
161f3d9
refactor: AllPossibleScopesT
niieani Dec 12, 2024
a1c22c0
fix: SpanMatcherFn doesn't break inference
niieani Dec 12, 2024
104d5a6
feat: add labelMatchers
yojenkins Dec 12, 2024
8746202
fix: address review
bbrzoska Dec 12, 2024
93bed96
feat: update reportFn to accept context
xnanodax Dec 12, 2024
51bf0a3
chore: type fixes
bbrzoska Dec 12, 2024
c01f8e9
fix: onEnd accepts Context + TraceContext name
bbrzoska Dec 13, 2024
62a17b2
fix: correct matchingRecordedEntries args
bbrzoska Dec 13, 2024
43ce111
fix: allow renderStart to occur multiple times
bbrzoska Dec 13, 2024
87e43f9
fix: improvements to convertToRum
bbrzoska Dec 13, 2024
fd3ca2d
wip: adding deadline events
yojenkins Dec 14, 2024
3f834d8
refactor: move side effects to state machine
bbrzoska Dec 14, 2024
2c60b27
feat: add next-quiet-window deadline
bbrzoska Dec 14, 2024
423b98d
feat: move span attributes into trace recording, update TODOs
xnanodax Dec 16, 2024
2804c8e
feat: implement startTillRequirementsMet, moved durations into additi…
xnanodax Dec 17, 2024
abab16e
feat: update reference to matchers
xnanodax Dec 17, 2024
1beb7bb
refactor: continue with rename
bbrzoska Dec 17, 2024
54de776
fix: correct render start time
bbrzoska Dec 17, 2024
5e9e30b
test: split into multiple files, add more tests
bbrzoska Dec 17, 2024
9941709
fix: use findLast polyfill
bbrzoska Dec 17, 2024
9252282
chore: formatting
bbrzoska Dec 17, 2024
7652cc8
chore: fix lint and exports
bbrzoska Dec 17, 2024
e82db02
fix: allow for additional attributes to be added by the consumer
bbrzoska Dec 17, 2024
47dc630
feat: allow computeValueFromMatches to return undefined
bbrzoska Dec 17, 2024
11bcb46
feat: allow computeValueFromMatches to return undefined
bbrzoska Dec 17, 2024
6561861
fix: add missing exports
bbrzoska Dec 17, 2024
ee74b23
fix: do not explicitly export types
bbrzoska Dec 18, 2024
c17ffab
fix: do not include computedSpans if the startSpan is not found
bbrzoska Dec 18, 2024
a8d7133
feat: update visualizer to support v3 (#18)
bbrzoska Jan 6, 2025
1a03659
chore: set react deps to v18
yojenkins Jan 15, 2025
3987ee9
chore: webpack build shenanigans
yojenkins Jan 16, 2025
70355ad
Merge pull request #20 from zendesk/ejenkins/update-react-dom-dep-ver…
yojenkins Jan 22, 2025
cfbd0a9
feat: implement variantsByOriginatedFrom
bbrzoska Jan 24, 2025
227e87a
feat: add required attributes type generic for useBeacon
yojenkins Jan 24, 2025
ec3ff16
Merge pull request #22 from zendesk/ejenkins/required-beacon-attributes
yojenkins Jan 24, 2025
1271fee
feat: add initial prov start
xnanodax Jan 24, 2025
2b84ef7
feat: prov start pair 2
xnanodax Jan 24, 2025
07a4c93
fix: update draft start, remove global time out variable
xnanodax Jan 28, 2025
6436bcd
fix: commit to keep current process, update types, create Tracer
xnanodax Jan 29, 2025
8dd18ea
fix: introduce internal traceUtilities and define onEnd in ActiveTrace
bbrzoska Feb 3, 2025
e96c5a3
ci: remove rrun calls
bbrzoska Feb 4, 2025
6b14442
add eslint
xnanodax Feb 5, 2025
4293f77
feat: round values from RUM report
xnanodax Feb 6, 2025
01b3326
Merge branch 'main' of bbrzoska.github.com:zendesk/react-measure-timi…
bbrzoska Feb 7, 2025
2a921d4
fix: add cancelDraftTrace, add instance methods to tracer
xnanodax Feb 11, 2025
90cc52b
chore: rename 'originatedFrom' to 'variant'
bbrzoska Feb 11, 2025
1172b95
feat: add the ability for variants to modify definition
bbrzoska Feb 11, 2025
a0e430a
test: add test for variants
bbrzoska Feb 11, 2025
c1c2335
fix: improve consistency of naming
bbrzoska Feb 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .config/beemo/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { ESLintConfig } from '@beemo/driver-eslint'
const config: ESLintConfig = {
rules: {
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'import/export': 'off',
// just in case we want to support older browsers
'unicorn/prefer-at': 'off',
'import/no-deprecated': 'off',
'compat/compat': 'off',
},
}
Expand Down
2 changes: 1 addition & 1 deletion .config/beemo/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type TypeScript from '@niieani/scaffold/src/configs/typescript'
export default {
compilerOptions: {
jsx: 'react',
target: 'es2015',
target: 'es2023' as 'es2022',
},
'ts-node': {
compilerOptions: {
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18]
node: [22]
steps:
- uses: zendesk/checkout@v3
- uses: zendesk/setup-node@v3
- uses: zendesk/checkout@v4
- uses: zendesk/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
Expand All @@ -36,10 +36,10 @@ jobs:
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next')
steps:
- uses: zendesk/checkout@v3
- uses: zendesk/setup-node@v3
- uses: zendesk/checkout@v4
- uses: zendesk/setup-node@v4
with:
node-version: 16
node-version: 20
scope: zendesk
always-auth: 'true'
cache: 'yarn'
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/publish-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ on:
branches:
- main
- next

workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: false

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read
pages: write
id-token: write
pages: write
id-token: write

jobs:
build-storybook:
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: zendesk/checkout@v4
- uses: zendesk/setup-node@v4
with:
node-version: 20
node-version: 22
scope: zendesk
always-auth: 'true'
cache: 'yarn'
Expand All @@ -41,17 +41,16 @@ jobs:
uses: actions/upload-pages-artifact@v3
with:
path: ./storybook-static

deploy:
needs: build-storybook
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v4

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ node_modules/

.DS_Store
*.local

/storybook-static
65 changes: 39 additions & 26 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,52 @@
import type { StorybookConfig } from '@storybook/react-vite'
import type { StorybookConfig } from '@storybook/react-webpack5'
import remarkGfm from 'remark-gfm'
// import { mergeConfig } from 'vite'

const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-interactions',
'@storybook/addon-actions',
'@storybook/addon-viewport',
{
name: '@storybook/addon-docs',
options: {
mdxPluginOptions: {
mdxCompileOptions: {
remarkPlugins: [remarkGfm],
},
},
},
},
'@storybook/addon-controls',
'@storybook/addon-backgrounds',
'@storybook/addon-toolbars',
'@storybook/addon-measure',
'@storybook/addon-outline',
'@storybook/addon-essentials',
'@storybook/addon-webpack5-compiler-swc',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
framework: '@storybook/react-webpack5',
// framework: {
// // name: '@storybook/react-vite',
// name: '@storybook/react-webpack5',
// options: {},
// },
core: {},
// other storybook options...,
async viteFinal(config, options) {
// modify and return config
webpackFinal(config, options) {
const assetRule = config.module?.rules?.find(
(m) =>
typeof m === 'object' &&
m.test instanceof RegExp &&
m.test.test('.svg'),
)
if (!assetRule || typeof assetRule !== 'object') {
throw new Error('SVG rule not found')
}
assetRule.test =
/\.(ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/

config.module?.rules?.unshift({
test: /\.svg$/,
// issuer: /\.[jt]sx?$/,
use: [
{ loader: '@svgr/webpack', options: { exportType: 'named' } },
'url-loader',
],
// type: 'asset/resource',
// generator: { filename: 'static/media/[path][name][ext]' }
})
return config
},
typescript: {
check: false,
reactDocgen: 'react-docgen',
reactDocgenTypescriptOptions: {}, // Available only when reactDocgen is set to 'react-docgen-typescript'
// skipCompiler: true,
},
docs: {
autodocs: true,
},
Expand Down
30 changes: 23 additions & 7 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
import type { Preview } from '@storybook/react'
// import type { IndexEntry } from '@storybook/types';

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
layout: 'fullscreen',
options: {
// a and b are of type IndexEntry, but adding the type annotations generates a syntax warning in the console for some reason
storySort: (a, b) => {
if (a.title.includes('Visualizer')) return -1
if (b.title.includes('Visualizer')) return 1
return 0
},
},
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
}
}

export default preview
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

783 changes: 0 additions & 783 deletions .yarn/releases/yarn-3.2.2.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

12 changes: 7 additions & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: '@yarnpkg/plugin-typescript'
- path: .yarn/plugins/@yarnpkg/plugin-postinstall-dev.cjs
spec: 'https://raw.githubusercontent.com/sachinraja/yarn-plugin-postinstall-dev/main/bundles/%40yarnpkg/plugin-postinstall-dev.js'
spec: "https://raw.githubusercontent.com/sachinraja/yarn-plugin-postinstall-dev/main/bundles/%40yarnpkg/plugin-postinstall-dev.js"

yarnPath: .yarn/releases/yarn-4.5.1.cjs
Loading