$ mkdir /tmp/outputs
$ docker run -d -v ${PWD}/config.yaml:/etc/otelcol/config.yaml -v /tmp/outputs:/outputs -p 4317:4317 -p 4318:4318 -p 13133:13133 otel/opentelemetry-collector
$ python trace.py
$ cat /tmp/outputs/*.json
{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"otel-collector-example"}}]},"scopeSpans":[{"scope":{"name":"__main__"},"spans":[{"traceId":"efdc9db3df8d42fc2ec2776e88dda227","spanId":"9845104eb9e7e64a","parentSpanId":"56592f1d9265bcfd","name":"dad","kind":1,"startTimeUnixNano":"1668003368355962000","endTimeUnixNano":"1668003368355999000","status":{}},{"traceId":"efdc9db3df8d42fc2ec2776e88dda227","spanId":"56592f1d9265bcfd","parentSpanId":"","name":"grand-dad","kind":1,"startTimeUnixNano":"1668003368355922000","endTimeUnixNano":"1668003368356014000","status":{}}]}]}]}
Metrics exporter does not seem to work and there are no sufficient examples as of now