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

provide an extension mechanism for adding custom labels to gcp logs #685

Merged

Conversation

wabrit
Copy link
Contributor

@wabrit wabrit commented Oct 2, 2024

This introduces an extension interface LogRecordLabelExtractor which can be implemented to allow custom labels to be added to each log entry when logging to gcp.

@wabrit wabrit requested a review from a team as a code owner October 2, 2024 15:29
Copy link
Collaborator

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

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

Hi, thanks for your contribution.
Can you call LogRecordLabelSupplier LogRecordLabelExtractor to be consistent withe the TraceInfoExtractor?

@wabrit
Copy link
Contributor Author

wabrit commented Oct 4, 2024

It didn't seem to me that this new one should be an "extractor", in that its function is to contribute additional labels, as opposed to the trace interface which is extracting trace info from the current context.

But it's a minor point and if you prefer similar naming that's fine.

@loicmathieu
Copy link
Collaborator

But label will most of the cases extracted from the log record not hardcoded (I think we have config props for that) right? So extracted seems to be better

@wabrit
Copy link
Contributor Author

wabrit commented Oct 4, 2024

No probs - will change the name as requested

@wabrit
Copy link
Contributor Author

wabrit commented Oct 4, 2024

interface now renamed

Copy link
Collaborator

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@loicmathieu loicmathieu merged commit 7a5e689 into quarkiverse:main Oct 7, 2024
1 check passed
@wabrit wabrit deleted the extension-point-for-custom-labels branch October 7, 2024 07:41
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