Skip to content

Commit 32dc0a1

Browse files
authored
Remove legacy traceable config (#28)
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
1 parent 1b059db commit 32dc0a1

4 files changed

Lines changed: 1 addition & 127 deletions

File tree

README.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,10 @@ The final artifact is in `javaagent/build/libs/hypertrace-agent-<version>-all.ja
2929
OTEL_EXPORTER=zipkin java -javaagent:javaagent/build/libs/hypertrace-agent-0.0.1-all.jar -jar app.jar
3030
```
3131

32-
### Run with Traceable.ai config
33-
34-
The precedence order of different configuration
32+
The configuration precedence order
3533
1. OpenTelemetry Agent's trace config file `OTEL_TRACE_CONFIG`/`otel.trace.config`
36-
2. Traceable.ai configuration file
3734
3. OpenTelemetry system properties and env variables
3835

39-
Follows and example of using Traceable.ai config file (`example-config.json`):
40-
41-
```bash
42-
java -javaagent:javaagent/build/libs/hypertrace-agent-0.0.1-all.jar=traceableConfigFile=example-config.json -jar app.jar
43-
```
44-
45-
Supported agent arguments:
46-
47-
* `traceableConfigFile` - path to traceable config file
48-
* `traceableServiceName` - service name of the monitored process
49-
5036
### Disable request/response body capture
5137

5238
Request and response body capture can be disabled by `-Dotel.integration.body.enabled=false` or

javaagent/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ dependencies {
88
// update the dependencies also in the instrumentations sub-projects
99
// https://oss.jfrog.org/artifactory/oss-snapshot-local/io/opentelemetry/instrumentation/auto/
1010
implementation("io.opentelemetry.instrumentation.auto", "opentelemetry-javaagent", version = "0.9.0-20201008.091003-73", classifier = "all")
11-
implementation("ai.traceable.agent", "agent-config", version = "0.2.4")
1211
}
1312

1413
base.archivesBaseName = "hypertrace-agent"

javaagent/src/main/java/org/hypertrace/agent/HypertraceAgent.java

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.hypertrace.agent;
1818

19-
import ai.traceable.agent.agentconfig.InstrumentationAgentConfig;
20-
import ai.traceable.agent.agentconfig.Reporting;
2119
import io.opentelemetry.javaagent.OpenTelemetryAgent;
2220
import java.lang.instrument.Instrumentation;
2321

@@ -36,40 +34,6 @@ public static void premain(String agentArgs, Instrumentation inst) {
3634
}
3735

3836
public static void agentmain(String agentArgs, Instrumentation inst) {
39-
configureOTELWithTraceableConfig(agentArgs);
4037
OpenTelemetryAgent.premain(agentArgs, inst);
4138
}
42-
43-
private static void configureOTELWithTraceableConfig(String agentArgs) {
44-
// The properties from traceable config file are set as default to OTEL config.
45-
InstrumentationAgentConfig traceableConfig = TraceableConfig.loadConfigFile(agentArgs);
46-
if (traceableConfig == null) {
47-
return;
48-
}
49-
50-
if (traceableConfig.getLogging() != null && traceableConfig.getLogging().getLevel() != null) {
51-
OpenTelemetryConfig.setDefault(
52-
OTEL_DEFAULT_LOG_LEVEL, traceableConfig.getLogging().getLevel());
53-
}
54-
55-
// set reporter to Zipkin because OpenTelemetry supports only Jaeger gRPC
56-
// which is not supported by OC collector in Hypertrace
57-
OpenTelemetryConfig.setDefault(OTEL_EXPORTER, "zipkin");
58-
59-
// TODO retry and backoff are not in OTEL. Maybe gRPC exporter does retry automatically?
60-
Reporting reporting = traceableConfig.getReporting();
61-
if (reporting != null) {
62-
if (reporting != null && reporting.getTracesAddress() != null) {
63-
OpenTelemetryConfig.setDefault(OTEL_EXPORTER_ZIPKIN_ENDPOINT, reporting.getTracesAddress());
64-
}
65-
if (reporting.getQueueSize() != null) {
66-
OpenTelemetryConfig.setDefault(
67-
OTEL_PROCESSOR_BATCH_MAX_QUEUE, Integer.toString(reporting.getQueueSize()));
68-
}
69-
}
70-
if (traceableConfig.getServiceName() != null) {
71-
OpenTelemetryConfig.setDefault(
72-
OTEL_EXPORTER_ZIPKIN_SERVICE_NAME, traceableConfig.getServiceName());
73-
}
74-
}
7539
}

javaagent/src/main/java/org/hypertrace/agent/TraceableConfig.java

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)