* GraphQL Java Initial Commit * [WIP] First steps for GraphQL instrumentation, totally not ready [skip ci] * GraphQL Java instrumentation * address review comments * Apply suggestions from code review Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com> * review feedback * scope handling * Apply suggestions from code review Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> * use spotless:off * trigger build * review comments Co-authored-by: Jordie <xd@jrdie.nl> Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> |
||
---|---|---|
.. | ||
src | ||
README.md | ||
build.gradle.kts |
README.md
Manual Instrumentation for GraphQL Java
Provides OpenTelemetry instrumentation for GraphQL Java.
Quickstart
Add these dependencies to your project:
Replace OPENTELEMETRY_VERSION
with the latest stable
release. Minimum version: 1.13.0
For Maven, add to your pom.xml
dependencies:
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-graphql-java-12.0</artifactId>
<version>OPENTELEMETRY_VERSION</version>
</dependency>
</dependencies>
For Gradle, add to your dependencies:
implementation("io.opentelemetry.instrumentation:opentelemetry-graphql-java-12.0:OPENTELEMETRY_VERSION")
Usage
The instrumentation library provides a GraphQL Java Instrumentation
implementation that can be
added to an instance of the GraphQL
to provide OpenTelemetry-based spans.
void configure(OpenTelemetry openTelemetry, GraphQL.Builder builder) {
GraphQLTracing tracing = GraphQLTracing.builder(openTelemetry).build();
builder.instrumentation(tracing.newInstrumentation());
}