Skip to content

Commit

Permalink
hostmetricsreceiver: remove unused function (open-telemetry#29075)
Browse files Browse the repository at this point in the history
**Description:**
`gopsutil` recently added the capability to pass environment vars
through context. This is now done everywhere. This environment variable
setting function is no longer used or necessary. This PR removes it.

**Link to tracking Issue:** open-telemetry#23055

Signed-off-by: Braydon Kains <braydonk@google.com>
  • Loading branch information
braydonk authored and jmsnll committed Nov 12, 2023
1 parent 315b146 commit 5af95e8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions receiver/hostmetricsreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,12 @@ func createHostMetricsScraper(ctx context.Context, set receiver.CreateSettings,

type environment interface {
Lookup(k string) (string, bool)
Set(k, v string) error
}

type osEnv struct{}

var _ environment = (*osEnv)(nil)

func (e *osEnv) Set(k, v string) error {
return os.Setenv(k, v)
}

func (e *osEnv) Lookup(k string) (string, bool) {
return os.LookupEnv(k)
}

0 comments on commit 5af95e8

Please sign in to comment.