Skip to content

Commit f0ae509

Browse files
authored
using ports 5442/5443 (#422)
1 parent 2cae0ea commit f0ae509

File tree

15 files changed

+33
-28
lines changed

15 files changed

+33
-28
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ The final artifact is in `javaagent/build/libs/hypertrace-agent-<version>-all.ja
4343
Download the [latest version](https://github.com/hypertrace/javaagent/releases/latest/download/hypertrace-agent-all.jar).
4444

4545
```bash
46-
HT_REPORTING_ENDPOINT=http://localhost:4317 java -javaagent:javaagent/build/libs/hypertrace-agent-<version>-all.jar -jar app.jar
46+
HT_REPORTING_ENDPOINT=http://localhost:5442 java -javaagent:javaagent/build/libs/hypertrace-agent-<version>-all.jar -jar app.jar
47+
```
48+
If TPA is configured with TLS server
49+
```bash
50+
HT_REPORTING_ENDPOINT=https://localhost:5443 java -javaagent:javaagent/build/libs/hypertrace-agent-<version>-all.jar -jar app.jar
4751
```
4852

4953
By default the agent uses Otlp exporter.

example-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
service_name: service_name
22
reporting:
3-
endpoint: http://localhost:4317
3+
endpoint: http://localhost:5442

otel-extensions/src/main/java/org/hypertrace/agent/otel/extensions/config/HypertraceConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private static List<StringValue> initDefaultContentTypes() {
7878

7979
static final String DEFAULT_SERVICE_NAME = "unknown";
8080
// Default reporting endpoint for traces and metrics
81-
static final String DEFAULT_REPORTING_ENDPOINT = "http://localhost:4317";
81+
static final String DEFAULT_REPORTING_ENDPOINT = "http://localhost:5442";
8282
// 128 KiB
8383
static final int DEFAULT_BODY_MAX_SIZE_BYTES = 128 * 1024;
8484

otel-extensions/src/test/java/org/hypertrace/agent/otel/extensions/config/HypertraceConfigTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ private void assertConfig(AgentConfig agentConfig) {
137137
Assertions.assertEquals(
138138
"/foo/bar/example.pem", agentConfig.getReporting().getCertFile().getValue());
139139
Assertions.assertEquals(
140-
"http://localhost:4317", agentConfig.getReporting().getEndpoint().getValue());
140+
"http://localhost:5442", agentConfig.getReporting().getEndpoint().getValue());
141141
Assertions.assertEquals(
142-
"http://localhost:4317", agentConfig.getReporting().getMetricEndpoint().getValue());
142+
"http://localhost:5442", agentConfig.getReporting().getMetricEndpoint().getValue());
143143
Assertions.assertEquals(true, agentConfig.getReporting().getSecure().getValue());
144144
Assertions.assertEquals(16, agentConfig.getDataCapture().getBodyMaxSizeBytes().getValue());
145145
Assertions.assertEquals(
@@ -172,15 +172,15 @@ public void configWithSystemProps() throws IOException {
172172
}
173173

174174
@Test
175-
@SetEnvironmentVariable(key = "HT_REPORTING_ENDPOINT", value = "http://oltp.hypertrace.org:4317")
175+
@SetEnvironmentVariable(key = "HT_REPORTING_ENDPOINT", value = "http://oltp.hypertrace.org:5442")
176176
public void complexConfig() throws IOException {
177177
// GIVEN a config file with a non-default reporting endpoint and an env-var with a different
178178
// non-default otlp reporting endpoint
179179
URL resource = getClass().getClassLoader().getResource("config.yaml");
180180
// WHEN we load the config
181181
AgentConfig agentConfig = HypertraceConfig.load(resource.getPath());
182182
// VERIFY the trace and metric endpoints are the both the value of the env var
183-
String expectedEndpoint = "http://oltp.hypertrace.org:4317";
183+
String expectedEndpoint = "http://oltp.hypertrace.org:5442";
184184
Assertions.assertEquals(expectedEndpoint, agentConfig.getReporting().getEndpoint().getValue());
185185
Assertions.assertEquals(
186186
expectedEndpoint, agentConfig.getReporting().getMetricEndpoint().getValue());
@@ -238,7 +238,7 @@ void nonDefaultReportingEndpoint() throws IOException {
238238
// VERIFY the trace reporting type is OTLP
239239
Assertions.assertEquals(
240240
TraceReporterType.OTLP, agentConfig.getReporting().getTraceReporterType());
241-
String expectedReportingEndpoint = "http://example.com:4317";
241+
String expectedReportingEndpoint = "http://example.com:5442";
242242
// VERIFY the trace reporting and metric reporting endpoints are both the specified value
243243
Assertions.assertEquals(
244244
expectedReportingEndpoint, agentConfig.getReporting().getEndpoint().getValue());
@@ -257,10 +257,10 @@ void nonDefaultMetricsEndpoint() throws IOException {
257257
TraceReporterType.OTLP, agentConfig.getReporting().getTraceReporterType());
258258
// VERIFY the trace reporting endpoint is still the default value
259259
Assertions.assertEquals(
260-
"http://localhost:4317", agentConfig.getReporting().getEndpoint().getValue());
260+
"http://localhost:5442", agentConfig.getReporting().getEndpoint().getValue());
261261
// VERIFY the metric reporting endpoint is the specified value
262262
Assertions.assertEquals(
263-
"http://example.com:4317", agentConfig.getReporting().getMetricEndpoint().getValue());
263+
"http://example.com:5442", agentConfig.getReporting().getMetricEndpoint().getValue());
264264
}
265265

266266
@Test

otel-extensions/src/test/resources/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ enabled: false
44
propagationFormats:
55
- B3
66
reporting:
7-
endpoint: http://localhost:4317
8-
metric_endpoint: http://localhost:4317
7+
endpoint: http://localhost:5442
8+
metric_endpoint: http://localhost:5442
99
secure: true
1010
trace_reporter_type: OTLP
1111
metric_reporter_type: METRIC_REPORTER_TYPE_OTLP

otel-extensions/src/test/resources/nonDefaultDataCaptureConfig.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ enabled: false
44
propagationFormats:
55
- B3
66
reporting:
7-
endpoint: http://localhost:4317
8-
metric_endpoint: http://localhost:4317
7+
endpoint: http://localhost:5442
8+
metric_endpoint: http://localhost:5442
99
secure: true
1010
trace_reporter_type: OTLP
1111
metric_reporter_type: METRIC_REPORTER_TYPE_OTLP
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
service_name: service
22
reporting:
3-
metric_endpoint: http://example.com:4317
3+
metric_endpoint: http://example.com:5442
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
service_name: service
22
reporting:
3-
endpoint: http://example.com:4317
3+
endpoint: http://example.com:5442
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
service_name: service
22
reporting:
33
trace_reporter_type: ZIPKIN
4-
endpoint: http://example.com:9411/api/v2/spans
4+
endpoint: http://example.com:5442/api/v2/spans

0 commit comments

Comments
 (0)