Closed mat-rumian closed 1 year ago
Ideally we'd work to put this in upstream because in order to introduce this into our collector we'd need to copy paste unexported func
s (like getConfigFlag()
or getSetFlag()
which are used in here which is being used by the code generated with opentelemetry collector builder).
@mat-rumian Are you aware of any issues upstream that tried to track this?
Since this capability is not available, I believe it's now just a matter of adding documentation @mat-rumian ?
Collector supports configuration via environment variable. E.g.
export VALID_YAML=" receivers:
otlp:
protocols:
grpc:
http:
exporters:
otlp:
endpoint: "otela-collector.default:4317"
tls:
insecure: true
sending_queue:
num_consumers: 4
queue_size: 100
retry_on_failure:
enabled: true
processors:
batch:
memory_limiter:
limit_mib: 400
spike_limit_mib: 100
check_interval: 5s
extensions:
zpages: {}
memory_ballast:
size_mib: 165
service:
extensions: [zpages, memory_ballast]
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlp]"
collector cmd line ./otelcol --config=env:VALID_YAML
It should be possible to configure OTEL Collector thru environment variable. This shouldn't require a lot of development effort - please see AWS Otel Collector solution. Thanks to this functionality we will simplify a lot deployments on the environments like AWS ECS Fargate/EC2.