Implement shutdown procedure for OTLP grpc exporters by girishc13 · Pull Request #3138 · open-telemetry/opentelemetry-python

- Add `_shutdown` variable for checking if the exporter has been
  shutdown.
- Prevent export if the `_shutdown` flag has been set. Log a warning
  message is exporter has been shutdown.
- Use thread lock to synchronize the last export call before shutdown
  timeout. The `shutdown` method will wait until the `timeout_millis`
  if there is an ongoing export. If there is no ongiong export, set the
  `_shutdown` flag to prevent further exports and return.
- Add unit tests for the `OTLPExporterMixIn` and the sub classes for
  traces and metrics.

added 2 commits

January 23, 2023 15:00

JoanFM

@srikanthccv

@srikanthccv

srikanthccv

@srikanthccv

@srikanthccv

@girishc13 girishc13 deleted the fix-1791-otlp-grpc-exporter-shutdown branch

March 15, 2023 08:11

imomaliev