Skip to content

Commit

Permalink
[issue-322] - Update OTel collector container configuration (0.115.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobrz authored and marekkopecky committed Jan 9, 2025
1 parent 3684b46 commit 84c443c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class OpenTelemetryCollectorContainer {
public static final int DOCKER_HOST_OTLP_HTTP_PORT = DEFAULT_OTLP_HTTP_PORT + 100;
public static final int PROMETHEUS_PORT = 49152;
public static final int HEALTH_CHECK_PORT = 13133;
private static final String OTEL_CONFIG_DIR_NAME = "otel-collector";
private static final String OTEL_CONFIG_DIR_NAME = "otelcol-contrib";
private static final String OTEL_CONFIG_FILE_NAME = "config.yaml";
public static final String OTEL_COLLECTOR_CONFIG_LOCAL_PATH = Paths.get(System.getProperty("user.home"),
OTEL_CONFIG_DIR_NAME, OTEL_CONFIG_FILE_NAME).toAbsolutePath().toString();
Expand Down Expand Up @@ -104,7 +104,6 @@ private OpenTelemetryCollectorContainer() {
.withPortMapping(String.format("%s:%s", DOCKER_HOST_OTLP_HTTP_PORT, DOCKER_CONTAINER_OTLP_HTTP_PORT))
.withPortMapping(String.format("%1$s:%1$s", HEALTH_CHECK_PORT))
.withPortMapping(String.format("%1$s:%1$s", PROMETHEUS_PORT))
.withCmdArg("--config=" + OTEL_COLLECTOR_CONFIG_CONTAINER_FILE_PATH)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,23 @@ exporters:
verbosity: detailed
prometheus:
endpoint: "0.0.0.0:49152"
otlp:
endpoint: 0.0.0.0:4217
tls:
insecure: true
# We don't test traces here
# otlp:
# endpoint: 0.0.0.0:4217
# tls:
# insecure: true

service:
pipelines:
metrics:
receivers: [ otlp ]
processors: [ batch ]
exporters: [ prometheus, debug ]
traces:
receivers: [ otlp ]
processors: [ batch ]
exporters: [ otlp, debug ]
# We don't test traces here
# traces:
# receivers: [ otlp ]
# processors: [ batch ]
# exporters: [ otlp, debug ]
logs:
receivers: [ otlp ]
processors: [ batch ]
Expand Down

0 comments on commit 84c443c

Please sign in to comment.