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

Option to export Logback and Log4j 2 markers #2529

Merged
merged 10 commits into from Oct 20, 2022
Merged

Option to export Logback and Log4j 2 markers #2529

merged 10 commits into from Oct 20, 2022

Conversation

jeanbisutti
Copy link
Member

No description provided.

@jeanbisutti jeanbisutti changed the title Option to export logback marker attributes Option to export Logback and Log4j 2 marker attribute Sep 21, 2022
@@ -167,6 +170,10 @@ private static void setExtraAttributes(
telemetryBuilder.addProperty("LineNumber", String.valueOf(value));
return;
}
if (OTEL_LOG_MARKER.getKey().equals(key)) {
telemetryBuilder.addProperty("Marker", String.valueOf(value));
Copy link
Member Author

Choose a reason for hiding this comment

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

Would Marker be a good property name?

@@ -10,5 +10,8 @@
"logging": {
"level": "warn"
}
},
"preview": {
"captureLog4jMarkerAttribute": true
Copy link
Member Author

Choose a reason for hiding this comment

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

The feature only works with Log4j 2 (not for Log4j 1). Would captureLog4j2MarkerAttribute be a better property name?

Copy link
Member Author

Choose a reason for hiding this comment

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

@trask @heyams This PR could be tested and merged after the next opentelemetry-java-instrumentation release. Early feedbacks are welcome.

@jeanbisutti
Copy link
Member Author

Rabase on top of #2596 before merging

@jeanbisutti jeanbisutti marked this pull request as ready for review October 17, 2022 08:20
@jeanbisutti jeanbisutti changed the title Option to export Logback and Log4j 2 marker attribute Option to export Logback and Log4j 2 markers Oct 17, 2022
@trask trask changed the base branch from main to update-otel October 18, 2022 16:37
Base automatically changed from update-otel to main October 20, 2022 01:17
@trask trask merged commit 4bc9c67 into main Oct 20, 2022
@trask trask deleted the logback-marker branch October 20, 2022 01:54
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