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

Adding label field #20

Merged
merged 2 commits into from
Jan 11, 2021
Merged

Adding label field #20

merged 2 commits into from
Jan 11, 2021

Conversation

srclosson
Copy link
Member

Why?

Datalinks need the option of being labeled uniquely from other labels. Some panels may parse out logging messages themselves, but to decorate a parsed logging message, it needs to be labeled and decorated in the dataframe.

BUT, one may not want duplicate labels in the dataframe. So, allow a custom label.

Example:

<date> INFO - hostIP=192.168.1.1

Will get parsed by the log panel and show 192.168.1.1, with a label of hostIP

With the configuration:
field: raw
label: host_ip_address
regex: hostIP=([0-9\.]+)

You will get the label host_ip_address instead of hostIP, which will also appear in the log panel in the explore view (but wont be able to have datalinks because it was not in the dataframe, but host_ip_address will.

Hopefully this makes sense.

@srclosson srclosson self-assigned this Jan 11, 2021
@srclosson srclosson requested a review from a team January 11, 2021 10:53
Copy link
Member

@vickyyyyyyy vickyyyyyyy left a comment

Choose a reason for hiding this comment

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

LGTM! 🔥

Also, it doesn't look like we have a story for this component, can it be added? (Doesn't need to be done within this same PR)

src/components/DataLinks/DataLink.tsx Outdated Show resolved Hide resolved
src/components/DataLinks/DataLinks.test.tsx Show resolved Hide resolved
Returning the wrong data
@srclosson srclosson merged commit 4867a87 into master Jan 11, 2021
@srclosson srclosson deleted the src/hideInternalLinkFix branch January 11, 2021 14:21
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.

None yet

2 participants