Skip to content

Commit 5166d3f

Browse files
committed
Merge branch 'main' of github.com:open-telemetry/opentelemetry-java-contrib into jmx-test-config-sources
2 parents d19f761 + 80adbe1 commit 5166d3f

File tree

95 files changed

+513
-3160
lines changed

Some content is hidden

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

95 files changed

+513
-3160
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ body:
2828
- resource-providers
2929
- runtime-attach
3030
- samplers
31-
- static-instrumenter
3231
- type: textarea
3332
attributes:
3433
label: What happened?

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ body:
2828
- resource-providers
2929
- runtime-attach
3030
- samplers
31-
- static-instrumenter
3231
- type: textarea
3332
attributes:
3433
label: Is your feature request related to a problem? Please describe.

.github/component_owners.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ components:
2525
baggage-processor:
2626
- mikegoldsmith
2727
- zeitlinger
28+
cloudfoundry-resources:
29+
- KarstenSchnitter
2830
compressors:
2931
- jack-berg
3032
consistent-sampling:
@@ -74,8 +76,6 @@ components:
7476
samplers:
7577
- trask
7678
- jack-berg
77-
static-instrumenter:
78-
- anosek-an
7979
kafka-exporter:
8080
- spockz
8181
- vincentfree

.github/scripts/draft-change-log-entries.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ component_names["aws-xray/"]="AWS X-Ray SDK support"
2929
component_names["aws-xray-propagator/"]="AWS X-Ray propagator"
3030
component_names["azure-resources/"]="Azure resources"
3131
component_names["baggage-processor/"]="Baggage processor"
32+
component_names["cloudfoundry-resources/"]="CloudFoundry resources"
3233
component_names["compressors/"]="Compressors"
3334
component_names["consistent-sampling/"]="Consistent sampling"
3435
component_names["disk-buffering/"]="Disk buffering"
@@ -49,7 +50,6 @@ component_names["runtime-attach/"]="Runtime attach"
4950
component_names["resource-providers/"]="Resource providers"
5051
component_names["samplers/"]="Samplers"
5152
component_names["span-stacktrace/"]="Span stack traces"
52-
component_names["static-instrumenter/"]="Static instrumenter"
5353

5454
echo "## Unreleased"
5555
echo

CHANGELOG.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,78 @@
22

33
## Unreleased
44

5+
## Version 1.44.0 (2025-02-21)
6+
7+
### AWS resources
8+
9+
- Changed resource attribute `container.image.tag` to `container.image.tags`
10+
([#1736](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1736))
11+
12+
### AWS X-Ray propagator
13+
14+
- Make `xray-lambda` propagator available via SPI
15+
([#1669](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1669))
16+
- Support Lineage in XRay trace header and remove additional baggage from being added
17+
([#1671](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1671))
18+
19+
### CloudFoundry resources - New 🌟
20+
21+
CloudFoundry resource detector.
22+
23+
### Disk buffering
24+
25+
- Use delegate's temporality
26+
([#1672](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1672))
27+
28+
### GCP authentication extension
29+
30+
- Publish both shaded and unshaded variants
31+
([#1688](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1688))
32+
33+
### JMX metrics
34+
35+
- Updated Hadoop metric unit definitions to align with semantic conventions
36+
([#1675](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1675))
37+
- Updated Kafka metric unit definitions to align with semantic conventions
38+
([#1670](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1670))
39+
40+
### JMX scraper
41+
42+
- Use SDK autoconfigure module
43+
([#1651](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1651))
44+
- Rename `otel.jmx.custom.scraping.config` to `otel.jmx.config` in order to align
45+
with `io.opentelemetry.instrumentation:opentelemetry-jmx-metrics`
46+
([#1678](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1678))
47+
- Hadoop metrics added
48+
([#1675](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1675))
49+
- Add a CLI option to test the connection
50+
([#1684](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1684))
51+
- Kafka server, producer, and consumer metrics added
52+
([#1670](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1670))
53+
- Add custom YAML support
54+
([#1741](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1741))
55+
- Add SSL support
56+
([#1710](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1710))
57+
- Replicate JMXMP/SASL config from the JMX metrics module
58+
([#1749](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1749))
59+
60+
### Maven extension
61+
62+
- Support Maven 4.0
63+
([#1679](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1679))
64+
65+
### Processors
66+
67+
- Changed `EventToSpanEventBridge` from reading `event.name` to reading the new LogRecord
68+
[EventName](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-eventname)
69+
field.
70+
([#1736](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1736))
71+
72+
### Static instrumenter
73+
74+
- Module has been removed
75+
([#1755](https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1755))
76+
577
## Version 1.43.0 (2025-01-17)
678

779
### Azure resources - New 🌟

CONTRIBUTING.md

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
1-
## Contributing
1+
# Contributing
22

3-
Pull requests for bug fixes are always welcome!
3+
Welcome to the OpenTelemetry Java Contrib Repository!
4+
5+
## Introduction
6+
7+
This repository focuses on providing tools and utilities for Java-based observability, such as remote JMX metric gathering and reporting. We’re excited to have you here! Whether you’re fixing a bug, adding a feature, or suggesting an idea, your contributions are invaluable.
48

59
Before submitting new features or changes to current functionality, it is recommended to first
610
[open an issue](https://github.com/open-telemetry/opentelemetry-java-contrib/issues/new)
711
and discuss your ideas or propose the changes you wish to make.
812

9-
### Building
13+
Questions? Ask in the OpenTelemetry [java channel](https://cloud-native.slack.com/archives/C014L2KCTE3)
14+
15+
Pull requests for bug fixes are always welcome!
16+
17+
## Pre-requisites
18+
19+
To work with this repository, ensure you have:
20+
21+
### Tools:
22+
23+
Java 17 or higher
24+
25+
### Platform Notes:
26+
27+
macOS/Linux: Ensure JAVA_HOME is set correctly.
28+
29+
## Workflow
30+
31+
1. Fork the repository
32+
2. Clone locally
33+
3. Create a branch before working on an issue
34+
35+
## Local Run/Build
1036

1137
In order to build and test this whole repository you need JDK 11+.
1238

@@ -22,21 +48,35 @@ the Sonatype OSS snapshots repository at `https://oss.sonatype.org/content/repos
2248
Building using Java 11+:
2349

2450
```bash
25-
java -version
51+
$ java -version
52+
```
53+
54+
```bash
55+
$ ./gradlew assemble
2656
```
2757

58+
## Testing
59+
2860
```bash
29-
./gradlew assemble
61+
$ ./gradlew test
3062
```
3163

32-
### Style guide
64+
### Some modules have integration tests
3365

34-
See
35-
the [Style guide](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/style-guideline.md)
36-
from the opentelemetry-java-instrumentation repository.
66+
```
67+
$ ./gradlew integrationTest
68+
```
69+
70+
Follow the Java Instrumentation [Style Guide](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/style-guideline.md) from the opentelemetry-java-instrumentation repository.
3771

38-
### Gradle conventions
72+
Failure? Check logs for errors or mismatched dependencies.
73+
74+
## Gradle conventions
3975

4076
- Use kotlin instead of groovy
4177
- Plugin versions should be specified in `settings.gradle.kts`, not in individual modules
4278
- All modules use `plugins { id("otel.java-conventions") }`
79+
80+
## Further Help
81+
82+
Join [#otel-java](https://cloud-native.slack.com/archives/C014L2KCTE3) on OpenTelemetry Slack

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ feature or via instrumentation, this project is hopefully for you.
4040
| alpha | [Runtime Attach](./runtime-attach/README.md) |
4141
| alpha | [Samplers](./samplers/README.md) |
4242
| beta | [Span Stacktrace Capture](./span-stacktrace/README.md) |
43-
| alpha | [Static Instrumenter](./static-instrumenter/README.md) |
4443

4544
\* `alpha`, `beta` and `stable` are currently used to denote library status per [otep 0232](https://github.com/open-telemetry/oteps/blob/main/text/0232-maturity-of-otel.md).
4645
To reach stable status, the library needs to have stable APIs, stable semantic conventions, and be production ready.

aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource/EcsResource.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,8 @@ static void parseResponse(
192192
DockerImage parsedImage = DockerImage.parse(value);
193193
if (parsedImage != null) {
194194
attrBuilders.put(CONTAINER_IMAGE_NAME, parsedImage.getRepository());
195-
// TODO: CONTAINER_IMAGE_TAG has been replaced with CONTAINER_IMAGE_TAGS
196195
attrBuilders.put(
197-
io.opentelemetry.semconv.ResourceAttributes.CONTAINER_IMAGE_TAG,
196+
io.opentelemetry.contrib.aws.resource.IncubatingAttributes.CONTAINER_IMAGE_TAGS,
198197
parsedImage.getTag());
199198
}
200199
break;

aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource/IncubatingAttributes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ private IncubatingAttributes() {}
2626
public static final AttributeKey<String> CLOUD_REGION = AttributeKey.stringKey("cloud.region");
2727
public static final AttributeKey<String> CLOUD_RESOURCE_ID =
2828
AttributeKey.stringKey("cloud.resource_id");
29+
public static final AttributeKey<List<String>> CONTAINER_IMAGE_TAGS =
30+
AttributeKey.stringArrayKey("container.image.tags");
2931

3032
public static final class CloudPlatformIncubatingValues {
3133
public static final String AWS_EC2 = "aws_ec2";

aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/EcsResourceTest.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
import static io.opentelemetry.semconv.incubating.CloudIncubatingAttributes.CLOUD_RESOURCE_ID;
2525
import static io.opentelemetry.semconv.incubating.ContainerIncubatingAttributes.CONTAINER_ID;
2626
import static io.opentelemetry.semconv.incubating.ContainerIncubatingAttributes.CONTAINER_IMAGE_NAME;
27+
import static io.opentelemetry.semconv.incubating.ContainerIncubatingAttributes.CONTAINER_IMAGE_TAGS;
2728
import static io.opentelemetry.semconv.incubating.ContainerIncubatingAttributes.CONTAINER_NAME;
29+
import static java.util.Collections.singletonList;
2830
import static org.assertj.core.api.Assertions.entry;
2931
import static org.mockito.Mockito.when;
3032

@@ -52,8 +54,6 @@ class EcsResourceTest {
5254

5355
@Mock private SimpleHttpClient mockHttpClient;
5456

55-
// Suppression is required for CONTAINER_IMAGE_TAG until we are ready to upgrade.
56-
@SuppressWarnings("deprecation")
5757
@Test
5858
void testCreateAttributesV3() throws IOException {
5959
Map<String, String> mockSysEnv = new HashMap<>();
@@ -78,7 +78,7 @@ void testCreateAttributesV3() throws IOException {
7878
entry(CONTAINER_NAME, "ecs-nginx-5-nginx-curl-ccccb9f49db0dfe0d901"),
7979
entry(CONTAINER_ID, "43481a6ce4842eec8fe72fc28500c6b52edcc0917f105b83379f88cac1ff3946"),
8080
entry(CONTAINER_IMAGE_NAME, "nrdlngr/nginx-curl"),
81-
entry(io.opentelemetry.semconv.ResourceAttributes.CONTAINER_IMAGE_TAG, "latest"),
81+
entry(CONTAINER_IMAGE_TAGS, singletonList("latest")),
8282
entry(AWS_ECS_CLUSTER_ARN, "arn:aws:ecs:us-east-2:012345678910:cluster/default"),
8383
entry(
8484
AttributeKey.stringKey("aws.ecs.container.image.id"),
@@ -90,8 +90,6 @@ void testCreateAttributesV3() throws IOException {
9090
entry(AWS_ECS_TASK_REVISION, "5"));
9191
}
9292

93-
// Suppression is required for CONTAINER_IMAGE_TAG until we are ready to upgrade.
94-
@SuppressWarnings("deprecation")
9593
@Test
9694
void testCreateAttributesV4() throws IOException {
9795
Map<String, String> mockSysEnv = new HashMap<>();
@@ -119,25 +117,22 @@ void testCreateAttributesV4() throws IOException {
119117
entry(CONTAINER_NAME, "ecs-curltest-26-curl-cca48e8dcadd97805600"),
120118
entry(CONTAINER_ID, "ea32192c8553fbff06c9340478a2ff089b2bb5646fb718b4ee206641c9086d66"),
121119
entry(CONTAINER_IMAGE_NAME, "111122223333.dkr.ecr.us-west-2.amazonaws.com/curltest"),
122-
entry(io.opentelemetry.semconv.ResourceAttributes.CONTAINER_IMAGE_TAG, "latest"),
120+
entry(CONTAINER_IMAGE_TAGS, singletonList("latest")),
123121
entry(
124122
AttributeKey.stringKey("aws.ecs.container.image.id"),
125123
"sha256:d691691e9652791a60114e67b365688d20d19940dde7c4736ea30e660d8d3553"),
126124
entry(AWS_ECS_CLUSTER_ARN, "arn:aws:ecs:us-west-2:111122223333:cluster/default"),
127125
entry(
128126
AWS_ECS_CONTAINER_ARN,
129127
"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9"),
130-
entry(AWS_LOG_GROUP_NAMES, Collections.singletonList("/ecs/metadata")),
128+
entry(AWS_LOG_GROUP_NAMES, singletonList("/ecs/metadata")),
131129
entry(
132130
AWS_LOG_GROUP_ARNS,
133-
Collections.singletonList(
134-
"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata")),
135-
entry(
136-
AWS_LOG_STREAM_NAMES,
137-
Collections.singletonList("ecs/curl/8f03e41243824aea923aca126495f665")),
131+
singletonList("arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata")),
132+
entry(AWS_LOG_STREAM_NAMES, singletonList("ecs/curl/8f03e41243824aea923aca126495f665")),
138133
entry(
139134
AWS_LOG_STREAM_ARNS,
140-
Collections.singletonList(
135+
singletonList(
141136
"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:log-stream:ecs/curl/8f03e41243824aea923aca126495f665")),
142137
entry(
143138
AWS_ECS_TASK_ARN,

0 commit comments

Comments
 (0)