You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/logback/logback-appender-1.0/javaagent/README.md
+1
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
|`otel.instrumentation.logback-appender.experimental.capture-marker-attribute`| Boolean |`false`| Enable the capture of Logback markers as attributes. |
8
8
|`otel.instrumentation.logback-appender.experimental.capture-key-value-pair-attributes`| Boolean |`false`| Enable the capture of Logback key value pairs as attributes. |
9
9
|`otel.instrumentation.logback-appender.experimental.capture-logger-context-attributes`| Boolean |`false`| Enable the capture of Logback logger context properties as attributes. |
10
+
|`otel.instrumentation.logback-appender.experimental.capture-arguments`| Boolean |`false`| Enable the capture of Logback logger arguments. |
10
11
|`otel.instrumentation.logback-appender.experimental.capture-mdc-attributes`| String || Comma separated list of MDC attributes to capture. Use the wildcard character `*` to capture all attributes. |
Copy file name to clipboardExpand all lines: instrumentation/logback/logback-appender-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/logback/appender/v1_0/LogbackSingletons.java
+4
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,9 @@ public final class LogbackSingletons {
Copy file name to clipboardExpand all lines: instrumentation/logback/logback-appender-1.0/library/README.md
+1
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,7 @@ The available settings are:
100
100
|`captureMarkerAttribute`| Boolean |`false`| Enable the capture of Logback markers as attributes. |
101
101
|`captureKeyValuePairAttributes`| Boolean |`false`| Enable the capture of Logback key value pairs as attributes. |
102
102
|`captureLoggerContext`| Boolean |`false`| Enable the capture of Logback logger context properties as attributes. |
103
+
|`captureArguments`| Boolean |`false`| Enable the capture of Logback logger arguments. |
103
104
|`captureMdcAttributes`| String || Comma separated list of MDC attributes to capture. Use the wildcard character `*` to capture all attributes. |
104
105
|`numLogsCapturedBeforeOtelInstall`| Integer | 1000 | Log telemetry is emitted after the initialization of the OpenTelemetry Logback appender with an OpenTelemetry object. This setting allows you to modify the size of the cache used to replay the first logs. thread.id attribute is not captured. |
Copy file name to clipboardExpand all lines: instrumentation/logback/logback-appender-1.0/library/src/main/java/io/opentelemetry/instrumentation/logback/appender/v1_0/OpenTelemetryAppender.java
+11
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ public class OpenTelemetryAppender extends UnsynchronizedAppenderBase<ILoggingEv
Copy file name to clipboardExpand all lines: instrumentation/logback/logback-appender-1.0/library/src/main/java/io/opentelemetry/instrumentation/logback/appender/v1_0/internal/LoggingEventMapper.java
+34-5
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,11 @@
24
24
importjava.io.PrintWriter;
25
25
importjava.io.StringWriter;
26
26
importjava.util.ArrayList;
27
+
importjava.util.Arrays;
27
28
importjava.util.List;
28
29
importjava.util.Map;
29
30
importjava.util.concurrent.TimeUnit;
31
+
importjava.util.stream.Collectors;
30
32
importorg.slf4j.Marker;
31
33
importorg.slf4j.event.KeyValuePair;
32
34
@@ -53,6 +55,10 @@ public final class LoggingEventMapper {
Copy file name to clipboardExpand all lines: instrumentation/logback/logback-appender-1.0/library/src/slf4j2ApiTest/java/io/opentelemetry/instrumentation/logback/appender/v1_0/Slf4j2Test.java
+39
Original file line number
Diff line number
Diff line change
@@ -112,4 +112,43 @@ void multipleMarkers() {
112
112
AttributeKey.stringArrayKey("logback.marker"),
113
113
value -> assertThat(value).isEqualTo(Arrays.asList(markerName1, markerName2)));
114
114
}
115
+
116
+
@Test
117
+
voidarguments() {
118
+
logger
119
+
.atInfo()
120
+
.setMessage("log message {} and {}, bool {}, long {}")
0 commit comments