Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ subprojects {

dependencies {
// using the bom ensures that all of your opentelemetry dependency versions are aligned
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:2.24.0-alpha"))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:2.25.0-alpha"))
}

spotless {
Expand Down
2 changes: 1 addition & 1 deletion doc-snippets/exporters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ java {

dependencies {
implementation(platform(SpringBootPlugin.BOM_COORDINATES))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.24.0"))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.25.0"))

implementation("org.springframework.boot:spring-boot-starter-web")
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
Expand Down
2 changes: 1 addition & 1 deletion doc-snippets/getting-started/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ java {

dependencies {
implementation(platform(SpringBootPlugin.BOM_COORDINATES))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.24.0"))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.25.0"))

implementation("org.springframework.boot:spring-boot-starter-web")
}
2 changes: 1 addition & 1 deletion doc-snippets/spring-starter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ java {

dependencies {
implementation(platform(SpringBootPlugin.BOM_COORDINATES))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.24.0"))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.25.0"))

implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-webflux")
Expand Down
4 changes: 2 additions & 2 deletions grpc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ dependencies {
implementation ("io.grpc:grpc-services:${grpcVersion}")
implementation ("io.grpc:grpc-stub:${grpcVersion}")
implementation ("com.google.protobuf:protobuf-java-util:${protobufVersion}")
implementation ("io.opentelemetry.instrumentation:opentelemetry-grpc-1.6:2.24.0-alpha")
implementation ("io.opentelemetry.instrumentation:opentelemetry-grpc-1.6:2.25.0-alpha")
implementation ("com.google.guava:guava:33.5.0-jre")

implementation("io.opentelemetry:opentelemetry-api")
implementation("io.opentelemetry:opentelemetry-sdk")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin")
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
implementation("io.opentelemetry.instrumentation:opentelemetry-grpc-1.6")

//alpha modules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,31 @@

import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.exporter.zipkin.ZipkinSpanExporter;
import io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporter;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import io.opentelemetry.sdk.resources.Resource;
import io.opentelemetry.sdk.trace.SdkTracerProvider;
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;
import io.opentelemetry.sdk.trace.export.SpanExporter;
import io.opentelemetry.semconv.ServiceAttributes;

public final class ExampleConfiguration {

// Name of the service
private static final String SERVICE_NAME = "myExampleService";

/** Adds a SimpleSpanProcessor initialized with ZipkinSpanExporter to the TracerSdkProvider */
/** Adds a SimpleSpanProcessor initialized with OtlpHttpSpanExporter to the TracerSdkProvider */
static OpenTelemetry initializeOpenTelemetry(String ip, int port) {
String endpoint = String.format("http://%s:%s/api/v2/spans", ip, port);
ZipkinSpanExporter zipkinExporter = ZipkinSpanExporter.builder().setEndpoint(endpoint).build();
String endpoint = String.format("http://%s:%s/api/v1/traces", ip, port);
SpanExporter spanExporter = OtlpHttpSpanExporter.builder().setEndpoint(endpoint).build();

Resource serviceNameResource =
Resource.create(Attributes.of(ServiceAttributes.SERVICE_NAME, SERVICE_NAME));

// Set to process the spans by the Zipkin Exporter
SdkTracerProvider tracerProvider =
SdkTracerProvider.builder()
.addSpanProcessor(SimpleSpanProcessor.create(zipkinExporter))
.addSpanProcessor(SimpleSpanProcessor.create(spanExporter))
.setResource(Resource.getDefault().merge(serviceNameResource))
.build();
OpenTelemetrySdk openTelemetry =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class HelloWorldClient {

private static final Logger logger = Logger.getLogger(HelloWorldClient.class.getName());
private static final OpenTelemetry openTelemetry =
ExampleConfiguration.initializeOpenTelemetry("localhost", 9411);
ExampleConfiguration.initializeOpenTelemetry("localhost", 4318);
private final ManagedChannel channel;
private final GreeterGrpc.GreeterBlockingStub blockingStub;

Expand All @@ -33,7 +33,7 @@ public HelloWorldClient() {
this.channel =
ManagedChannelBuilder.forAddress("localhost", 50051)
.usePlaintext()
.intercept(grpcTelemetry.newClientInterceptor())
.intercept(grpcTelemetry.createClientInterceptor())
.build();
this.blockingStub = GreeterGrpc.newBlockingStub(this.channel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public class HelloWorldServer {
private static final Logger logger = Logger.getLogger(HelloWorldServer.class.getName());
private static final OpenTelemetry openTelemetry =
ExampleConfiguration.initializeOpenTelemetry("localhost", 9411);
ExampleConfiguration.initializeOpenTelemetry("localhost", 4318);
private Server server;

private void start() throws IOException {
Expand Down Expand Up @@ -56,7 +56,7 @@ public void run() {
ServerServiceDefinition configureServerInterceptor(
OpenTelemetry openTelemetry, BindableService bindableService) {
GrpcTelemetry grpcTelemetry = GrpcTelemetry.create(openTelemetry);
return ServerInterceptors.intercept(bindableService, grpcTelemetry.newServerInterceptor());
return ServerInterceptors.intercept(bindableService, grpcTelemetry.createServerInterceptor());
}

private void stop() throws InterruptedException {
Expand Down
2 changes: 1 addition & 1 deletion javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")

agent("io.opentelemetry.javaagent:opentelemetry-javaagent:2.24.0")
agent("io.opentelemetry.javaagent:opentelemetry-javaagent:2.25.0")
}

val copyAgent = tasks.register<Copy>("copyAgent") {
Expand Down
2 changes: 1 addition & 1 deletion spring-declarative-configuration/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ java {

dependencies {
implementation(platform(SpringBootPlugin.BOM_COORDINATES))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.24.0"))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.25.0"))
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter")
Expand Down
2 changes: 1 addition & 1 deletion spring-native/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ val moduleName by extra { "io.opentelemetry.examples.native" }

dependencies {
implementation(platform(SpringBootPlugin.BOM_COORDINATES))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.24.0"))
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.25.0"))
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
Expand Down
4 changes: 2 additions & 2 deletions telemetry-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ val bootJar = tasks.named<BootJar>("bootJar") {
dependencies {
implementation(platform(SpringBootPlugin.BOM_COORDINATES))
implementation("io.opentelemetry:opentelemetry-api")
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.24.0")
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.25.0")
//spring modules
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-restclient")
Expand All @@ -44,7 +44,7 @@ dependencies {
testImplementation("io.opentelemetry.proto:opentelemetry-proto:1.9.0-alpha")
testImplementation("org.assertj:assertj-core:3.27.7")

agent("io.opentelemetry.javaagent:opentelemetry-javaagent:2.24.0")
agent("io.opentelemetry.javaagent:opentelemetry-javaagent:2.25.0")
}

tasks.test {
Expand Down
Loading