Emit critical service check when connection is lost
QA for https://github.com/DataDog/integrations-core/pull/12736 The original PR addressed a customer concern about the integration keeping emitting an OK service check even if the integration was failing to connect and showing errors in the agent status. It did so by stopping to cache the connection all toghether.
There are two instances where this integration attempts to create a new connection:
- At the beginning of the check run
- In case of an error on the middle of the check run. In this case we were failing to both reassign the connection and emit a critical service check and this is the bug that is being fixed here.
This PR fixes the bug mentioned before and reverts the changes about connection caching done in the original PR. Aside from that the metadata method was missing the entrypoint annotation that allows disabling the feature.
Codecov Report
Merging #12995 (416859b) into master (0b92164) will increase coverage by
0.00%. The diff coverage is100.00%.
| Flag | Coverage Δ | |
|---|---|---|
| ibm_db2 | 95.10% <100.00%> (+0.64%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.