Skip to content

Commit b1704cc

Browse files
authored
Merge branch 'main' into remove-deprecated-prop
2 parents bbf9b04 + 9a274e8 commit b1704cc

95 files changed

Lines changed: 212 additions & 461 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/agents/knowledge/config-property-stability.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ must be communicated through:
6767
(`otel.instrumentation.…`) since that is what most users configure today:
6868

6969
```java
70-
boolean captureEventName = config.getBoolean("capture_event_name/development", false);
71-
if (captureEventName) {
70+
boolean oldSetting = config.getBoolean("old_setting/development", false);
71+
if (oldSetting) {
7272
logger.warning(
73-
"The otel.instrumentation.logback-appender.experimental.capture-event-name setting is"
73+
"The otel.instrumentation.<module>.experimental.old-setting setting is"
7474
+ " deprecated and will be removed in a future version.");
7575
}
7676
```

.github/scripts/code-review/build-review-matrix.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def parse_modules() -> list[tuple[str, str]]:
3939
pairs = []
4040
for entry in sorted(raw):
4141
parts = entry.split(":")
42+
# Skip shared/helper modules (e.g. "cdi-testing") that don't follow the
43+
# <library>:<variant> layout used for real instrumentation modules.
44+
if len(parts) < 2:
45+
continue
4246
module_dir = "instrumentation/" + "/".join(parts)
4347
# Gradle module name: second-to-last:last
4448
gradle_name = f"{parts[-2]}:{parts[-1]}"

.github/workflows/build-pull-request.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ on:
1010
workflow_call:
1111

1212
concurrency:
13-
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
# fixed group name (not github.workflow) so that runs triggered by pull_request
14+
# and runs triggered via workflow_call from rebuild-pull-request-on-label.yml
15+
# share the group, otherwise the PR build would run twice in parallel whenever
16+
# a "test *" label is added
17+
group: build-pull-request-${{ github.event.pull_request.number }}
1418
cancel-in-progress: true
1519

1620
permissions:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
- Removed previously deprecated experimental config property
2323
`otel.instrumentation.servlet.experimental.add-trace-id-request-attribute`; use
2424
`otel.instrumentation.servlet.experimental.trace-id-request-attribute.enabled` instead.
25+
- Removed the previously deprecated `captureEventName` library builder setting from the
26+
logback-appender-1.0 and log4j-appender-2.17 `OpenTelemetryAppender`, and the corresponding
27+
`otel.instrumentation.{logback-appender,log4j-appender,jboss-logmanager}.experimental.capture-event-name`
28+
javaagent properties. Use the `otel.event.name` key in MDC / context data / key-value pairs /
29+
Logstash markers / structured arguments instead.
2530

2631
## Version 2.27.0 (2026-04-21)
2732

instrumentation/gwt-2.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/gwt/v2_0/GwtTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void setup() throws Exception {
8080
Testcontainers.exposeHostPorts(port);
8181

8282
browser =
83-
new BrowserWebDriverContainer("selenium/standalone-chrome")
83+
new BrowserWebDriverContainer("selenium/standalone-chrome:4.43.0")
8484
.withLogConsumer(new Slf4jLogConsumer(logger));
8585
cleanup.deferAfterAll(browser::stop);
8686
browser.start();

instrumentation/jboss-logmanager/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
|-----------------------------------------------------------------------------|---------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------|
55
| `otel.instrumentation.jboss-logmanager.experimental-log-attributes` | Boolean | `false` | Enable the capture of experimental log attributes `thread.name` and `thread.id`. |
66
| `otel.instrumentation.jboss-logmanager.experimental.capture-mdc-attributes` | String | | Comma separated list of MDC attributes to capture. Use the wildcard character `*` to capture all attributes. |
7-
| `otel.instrumentation.jboss-logmanager.experimental.capture-event-name` | Boolean | `false` | **Deprecated.** Enable moving the `event.name` attribute (captured by one of the other mechanisms of capturing attributes) to the log event name. |
87

98
The `otel.event.name` key is supported in MDC entries. When present, its value is used as the log event name and is not emitted as an attribute.

instrumentation/jboss-logmanager/jboss-logmanager-appender-1.1/javaagent/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ if (otelProps.testLatestDeps) {
2929
tasks.withType<Test>().configureEach {
3030
// TODO run tests both with and without experimental log attributes
3131
jvmArgs("-Dotel.instrumentation.jboss-logmanager.experimental.capture-mdc-attributes=*")
32-
jvmArgs("-Dotel.instrumentation.jboss-logmanager.experimental.capture-event-name=true")
3332
jvmArgs("-Dotel.instrumentation.jboss-logmanager.experimental-log-attributes=true")
3433
jvmArgs("-Dotel.instrumentation.java-util-logging.experimental-log-attributes=true")
3534
}

instrumentation/jboss-logmanager/jboss-logmanager-appender-1.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jbosslogmanager/appender/v1_1/LoggingEventMapper.java

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,10 @@
2828

2929
public class LoggingEventMapper {
3030

31-
private static final java.util.logging.Logger logger =
32-
java.util.logging.Logger.getLogger(LoggingEventMapper.class.getName());
33-
3431
public static final LoggingEventMapper INSTANCE = new LoggingEventMapper();
3532

3633
private static final Cache<String, AttributeKey<String>> mdcAttributeKeys = Cache.bounded(100);
3734

38-
// copied from EventIncubatingAttributes
39-
private static final AttributeKey<String> EVENT_NAME = AttributeKey.stringKey("event.name");
40-
4135
private final List<AttributeKey<String>> captureMdcAttributeKeys;
4236

4337
private static final boolean captureExperimentalAttributes =
@@ -47,10 +41,6 @@ public class LoggingEventMapper {
4741
// cached as an optimization
4842
private final boolean captureAllMdcAttributes;
4943

50-
private final boolean captureEventName =
51-
DeclarativeConfigUtil.getInstrumentationConfig(GlobalOpenTelemetry.get(), "jboss_logmanager")
52-
.getBoolean("capture_event_name/development", false);
53-
5444
private LoggingEventMapper() {
5545
List<String> captureMdcAttributes =
5646
DeclarativeConfigUtil.getInstrumentationConfig(
@@ -63,18 +53,12 @@ private LoggingEventMapper() {
6353
} else {
6454
List<AttributeKey<String>> keys = new ArrayList<>(captureMdcAttributes.size());
6555
for (String key : captureMdcAttributes) {
66-
if (!OTEL_EVENT_NAME.getKey().equals(key)
67-
&& !(captureEventName && EVENT_NAME.getKey().equals(key))) {
56+
if (!OTEL_EVENT_NAME.getKey().equals(key)) {
6857
keys.add(getMdcAttributeKey(key));
6958
}
7059
}
7160
this.captureMdcAttributeKeys = keys;
7261
}
73-
if (captureEventName) {
74-
logger.warning(
75-
"The otel.instrumentation.jboss-logmanager.experimental.capture-event-name setting is"
76-
+ " deprecated and will be removed in a future version.");
77-
}
7862
}
7963

8064
public void capture(Logger logger, ExtLogRecord record) {
@@ -126,22 +110,15 @@ private void captureMdcAttributes(LogRecordBuilder builder) {
126110
return;
127111
}
128112

129-
// otel.event.name takes priority over event.name
130113
String otelEventName = context.get(OTEL_EVENT_NAME.getKey());
131114
if (otelEventName != null) {
132115
builder.setEventName(otelEventName);
133-
} else if (captureEventName) {
134-
String eventName = context.get(EVENT_NAME.getKey());
135-
if (eventName != null) {
136-
builder.setEventName(eventName);
137-
}
138116
}
139117

140118
if (captureAllMdcAttributes) {
141119
for (Map.Entry<String, String> entry : context.entrySet()) {
142120
String key = entry.getKey();
143-
if (!OTEL_EVENT_NAME.getKey().equals(key)
144-
&& !(captureEventName && EVENT_NAME.getKey().equals(key))) {
121+
if (!OTEL_EVENT_NAME.getKey().equals(key)) {
145122
builder.setAttribute(getMdcAttributeKey(key), entry.getValue());
146123
}
147124
}

instrumentation/jboss-logmanager/jboss-logmanager-appender-1.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jbosslogmanager/appender/v1_1/JbossLogmanagerTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
import org.jboss.logmanager.LogContext;
3232
import org.jboss.logmanager.Logger;
3333
import org.jboss.logmanager.MDC;
34+
import org.junit.jupiter.api.Test;
3435
import org.junit.jupiter.api.extension.RegisterExtension;
3536
import org.junit.jupiter.params.ParameterizedTest;
3637
import org.junit.jupiter.params.provider.Arguments;
3738
import org.junit.jupiter.params.provider.MethodSource;
38-
import org.junit.jupiter.params.provider.ValueSource;
3939

4040
class JbossLogmanagerTest {
4141

@@ -193,18 +193,17 @@ private static void performLogging(
193193
}
194194
}
195195

196-
@ParameterizedTest
197-
@ValueSource(strings = {"event.name", "otel.event.name"})
198-
void testMdc(String eventNameProperty) {
196+
@Test
197+
void testMdc() {
199198
MDC.put("key1", "val1");
200199
MDC.put("key2", "val2");
201-
MDC.put(eventNameProperty, "MyEventName");
200+
MDC.put("otel.event.name", "MyEventName");
202201
try {
203202
logger.info("xyz");
204203
} finally {
205204
MDC.remove("key1");
206205
MDC.remove("key2");
207-
MDC.remove(eventNameProperty);
206+
MDC.remove("otel.event.name");
208207
}
209208

210209
testing.waitAndAssertLogRecords(

instrumentation/jboss-logmanager/jboss-logmanager-appender-1.1/metadata.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,3 @@ configurations:
2121
examples:
2222
- "custom-mdc-key"
2323
- "key1,key2,key3"
24-
- name: otel.instrumentation.jboss-logmanager.experimental.capture-event-name
25-
declarative_name: java.jboss_logmanager.capture_event_name/development
26-
description: >
27-
Enables the capture of the event name from the MDC attribute "event.name" and sets it as the
28-
log record's event name.
29-
type: boolean
30-
default: false

0 commit comments

Comments
 (0)