Skip to content

Commit db0a3cb

Browse files
eamonn-kearns-ibmotelbot[bot]jack-bergtrask
authored andcommitted
Ekearns/insta 80320/odins ingest (open-telemetry#9)
* [release/v1.60.x] Prepare release 1.60.0 (open-telemetry#8151) Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> * Add changelog entry for open-telemetry#8152 to 1.60.x release branch (open-telemetry#8154) * [release/v1.60.x] Change GlobUtil, IncludeExcludePredicate to use case sensitive matching consistently (open-telemetry#8155) Co-authored-by: Jack Berg <34418638+jack-berg@users.noreply.github.com> * [release/v1.60.x] Fix warning always emitted (open-telemetry#8158) Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> * Prepare changelog for 1.60.1 (open-telemetry#8160) * [release/v1.60.x] Prepare release 1.60.1 (open-telemetry#8161) Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> * initial commit * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: otelbot[bot] <197425009+otelbot[bot]@users.noreply.github.com> Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> Co-authored-by: Jack Berg <34418638+jack-berg@users.noreply.github.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
1 parent 9692c2b commit db0a3cb

File tree

13 files changed

+793
-1
lines changed

13 files changed

+793
-1
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Changelog
22

3-
## Unreleased
3+
## Version 1.60.1 (2026-03-07)
4+
5+
### SDK
6+
7+
#### Extensions
8+
9+
* Autoconfigure: fix warning always emitted
10+
([#8157](https://github.com/open-telemetry/opentelemetry-java/pull/8157))
11+
12+
## Version 1.60.0 (2026-03-06)
413

514
### SDK
615

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# OtelDockerImageNameSubstitutor
2+
3+
This class arises from the need to import Docker Images as part of the OpenTelemetry build process, and the need to map all dockerhub and ghcr images to a single namespace under IBM control.
4+
5+
## Building
6+
`./gradlew build` will build the class. The system variables `TAAS_ARTIFACTORY_USERNAME`, `TAAS_ARTIFACTORY_PASSWORD`, and `TAAS_DEPENDENCIES_URL` must either be found in the environment or defined in a local.properties file. local.properties has an entry in .gitignore to prevent secrets being published to a repository.
7+
8+
9+
## Namespace
10+
com.ibm.instana.otel.testcontainer
11+
12+
## Source path
13+
File paths follow Maven/Gradle convention. So the class file can be found in [lib/src/main/java/com/ibm/instana/otel/testcontainer/OtelImageNameSubstitutor.java](lib/src/main/java/com/ibm/instana/otel/testcontainer/OtelImageNameSubstitutor.java) and the Unit Tests can be found in [lib/src/test/java/com/ibm/instana/otel/testcontainer/OtelImageNameSubstitutorTest.java](lib/src/test/java/com/ibm/instana/otel/testcontainer/OtelImageNameSubstitutorTest.java)
14+
15+
## Environment variable
16+
17+
It requires an environment variable INTERNAL_REGISTRY to have been set which it binds to a `final` class property `internalRegistry`. Setting this to an empty string will cause an IllegalStateException to be thrown. If this field has a trailing / an IllegalStateException will be thrown. The value defaults to `us.icr.io/instana-tracer-otel`
18+
19+
20+
## Behaviour
21+
22+
This class leverages TestContainer's DockerImageName class to rewrite the coordinates of any images passed through it as part of the testcontainer lifecycle. The class will flatten the image, that is: the apply method removes the repository part of the Image's coordinate and returns a new coordinate in the form {internalRegistry}/{repository}:{version}. If no version is provided, the underlying DockerImageName class will provide latest, so the following behaviours will happen. As a projection of requirements, sha is removed. Since the sha may well be an index sha (which we know it is in the case of open telemetry's collector contrib, from investigating it) we cannot guarantee that it will match. As such, a design decision was made that we drop the sha.
23+
24+
This code, extracted from the runSubstitutorAgainstBatch Unit Test, shows a fairly comprehensive set of rewrite behaviours
25+
26+
```java
27+
class Substitution {
28+
public String original;
29+
public String replacement;
30+
31+
public Substitution(String original, String replacement) {
32+
this.original = original.trim();
33+
this.replacement = replacement.trim();
34+
}
35+
}
36+
37+
List<Substitution> imagesToTest = Arrays.asList(
38+
new Substitution(
39+
"a",
40+
"icr.io/instana/a:latest"
41+
),
42+
new Substitution(
43+
"b:1.76",
44+
"icr.io/instana/b:1.76"
45+
),
46+
new Substitution(
47+
"package/c",
48+
"icr.io/instana/package/c:latest"
49+
),
50+
new Substitution(
51+
"package/c:1.74",
52+
"icr.io/instana/package/c:1.74"
53+
),
54+
new Substitution(
55+
"someHost.url/package/d",
56+
"icr.io/instana/package/d:latest"
57+
),
58+
new Substitution(
59+
"someHost.url/package/d:7.2",
60+
"icr.io/instana/package/d:7.2"
61+
),
62+
new Substitution(
63+
"someHost.url:5000/package/e",
64+
"icr.io/instana/package/e:latest"
65+
),
66+
new Substitution(
67+
"someHost.url:5000/package/e:1.5",
68+
"icr.io/instana/package/e:1.5"
69+
),
70+
new Substitution(
71+
"otel/opentelemetry-collector-contrib:0.147.0@sha256:e7c92c715f28ff142f3bcaccd4fc5603cf4c71276ef09954a38eb4038500a5a5",
72+
"icr.io/instana/otel/opentelemetry-collector-contrib:0.147.0"
73+
),
74+
new Substitution(
75+
"somehost.url/otel/opentelemetry-collector-contrib:0.147.0@sha256:e7c92c715f28ff142f3bcaccd4fc5603cf4c71276ef09954a38eb4038500a5a5",
76+
"icr.io/instana/otel/opentelemetry-collector-contrib:0.147.0"
77+
),
78+
new Substitution(
79+
"somehost.url:1293/otel/opentelemetry-collector-contrib:0.147.0@sha256:e7c92c715f28ff142f3bcaccd4fc5603cf4c71276ef09954a38eb4038500a5a5",
80+
"icr.io/instana/otel/opentelemetry-collector-contrib:0.147.0"
81+
)
82+
);
83+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
3+
4+
org.gradle.configuration-cache=true
5+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/version_catalogs.html#sec::toml-dependencies-format
3+
4+
[versions]
5+
commons-math3 = "3.6.1"
6+
guava = "33.4.6-jre"
7+
junit = "4.13.2"
8+
9+
[libraries]
10+
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }
11+
guava = { module = "com.google.guava:guava", version.ref = "guava" }
12+
junit = { module = "junit:junit", version.ref = "junit" }
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

instana/OtelDockerImageNameSubstitutor/gradlew

Lines changed: 248 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)