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

Add links to make values in tags or log properties clickable #216

Closed
divdavem opened this issue Jun 6, 2018 · 6 comments
Closed

Add links to make values in tags or log properties clickable #216

divdavem opened this issue Jun 6, 2018 · 6 comments

Comments

@divdavem
Copy link
Contributor

divdavem commented Jun 6, 2018

Hello,

I am opening this issue to discuss the following feature that we would like to add: in the list of tags or log properties, we would like to replace some values by clickable links, so that it is possible to click on those values to open another tool in another browser tab with more information related to the item that was clicked.

This feature would have to be configurable: there should be a list of link templates. Each template would be a URL with tokens that would be replaced by a value, looking first in the current set of key-values (tags/log properties) and if the corresponding token is not found, going up in the tags of the parent spans in the CHILD_OF hierarchy until a value is found for that key.

If we open a pull request with such a feature, would you be interested in integrating it? Or would it be better to have some kind of extension point that anyone could use to customize the way tags and log properties are displayed, which would allow us to also implement our feature in a kind of plugin? The way such plugins could be implemented would then need to be defined, and in that case we should have enough contextual information from the parent spans.

Please tell us what you think.

Thank you in advance for your answer!

@black-adder
Copy link
Contributor

I think the plugin route sounds more feasible, @tiffon weren't you working on plugin designs? Would something like this fit into that model?

@yurishkuro
Copy link
Member

+1, we wanted this feature from the start, never had a chance to implement.

I am not sure it requires a plugin framework vs. one general framework that is config-file based, if it can be made flexible enough.

@divdavem
Copy link
Contributor Author

divdavem commented Jun 7, 2018

@black-adder @yurishkuro Thank you for your answer!

If the configuration can be put in a JS file (cf #123), I think it can be made very flexible.
For example, it would be possible to accept a function from the config which would be called to decide whether each tag should be displayed as a link and how (maybe it could return the React markup to display that tag, if React itself is passed as a parameter). Now the interface of such a function would need to be clearly defined. Passing enough context would be needed for us (including the full current trace and a reference to the current span and log item).

@tiffon
Copy link
Member

tiffon commented Jun 16, 2018

@divdavem Thanks for opening this ticket!

I agree with @yurishkuro, the config file approach (#123) is more attractive as the current thoughts around plugins are on more of a macro level, so to speak.

Seems like there are a few scenarios outlined... or just one general scenario?

replace some values by clickable links, looking first in the current set of key-values (tags/log properties) and if the corresponding token is not found, going up in the tags of the parent spans in the CHILD_OF hierarchy until a value is found for that key.

Does this mean, if a key-value pair matches a test (e.g. the key matches a test) then the current span will be inspected for tag, process or log message key-value pairs to generate a URL that will allow the value of the matching key to link to a new page. And, if suitable key-values pairs are not found in the current span, the span's ancestors will be sequentially searched?

And, just want to confirm, this is for rendering the value of the matching key-value pair (in Tags, Process or a log message) as a link? Or, is there a scenario where the link would be generated from the key-values but then displayed somewhere else?

If we open a pull request with such a feature, would you be interested in integrating it?

Contributions are definitely welcomed. 🎉🎉

@divdavem
Copy link
Contributor Author

@tiffon Thank you for your answer.

Seems like there are a few scenarios outlined... or just one general scenario?

It is just one general scenario.

Does this mean, if a key-value pair matches a test (e.g. the key matches a test) then the current span will be inspected for tag, process or log message key-value pairs to generate a URL that will allow the value of the matching key to link to a new page. And, if suitable key-values pairs are not found in the current span, the span's ancestors will be sequentially searched?

Exactly. And if the required key-values pairs are not found in the span's ancestors, then the link is not displayed.

And, just want to confirm, this is for rendering the value of the matching key-value pair (in Tags, Process or a log message) as a link? Or, is there a scenario where the link would be generated from the key-values but then displayed somewhere else?

Yes, the base idea is to render the value of the matching key-value pair as a link.
We also have the requirement to support multiple links for a key-value pair. In that case we were thinking about listing links in a popup when clicking on the value.

@tiffon
Copy link
Member

tiffon commented Aug 10, 2018

Fixed in #223.

@tiffon tiffon closed this as completed Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants