Skip to content

Commit

Permalink
chore: update collector config (#193)
Browse files Browse the repository at this point in the history
* add explicit endpoints and debug exporter

* update fixed otel collector version with its config file

* add missing explicit endpoints

* update fixed collector in tests
  • Loading branch information
anatula authored Nov 7, 2024
1 parent 2c7f0d7 commit 4e57e54
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,16 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

exporters:
file:
path: ./etc/test-logs/otlp-logs.log
flush_interval: 1

logging:
debug:
verbosity: basic

processors:
Expand All @@ -92,7 +95,7 @@ service:
logs:
receivers: [otlp]
processors: []
exporters: [logging, file]
exporters: [debug, file]
```
The collector can then be ran with:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "2"
services:
otel-collector:
image: otel/opentelemetry-collector-contrib:0.103.1
image: otel/opentelemetry-collector-contrib:0.112.0
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
Expand Down
2 changes: 2 additions & 0 deletions examples/grafana-loki/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

exporters:
loki:
Expand Down
6 changes: 4 additions & 2 deletions otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

exporters:
file:
path: ./etc/test-logs/otlp-logs.log
flush_interval: 1

logging:
debug:
verbosity: detailed

processors:
Expand All @@ -20,4 +22,4 @@ service:
logs:
receivers: [otlp]
processors: []
exporters: [logging, file]
exporters: [debug, file]
2 changes: 1 addition & 1 deletion test/lib/pino-opentelemetry-transport.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let container

before(async () => {
container = await new GenericContainer(
'otel/opentelemetry-collector-contrib:0.103.1'
'otel/opentelemetry-collector-contrib:0.112.0'
)
.withCopyFilesToContainer([
{
Expand Down

0 comments on commit 4e57e54

Please sign in to comment.