Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add error checks for tanzuobservability exporter #10188

Merged
merged 2 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

### 🧰 Bug fixes 🧰

- `tanzuobservabilityexporter`: add error checks for tanzuobservability exporter (#10188)
- `k8sclusterreceiver`: Fix the receiver to work with 1.19 and 1.20 k8s API versions (#9523)
- `azuremonitorexporter`: Fix log exporter bug related to incorrectly mapping SpanId (#9579)
- `mysqlreceiver`: Fix attribute values mismatch with its definition (#9688)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// nolint:errcheck
package tanzuobservabilityexporter

import (
"context"
"errors"
"log"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -91,7 +91,11 @@ func consumeMetrics(metrics pmetric.Metrics, sender *mockMetricSender) error {
if err != nil {
return err
}
defer mockOTelMetricsExporter.Shutdown(ctx)
defer func() {
if err := mockOTelMetricsExporter.Shutdown(ctx); err != nil {
log.Fatalln(err)
}
}()
return mockOTelMetricsExporter.ConsumeMetrics(ctx, metrics)
}

Expand Down