Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
add context to ping
  • Loading branch information
Obeyed committed May 11, 2026
commit 611aa11d9fecd93f68c9e20120181c0dd72195f2
2 changes: 1 addition & 1 deletion plugins/outputs/opensearch/opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (o *Opensearch) Connect() error {
o.Log.Errorf("error creating OpenSearch client: %v", err)
}

_, err = o.osClient.Ping()
_, err = o.osClient.Ping(o.osClient.Ping.WithContext(ctx))
if err != nil {
return &internal.StartupError{
Err: fmt.Errorf("unable to ping OpenSearch server: %w", err),
Expand Down
Loading