Skip to content

Commit 6e1f521

Browse files
aws-application-signals-botgithub-actionsviw-test1
authored
Nightly dependency update: OpenTelemetry 2.28.1/1.57.0 (#1378)
Automated update of OpenTelemetry dependencies. **Build Status:** ❌ [failure](https://github.com/aws-observability/aws-otel-java-instrumentation/actions/runs/26268891482) **Updated versions:** - [OpenTelemetry Java Instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.28.1): 2.28.1 - [OpenTelemetry Java Contrib](https://github.com/open-telemetry/opentelemetry-java-contrib/releases/tag/v1.57.0): 1.57.0 **Upstream releases with breaking changes:** Note: the mechanism to detect upstream breaking changes is not perfect. Be sure to check all new releases and understand if any additional changes need to be addressed. **opentelemetry-java-instrumentation:** - [Version 2.28.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.28.0) - [Version 2.27.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.27.0) --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: victor wang <viw@amazon.com>
1 parent 9c2d3ed commit 6e1f521

6 files changed

Lines changed: 50 additions & 39 deletions

File tree

.github/patches/opentelemetry-java-contrib.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -712,10 +712,10 @@ index 74967704..d08094f7 100644
712712
--- a/version.gradle.kts
713713
+++ b/version.gradle.kts
714714
@@ -1,5 +1,5 @@
715-
-val stableVersion = "1.54.0"
716-
-val alphaVersion = "1.54.0-alpha"
717-
+val stableVersion = "1.54.0-adot1"
718-
+val alphaVersion = "1.54.0-alpha-adot1"
715+
-val stableVersion = "1.57.0"
716+
-val alphaVersion = "1.57.0-alpha"
717+
+val stableVersion = "1.57.0-adot1"
718+
+val alphaVersion = "1.57.0-alpha-adot1"
719719
val tagVersion by extra { "v$stableVersion" }
720720

721721
allprojects {

.github/patches/versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
OTEL_JAVA_INSTRUMENTATION_VERSION=v2.26.1
2-
OTEL_JAVA_CONTRIB_VERSION=v1.54.0
1+
OTEL_JAVA_INSTRUMENTATION_VERSION=v2.28.1
2+
OTEL_JAVA_CONTRIB_VERSION=v1.57.0

dependencyManagement/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ data class DependencySet(val group: String, val version: String, val modules: Li
2727
val testSnapshots = rootProject.findProperty("testUpstreamSnapshots") == "true"
2828

2929
// This is the version of the upstream instrumentation BOM
30-
val otelVersion = "2.26.1"
31-
val otelSnapshotVersion = "2.27.0"
30+
val otelVersion = "2.28.1"
31+
val otelSnapshotVersion = "2.29.0"
3232
val otelAlphaVersion = if (!testSnapshots) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"
3333
val otelJavaAgentVersion = if (!testSnapshots) otelVersion else "$otelSnapshotVersion-SNAPSHOT"
3434
// All versions below are only used in testing and do not affect the released artifact.
@@ -75,8 +75,8 @@ val dependencyLists = listOf(
7575
"commons-logging:commons-logging:1.2",
7676
"com.sparkjava:spark-core:2.9.4",
7777
"com.squareup.okhttp3:okhttp:4.12.0",
78-
"io.opentelemetry.contrib:opentelemetry-aws-xray:1.54.0-adot1",
79-
"io.opentelemetry.contrib:opentelemetry-aws-resources:1.54.0-alpha",
78+
"io.opentelemetry.contrib:opentelemetry-aws-xray:1.57.0-adot1",
79+
"io.opentelemetry.contrib:opentelemetry-aws-resources:1.57.0-alpha",
8080
"io.opentelemetry.proto:opentelemetry-proto:1.0.0-alpha",
8181
"io.opentelemetry.javaagent:opentelemetry-javaagent:$otelJavaAgentVersion",
8282
"io.opentelemetry:opentelemetry-extension-aws:1.20.1",

lambda-layer/patches/aws-otel-java-instrumentation.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ index 6ca4ff5..97e211a 100644
66
val testSnapshots = rootProject.findProperty("testUpstreamSnapshots") == "true"
77

88
// This is the version of the upstream instrumentation BOM
9-
-val otelVersion = "2.26.1"
10-
+val otelVersion = "2.26.1-adot-lambda1"
11-
val otelSnapshotVersion = "2.27.0"
9+
-val otelVersion = "2.28.1"
10+
+val otelVersion = "2.28.1-adot-lambda1"
11+
val otelSnapshotVersion = "2.29.0"
1212
val otelAlphaVersion = if (!testSnapshots) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"
1313
val otelJavaAgentVersion = if (!testSnapshots) otelVersion else "$otelSnapshotVersion-SNAPSHOT"

lambda-layer/patches/opentelemetry-java-instrumentation.patch

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,16 @@ index 9341bf6f79..f719c1ea93 100644
108108
import java.util.Map;
109109
import javax.annotation.Nullable;
110110

111-
@@ -47,8 +46,8 @@ public class AwsLambdaFunctionInstrumenter {
111+
@@ -22,8 +21,6 @@ import javax.annotation.Nullable;
112+
*/
113+
public class AwsLambdaFunctionInstrumenter {
114+
115+
- private static final MapGetter mapGetter = new MapGetter();
116+
-
117+
private final OpenTelemetry openTelemetry;
118+
final Instrumenter<AwsLambdaRequest, Object> instrumenter;
119+
120+
@@ -49,8 +46,8 @@ public class AwsLambdaFunctionInstrumenter {
112121
instrumenter.end(context, input, response, error);
113122
}
114123

@@ -119,36 +128,39 @@ index 9341bf6f79..f719c1ea93 100644
119128
// Look in both the http headers and the custom client context
120129
Map<String, String> headers = input.getHeaders();
121130
if (input.getAwsContext() != null && input.getAwsContext().getClientContext() != null) {
122-
@@ -59,23 +58,15 @@ public class AwsLambdaFunctionInstrumenter {
131+
@@ -61,26 +58,15 @@ public class AwsLambdaFunctionInstrumenter {
123132
}
124133
}
125134

126-
- return openTelemetry
127-
- .getPropagators()
128-
- .getTextMapPropagator()
129-
- .extract(Context.root(), headers, MapGetter.INSTANCE);
130135
+ return ParentContextExtractor.extract(headers, this, lambdaContext);
136+
+ }
137+
+
138+
+ public Context extract(Map<String, String> headers, TextMapGetter<Map<String, String>> getter) {
139+
+ ContextPropagationDebug.debugContextLeakIfEnabled();
140+
+
141+
return openTelemetry
142+
.getPropagators()
143+
.getTextMapPropagator()
144+
- .extract(Context.root(), headers, mapGetter);
145+
+ .extract(Context.root(), headers, getter);
131146
}
132-
133-
- private enum MapGetter implements TextMapGetter<Map<String, String>> {
134-
- INSTANCE;
147+
-
148+
- private static class MapGetter implements TextMapGetter<Map<String, String>> {
135149
-
136150
- @Override
137151
- public Iterable<String> keys(Map<String, String> map) {
138152
- return map.keySet();
139153
- }
140-
+ public Context extract(Map<String, String> headers, TextMapGetter<Map<String, String>> getter) {
141-
+ ContextPropagationDebug.debugContextLeakIfEnabled();
142-
154+
-
143155
- @Override
144-
- public String get(Map<String, String> map, String s) {
156+
- @Nullable
157+
- public String get(@Nullable Map<String, String> map, String s) {
158+
- if (map == null) {
159+
- return null;
160+
- }
145161
- return map.get(s.toLowerCase(Locale.ROOT));
146162
- }
147-
+ return openTelemetry
148-
+ .getPropagators()
149-
+ .getTextMapPropagator()
150-
+ .extract(Context.root(), headers, getter);
151-
}
163+
- }
152164
}
153165
diff --git a/instrumentation/aws-lambda/aws-lambda-core-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambdacore/v1_0/internal/ParentContextExtractor.java b/instrumentation/aws-lambda/aws-lambda-core-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambdacore/v1_0/internal/ParentContextExtractor.java
154166
new file mode 100644
@@ -678,10 +690,10 @@ index a46c2d24de..71a2264042 100644
678690
--- a/version.gradle.kts
679691
+++ b/version.gradle.kts
680692
@@ -1,5 +1,5 @@
681-
-val stableVersion = "2.26.1"
682-
-val alphaVersion = "2.26.1-alpha"
683-
+val stableVersion = "2.26.1-adot-lambda1"
684-
+val alphaVersion = "2.26.1-adot-lambda1-alpha"
693+
-val stableVersion = "2.28.1"
694+
-val alphaVersion = "2.28.1-alpha"
695+
+val stableVersion = "2.28.1-adot-lambda1"
696+
+val alphaVersion = "2.28.1-adot-lambda1-alpha"
685697

686698
allprojects {
687699
if (findProperty("otel.stable") != "true") {

scripts/update_dependencies.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ def update_file_dependencies(file_path, otel_instrumentation_version, otel_contr
1616

1717
# Update otelVersion variable
1818
otel_version_pattern = r'val otelVersion = "[^"]*"'
19-
otel_version_with_suffix = f"{otel_instrumentation_version}-adot1"
20-
otel_version_replacement = f'val otelVersion = "{otel_version_with_suffix}"'
19+
otel_version_replacement = f'val otelVersion = "{otel_instrumentation_version}"'
2120
if re.search(otel_version_pattern, content):
2221
new_content = re.sub(otel_version_pattern, otel_version_replacement, content)
2322
if new_content != content:
2423
content = new_content
2524
updated = True
26-
print(f"Updated otelVersion to {otel_version_with_suffix}")
25+
print(f"Updated otelVersion to {otel_instrumentation_version}")
2726

2827
# Update otelSnapshotVersion (typically next minor version)
2928
version_parts = otel_instrumentation_version.split(".")
@@ -112,7 +111,7 @@ def main():
112111
any_updated = True
113112

114113
if any_updated:
115-
print(f"Dependencies updated to Instrumentation {otel_instrumentation_version}-adot1 / Contrib {otel_contrib_version} (with appropriate suffixes)")
114+
print(f"Dependencies updated to Instrumentation {otel_instrumentation_version} / Contrib {otel_contrib_version} (with appropriate suffixes)")
116115
else:
117116
print("No OpenTelemetry dependencies found to update")
118117

0 commit comments

Comments
 (0)