Skip to content

Commit

Permalink
Update method calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Feb 1, 2024
1 parent 376c784 commit febb133
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libbeat/cmd/instance/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ func (b *Beat) configure(settings Settings) error {
fqdnLookupCtx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()

fqdn, err := h.FQDN(fqdnLookupCtx)
fqdn, err := h.FQDNWithContext(fqdnLookupCtx)
if err != nil {
// FQDN lookup is "best effort". We log the error, fallback to
// the OS-reported hostname, and move on.
Expand Down
4 changes: 2 additions & 2 deletions libbeat/processors/add_host_metadata/add_host_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/gofrs/uuid"

"github.com/elastic/elastic-agent-libs/monitoring"
"github.com/elastic/go-sysinfo"

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/features"
Expand All @@ -36,7 +37,6 @@ import (
"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/mapstr"
"github.com/elastic/elastic-agent-system-metrics/metric/system/host"
"github.com/elastic/go-sysinfo"
)

const processorName = "add_host_metadata"
Expand Down Expand Up @@ -182,7 +182,7 @@ func (p *addHostMetadata) loadData(checkCache bool, useFQDN bool) error {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()

fqdn, err := h.FQDN(ctx)
fqdn, err := h.FQDNWithContext(ctx)
if err != nil {
// FQDN lookup is "best effort". If it fails, we monitor the failure, fallback to
// the OS-reported hostname, and move on.
Expand Down

0 comments on commit febb133

Please sign in to comment.