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

Enable regexes and functions in link patterns #817

Conversation

yoave23
Copy link
Contributor

@yoave23 yoave23 commented Sep 23, 2021

Which problem is this PR solving?

Unblocked by JSON config support from #123

Short description of the changes

Allow matching link patterns with regular expressions or functions

example with regex, this will apply the pattern all tags:

{
  type: 'tags',
  text: 'hello world',
  key: /./,
  url: 'https://github.com/jaegertracing',
}

example for function config:

{
  type: 'tags',
  text: 'hello world',
  key: (key: string) => key.startsWith('comp'),
  url: 'https://github.com/jaegertracing',
}

@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #817 (2a139dc) into master (a3addbe) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #817      +/-   ##
==========================================
- Coverage   95.22%   95.19%   -0.03%     
==========================================
  Files         231      231              
  Lines        7097     7103       +6     
  Branches     1706     1709       +3     
==========================================
+ Hits         6758     6762       +4     
- Misses        333      335       +2     
  Partials        6        6              
Impacted Files Coverage Δ
packages/jaeger-ui/src/model/link-patterns.tsx 94.89% <100.00%> (+0.33%) ⬆️
...mponents/TracePage/TraceStatistics/tableValues.tsx 96.87% <0.00%> (-0.70%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3addbe...2a139dc. Read the comment docs.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Please add documentation somewhere.

FWIW, I see that the README has a UI Configuration section that simply points to the website, I wonder if it would've been better to do the opposite, i.e. keep docs in this repo (e.g. plexus plugin has an extensive README, as well as tracking API) and point the docs here.

@yoave23
Copy link
Contributor Author

yoave23 commented Sep 26, 2021

Please add documentation somewhere.

can it wait till I submit a PR for #729? should be ready by the end of the week

@yurishkuro yurishkuro merged commit cc9643c into jaegertracing:master Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants