open-telemetry / opentelemetry-helm-charts

OpenTelemetry Helm Charts
https://opentelemetry.io
Apache License 2.0
390 stars 479 forks source link

Enable extensions to be string #22

Closed jjangga0214 closed 2 years ago

jjangga0214 commented 3 years ago

How it behaves

Extensions are only able to be specified by object.

How it should behave

Extensions can be passed as string. If so, default configuration for the extension should be applied.

Reproduction

Configuration

config:
  extensions: [health_check, pprof, zpages]

Error

➜  capa-viewer git:(ops/tracing) ✗ (☸ |kind-kind:operations) kubectl get pod                                                               
NAME                                                        READY   STATUS             RESTARTS   AGE
opentelemetry-collector-agent-hdxb6                         1/2     CrashLoopBackOff   6          9m40s

➜  capa-viewer git:(ops/tracing) ✗ (☸ |kind-kind:operations) kubectl logs opentelemetry-collector-agent-hdxb6 opentelemetry-collector
{"level":"info","ts":1608966467.3456182,"caller":"service/service.go:396","msg":"Starting OpenTelemetry Collector...","Version":"latest","GitHash":"a85c7a2d","NumCPU":4}
{"level":"info","ts":1608966467.3494048,"caller":"service/service.go:577","msg":"Using memory ballast","MiBs":204}
{"level":"info","ts":1608966467.3494508,"caller":"service/service.go:240","msg":"Setting up own telemetry..."}
{"level":"info","ts":1608966467.4299529,"caller":"service/telemetry.go:108","msg":"Serving Prometheus metrics","address":"0.0.0.0:8888","legacy_metrics":false,"new_metrics":true,"level":0,"service.instance.id":"5ecd691e-56c9-4c93-a5a1-d0716cad798d"}
{"level":"info","ts":1608966467.430466,"caller":"service/service.go:277","msg":"Loading configuration..."}
Error: cannot load configuration: error reading top level configuration sections: 1 error(s) decoding:

* 'extensions[0]' expected a map, got 'string'
2020/12/26 07:07:47 application run finished with error: cannot load configuration: error reading top level configuration sections: 1 error(s) decoding:

* 'extensions[0]' expected a map, got 'string'
txomon commented 3 years ago

I believe this belongs to the opentelemetry-collector rather than here, as the config file is passed through.

dmitryax commented 2 years ago

This is incorrect config. If you want to redefine list of used extensions, the config should be:

config:
  service:
    extensions: [health_check, pprof, zpages]