Flush out to the profile file before graceful shutdown (#2320)
Flush out to the profile file before graceful shutdown (#2320)

Ignore the Close error, trying to flush is the best we can do but is not worth to halt the shutdown if Close fails.
open-telemetry/opentelemetry-collector,open-telemetry/opentelemetry-collector-contrib,open-telemetry/opentelemetry-collector,open-telemetry/opentelemetry-collector-contrib,open-telemetry/opentelemetry-collector