Skip to content

Commit fd4734e

Browse files
committed
More cleanup
1 parent 21673fd commit fd4734e

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package io.opentelemetry.javaagent.instrumentation.openai.v1_1;
77

8-
import static io.opentelemetry.javaagent.instrumentation.openai.v1_1.OpenAISingletons.TELEMETRY;
8+
import static io.opentelemetry.javaagent.instrumentation.openai.v1_1.OpenAiSingletons.TELEMETRY;
99
import static net.bytebuddy.matcher.ElementMatchers.named;
1010
import static net.bytebuddy.matcher.ElementMatchers.returns;
1111

@@ -16,8 +16,7 @@
1616
import net.bytebuddy.description.type.TypeDescription;
1717
import net.bytebuddy.matcher.ElementMatcher;
1818

19-
@SuppressWarnings("IdentifierName") // Want to match library's convention
20-
public class OpenAIClientInstrumentation implements TypeInstrumentation {
19+
public class OpenAiClientInstrumentation implements TypeInstrumentation {
2120
@Override
2221
public ElementMatcher<TypeDescription> typeMatcher() {
2322
return named("com.openai.client.okhttp.OpenAIOkHttpClient$Builder");
@@ -27,7 +26,7 @@ public ElementMatcher<TypeDescription> typeMatcher() {
2726
public void transform(TypeTransformer transformer) {
2827
transformer.applyAdviceToMethod(
2928
named("build").and(returns(named("com.openai.client.OpenAIClient"))),
30-
OpenAIClientInstrumentation.class.getName() + "$BuildAdvice");
29+
OpenAiClientInstrumentation.class.getName() + "$BuildAdvice");
3130
}
3231

3332
@SuppressWarnings("unused")
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
import net.bytebuddy.matcher.ElementMatcher;
1616

1717
@AutoService(InstrumentationModule.class)
18-
@SuppressWarnings("IdentifierName") // Want to match library's convention
19-
public class OpenAIInstrumentationModule extends InstrumentationModule {
20-
public OpenAIInstrumentationModule() {
18+
public class OpenAiInstrumentationModule extends InstrumentationModule {
19+
public OpenAiInstrumentationModule() {
2120
super("openai-java", "openai-java-1.1", "openai");
2221
}
2322

@@ -28,6 +27,6 @@ public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
2827

2928
@Override
3029
public List<TypeInstrumentation> typeInstrumentations() {
31-
return singletonList(new OpenAIClientInstrumentation());
30+
return singletonList(new OpenAiClientInstrumentation());
3231
}
3332
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99
import io.opentelemetry.instrumentation.openai.v1_1.OpenAITelemetry;
1010
import io.opentelemetry.javaagent.bootstrap.internal.AgentInstrumentationConfig;
1111

12-
@SuppressWarnings("IdentifierName") // Want to match library's convention
13-
public final class OpenAISingletons {
12+
public final class OpenAiSingletons {
1413
public static final OpenAITelemetry TELEMETRY =
1514
OpenAITelemetry.builder(GlobalOpenTelemetry.get())
1615
.setCaptureMessageContent(
1716
AgentInstrumentationConfig.get()
1817
.getBoolean("otel.instrumentation.genai.capture-message-content", false))
1918
.build();
2019

21-
private OpenAISingletons() {}
20+
private OpenAiSingletons() {}
2221
}

0 commit comments

Comments
 (0)