We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35c5b41 commit 0d93454Copy full SHA for 0d93454
plugins/outputs/mongodb/mongodb.go
@@ -231,7 +231,7 @@ func (s *MongoDB) Write(metrics []telegraf.Metric) error {
231
232
collection := s.client.Database(s.MetricDatabase).Collection(metric.Name())
233
if _, err := collection.InsertOne(ctx, &doc); err != nil {
234
- return fmt.Errorf("getting collection %q failed: %w", metric.Name(), err)
+ return fmt.Errorf("inserting document into %q failed: %w", metric.Name(), err)
235
}
236
237
return nil
0 commit comments