Java code-generation for the OpenTelemetry Protocol Buffer data model. This repository contains workflows and build scripts that pull releases from opentelemetry-proto to generate and build Java bindings and publish them to the Maven Central Repository.
You can use the published releases available
on Maven Central. To
do so, add the following as dependencies to your build configuration and replace {{version}}
with
your desired version.
<dependency>
<groupId>io.opentelemetry.proto</groupId>
<artifactId>opentelemetry-proto</artifactId>
<version>{{version}}</version>
</dependency>
implementation("io.opentelemetry.proto:opentelemetry-proto:{{version}}")
The build downloads proto definitions from open-telemetry/opentelemetry-proto and generates Java bindings:
./gradlew build
By default protos definitions will be downloaded for the latest published tag
of opentelemetry-proto-java
. For example, if the latest version
is 0.20.0, protos will be
downloaded from
the v0.20.0 release.
This can be overridden for the build or other gradle tasks (e.g. publishToMavenLocal
)
with -Prelease.version
:
./gradlew build -Prelease.version=1.0.0
The generated java bindings published from this repository are provided as-is.
For generic documentation on how to use protobuf bindings, see gRPC documentation and protobuf java documentation.
We have no intention of eventually publishing stable artifacts. If you need guarantees, please generate your own bindings, consulting grpc codegen and possibly build.gradle.kts
See RELEASING.md