Skip to content

Commit

Permalink
Merge branch 'main' into brave-6
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored Jan 12, 2024
2 parents eefb718 + 208118a commit 6a0d950
Show file tree
Hide file tree
Showing 90 changed files with 1,997 additions and 3,932 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ jobs:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
# TODO(jack-berg): Which versions do we need to test? Should we use a matrix scheme?
java-version: '21'
distribution: 'graalvm'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Running test
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
gu --version
native-image --version
./gradlew nativeTest
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

## Version 1.34.1 (2024-01-11)

* Fix prometheus exporter regressions
([#6138](https://github.com/open-telemetry/opentelemetry-java/pull/6138))
* Fix native image regression
([#6134](https://github.com/open-telemetry/opentelemetry-java/pull/6134))

## Version 1.34.0 (2024-01-05)

**NOTE:** This is the LAST release for `opentelemetry-exporter-jaeger`
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,6 @@ dependency as follows, replacing `{{artifact-id}}` with the value from the "Arti
| [OTLP Exporters](./exporters/otlp/all) | OTLP gRPC & HTTP exporters, including traces, metrics, and logs | `opentelemetry-exporter-otlp` | <!--VERSION_STABLE-->1.34.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-otlp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp) |
| [OTLP Logging Exporters](./exporters/logging-otlp) | Logging exporters in OTLP JSON encoding, including traces, metrics, and logs | `opentelemetry-exporter-logging-otlp` | <!--VERSION_STABLE-->1.34.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-logging-otlp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging-otlp) |
| [OTLP Common](./exporters/otlp/common) | Shared OTLP components (internal) | `opentelemetry-exporter-otlp-common` | <!--VERSION_STABLE-->1.34.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-otlp-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp-common) |
| [Jaeger gRPC Exporter](./exporters/jaeger) | Jaeger gRPC trace exporter (deprecated [1]) | `opentelemetry-exporter-jaeger` | <!--VERSION_STABLE-->1.34.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-jaeger.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-jaeger) |
| [Jaeger Thrift Exporter](./exporters/jaeger-thrift) | Jaeger thrift trace exporter (deprecated [1]) | `opentelemetry-exporter-jaeger-thift` | <!--VERSION_STABLE-->1.34.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-jaeger-thrift.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-jaeger-thrift) |
| [Logging Exporter](./exporters/logging) | Logging exporters, including metrics, traces, and logs | `opentelemetry-exporter-logging` | <!--VERSION_STABLE-->1.34.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-logging.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging) |
| [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | <!--VERSION_STABLE-->1.34.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-zipkin.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-zipkin) |
| [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | <!--VERSION_UNSTABLE-->1.34.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-prometheus.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-prometheus) |
Expand All @@ -275,13 +273,6 @@ dependency as follows, replacing `{{artifact-id}}` with the value from the "Arti
| [JDK Sender](./exporters/sender/okhttp) | Java 11+ native HttpClient implementation of HttpSender (internal) | `opentelemetry-exporter-sender-jdk` | <!--VERSION_UNSTABLE-->1.34.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-sender-jdk.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-jdk) | |
| [gRPC ManagedChannel Sender](./exporters/sender/grpc-managed-channel) | gRPC ManagedChannel implementation of GrpcSender (internal) | `opentelemetry-exporter-sender-grpc-managed-channel` | <!--VERSION_STABLE-->1.34.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-sender-grpc-managed-channel.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-grpc-managed-channel) | |

**[1]**: Jaeger now
has [native support for OTLP](https://opentelemetry.io/blog/2022/jaeger-native-otlp/) and jaeger
exporters are now deprecated. `opentelemetry-exporter-jaeger-thrift` will continue to be published
until 1.34.0 (January 2024) but no new PRs will be accepted except security related bugfixes. After
1.34.0, `io.opentelemetry:opentelemetry-bom` will reference the last published version, but no
additional versions will be published.

### SDK Extensions

| Component | Description | Artifact ID | Version | Javadoc |
Expand Down
3 changes: 0 additions & 3 deletions all/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ tasks.named<JacocoReport>("jacocoTestReport") {
// Exclude mrjar (jacoco complains), shaded, and generated code
!it.absolutePath.contains("META-INF/versions/") &&
!it.absolutePath.contains("/internal/shaded/") &&
!it.absolutePath.contains("io/opentelemetry/proto/") &&
!it.absolutePath.contains("io/opentelemetry/exporter/jaeger/proto/") &&
!it.absolutePath.contains("io/opentelemetry/exporter/jaeger/internal/protobuf/") &&
!it.absolutePath.contains("io/opentelemetry/sdk/extension/trace/jaeger/proto/") &&
!it.absolutePath.contains("AutoValue_")
},
Expand Down
2 changes: 2 additions & 0 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ otelBom.addFallback("opentelemetry-extension-annotations", "1.18.0")
otelBom.addFallback("opentelemetry-sdk-extension-resources", "1.19.0")
otelBom.addFallback("opentelemetry-sdk-extension-aws", "1.19.0")
otelBom.addFallback("opentelemetry-extension-aws", "1.20.1")
// NOTE: opentelemetry-exporter-jaeger and opentelemetry-exporter-jaeger-thift are omitted because
// they contain dependencies on internal classes, which may have breaking API changes preventing compilation.
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ val DEPENDENCY_BOMS = listOf(
"io.grpc:grpc-bom:1.60.1",
"io.netty:netty-bom:4.1.104.Final",
"io.zipkin.brave:brave-bom:6.0.0",
"io.zipkin.reporter2:zipkin-reporter-bom:2.17.1",
"io.zipkin.reporter2:zipkin-reporter-bom:3.1.1",
"org.assertj:assertj-bom:3.25.1",
"org.junit:junit-bom:5.10.1",
"org.testcontainers:testcontainers-bom:1.19.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
Comparing source compatibility of against
No changes.
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
=== UNCHANGED METHOD: PUBLIC io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder setEncoder(zipkin2.codec.BytesEncoder<zipkin2.Span><zipkin2.Span>)
+++ NEW ANNOTATION: java.lang.Deprecated
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder setEncoder(zipkin2.reporter.BytesEncoder<zipkin2.Span>)
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.opentelemetry.api.trace.SpanId;
import io.opentelemetry.api.trace.TraceId;
import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
import io.opentelemetry.sdk.internal.DynamicPrimitiveLongList;
import io.opentelemetry.sdk.resources.Resource;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
Expand Down Expand Up @@ -128,6 +129,31 @@ public static int sizeRepeatedUInt64(ProtoFieldInfo field, long[] values) {
return field.getTagSize() + CodedOutputStream.computeUInt32SizeNoTag(payloadSize) + payloadSize;
}

/**
* Returns the size of a repeated uint64 field.
*
* <p>Packed repeated fields contain the tag, an integer representing the incoming payload size,
* and an actual payload of repeated varints.
*
* <p>NOTE: This method has the same logic as {@link #sizeRepeatedUInt64(ProtoFieldInfo, long[])}
* )} but instead of using a primitive array it uses {@link DynamicPrimitiveLongList} to avoid
* boxing/unboxing
*/
public static int sizeRepeatedUInt64(ProtoFieldInfo field, DynamicPrimitiveLongList values) {
if (values.isEmpty()) {
return 0;
}

int payloadSize = 0;
for (int i = 0; i < values.size(); i++) {
long v = values.getLong(i);
payloadSize += CodedOutputStream.computeUInt64SizeNoTag(v);
}

// tag size + payload indicator size + actual payload size
return field.getTagSize() + CodedOutputStream.computeUInt32SizeNoTag(payloadSize) + payloadSize;
}

/** Returns the size of a repeated double field. */
public static int sizeRepeatedDouble(ProtoFieldInfo field, List<Double> values) {
// Same as fixed64.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package io.opentelemetry.exporter.internal.marshal;

import io.opentelemetry.sdk.internal.DynamicPrimitiveLongList;
import java.io.IOException;
import java.util.List;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -191,6 +192,7 @@ public void serializeMessage(ProtoFieldInfo field, Marshaler message) throws IOE
writeEndMessage();
}

@SuppressWarnings("SameParameterValue")
protected abstract void writeStartRepeatedPrimitive(
ProtoFieldInfo field, int protoSizePerElement, int numElements) throws IOException;

Expand Down Expand Up @@ -243,6 +245,32 @@ public void serializeRepeatedUInt64(ProtoFieldInfo field, long[] values) throws
writeEndRepeatedVarint();
}

/**
* Serializes a {@code repeated uint64} field.
*
* <p>NOTE: This is the same as {@link #serializeRepeatedUInt64(ProtoFieldInfo, long[])} but
* instead of taking a primitive array it takes a {@link DynamicPrimitiveLongList} as input.
*/
public void serializeRepeatedUInt64(ProtoFieldInfo field, DynamicPrimitiveLongList values)
throws IOException {
if (values.isEmpty()) {
return;
}

int payloadSize = 0;
for (int i = 0; i < values.size(); i++) {
long v = values.getLong(i);
payloadSize += CodedOutputStream.computeUInt64SizeNoTag(v);
}

writeStartRepeatedVarint(field, payloadSize);
for (int i = 0; i < values.size(); i++) {
long value = values.getLong(i);
writeUInt64Value(value);
}
writeEndRepeatedVarint();
}

/** Serializes a {@code repeated double} field. */
public void serializeRepeatedDouble(ProtoFieldInfo field, List<Double> values)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"name":"io.opentelemetry.sdk.common.export.AutoValue_RetryPolicy",
"queryAllDeclaredMethods":true
},
{
"name":"io.opentelemetry.sdk.common.export.RetryPolicy",
"queryAllDeclaredMethods":true
}
]
3 changes: 0 additions & 3 deletions exporters/jaeger-proto/README.md

This file was deleted.

25 changes: 0 additions & 25 deletions exporters/jaeger-proto/build.gradle.kts

This file was deleted.

This file was deleted.

89 changes: 0 additions & 89 deletions exporters/jaeger-proto/src/main/proto/jaeger/api_v2/model.proto

This file was deleted.

58 changes: 0 additions & 58 deletions exporters/jaeger-proto/src/main/proto/jaeger/api_v2/time.proto

This file was deleted.

Loading

0 comments on commit 6a0d950

Please sign in to comment.