This is a continuation of an issue here elastic/elastic-agent-shipper#6 (comment) that I discussed with @ph .
Basically, as we start work on https://github.com/elastic/elastic-agent-shipper, there's a great deal of overlapping functionality with agent, but a lot of that functionality isn't importable and/or lives in internal/ Part of that is the pprof HTTP init process, which (among other functions) is setupMetrics in internal/pkg/agent/cmd/run.go. There's also the various config objects in internal/pkg/core/monitoring/config/config.go. It would be relatively nice if we could make these more generic and move them into the elastic-agent-libs library, where we can then import them back into agent and the shipper.
This is a continuation of an issue here elastic/elastic-agent-shipper#6 (comment) that I discussed with @ph .
Basically, as we start work on https://github.com/elastic/elastic-agent-shipper, there's a great deal of overlapping functionality with agent, but a lot of that functionality isn't importable and/or lives in
internal/Part of that is the pprof HTTP init process, which (among other functions) issetupMetricsininternal/pkg/agent/cmd/run.go. There's also the various config objects ininternal/pkg/core/monitoring/config/config.go. It would be relatively nice if we could make these more generic and move them into theelastic-agent-libslibrary, where we can then import them back into agent and the shipper.