Skip to content

Commit b500279

Browse files
committed
Merge remote-tracking branch 'upstream/8.19' into mergify/bp/8.19/pr-11184
2 parents 944a2f5 + 55c694b commit b500279

36 files changed

+1346
-529
lines changed

.package-version

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"version": "8.19.8-SNAPSHOT",
3-
"build_id": "8.19.8-db23ff95",
4-
"manifest_url": "https://snapshots.elastic.co/8.19.8-db23ff95/manifest-8.19.8-SNAPSHOT.json",
5-
"summary_url": "https://snapshots.elastic.co/8.19.8-db23ff95/summary-8.19.8-SNAPSHOT.html",
3+
"build_id": "8.19.8-8c5a7a4e",
4+
"manifest_url": "https://snapshots.elastic.co/8.19.8-8c5a7a4e/manifest-8.19.8-SNAPSHOT.json",
5+
"summary_url": "https://snapshots.elastic.co/8.19.8-8c5a7a4e/summary-8.19.8-SNAPSHOT.html",
66
"core_version": "8.19.8",
7-
"stack_build_id": "8.19.8-db23ff95-SNAPSHOT"
7+
"stack_build_id": "8.19.8-8c5a7a4e-SNAPSHOT"
88
}

NOTICE-fips.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0.
787787

788788
--------------------------------------------------------------------------------
789789
Dependency : github.com/elastic/beats/v7
790-
Version: v7.0.0-alpha2.0.20251127212816-fc9026ef8c9c
790+
Version: v7.0.0-alpha2.0.20251201185915-932bd62f8ba6
791791
Licence type (autodetected): Elastic
792792
--------------------------------------------------------------------------------
793793

794-
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20251127212816-fc9026ef8c9c/LICENSE.txt:
794+
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20251201185915-932bd62f8ba6/LICENSE.txt:
795795

796796
Source code in this repository is variously licensed under the Apache License
797797
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
@@ -30500,11 +30500,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]/LI
3050030500

3050130501
--------------------------------------------------------------------------------
3050230502
Dependency : github.com/elastic/mito
30503-
Version: v1.23.0
30503+
Version: v1.24.0
3050430504
Licence type (autodetected): Apache-2.0
3050530505
--------------------------------------------------------------------------------
3050630506

30507-
Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v1.23.0/LICENSE:
30507+
Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v1.24.0/LICENSE:
3050830508

3050930509

3051030510
Apache License

NOTICE.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0.
787787

788788
--------------------------------------------------------------------------------
789789
Dependency : github.com/elastic/beats/v7
790-
Version: v7.0.0-alpha2.0.20251127212816-fc9026ef8c9c
790+
Version: v7.0.0-alpha2.0.20251201185915-932bd62f8ba6
791791
Licence type (autodetected): Elastic
792792
--------------------------------------------------------------------------------
793793

794-
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20251127212816-fc9026ef8c9c/LICENSE.txt:
794+
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20251201185915-932bd62f8ba6/LICENSE.txt:
795795

796796
Source code in this repository is variously licensed under the Apache License
797797
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
@@ -32020,11 +32020,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]/LI
3202032020

3202132021
--------------------------------------------------------------------------------
3202232022
Dependency : github.com/elastic/mito
32023-
Version: v1.23.0
32023+
Version: v1.24.0
3202432024
Licence type (autodetected): Apache-2.0
3202532025
--------------------------------------------------------------------------------
3202632026

32027-
Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v1.23.0/LICENSE:
32027+
Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v1.24.0/LICENSE:
3202832028

3202932029

3203032030
Apache License
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: bug-fix
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Ensure the self-monitoring configuration accounts for the runtime components actually run in.
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component: elastic-agent
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
#pr: https://github.com/owner/repo/1234
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
#issue: https://github.com/owner/repo/1234

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/docker/docker v28.5.1+incompatible
1515
github.com/docker/go-units v0.5.0
1616
github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5
17-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251127212816-fc9026ef8c9c
17+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251201185915-932bd62f8ba6
1818
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae
1919
github.com/elastic/elastic-agent-autodiscover v0.10.0
2020
github.com/elastic/elastic-agent-client/v7 v7.17.2
@@ -299,7 +299,7 @@ require (
299299
github.com/elastic/gokrb5/v8 v8.0.0-20251105095404-23cc45e6a102 // indirect
300300
github.com/elastic/gosigar v0.14.3 // indirect
301301
github.com/elastic/lunes v0.1.0 // indirect
302-
github.com/elastic/mito v1.23.0 // indirect
302+
github.com/elastic/mito v1.24.0 // indirect
303303
github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.20.0 // indirect
304304
github.com/elastic/opentelemetry-collector-components/extension/apikeyauthextension v0.22.0 // indirect
305305
github.com/elastic/opentelemetry-collector-components/extension/apmconfigextension v0.20.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti
488488
github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk=
489489
github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0=
490490
github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68=
491-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251127212816-fc9026ef8c9c h1:9LIUu4e27FXnV6Ww9BzHeHH9k+xMQ6hYkn2ce3xiQyk=
492-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251127212816-fc9026ef8c9c/go.mod h1:58O4n1hQ6Bw394Fu6aABP2Htbfe7OyDoF/IgZ+T29S0=
491+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251201185915-932bd62f8ba6 h1:ySOi1VdWuH52PlmhUHkpeapcH4O4jcdAizeDFoMfuEg=
492+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251201185915-932bd62f8ba6/go.mod h1:58O4n1hQ6Bw394Fu6aABP2Htbfe7OyDoF/IgZ+T29S0=
493493
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae h1:OiShmbWAyGU0MS0ADJWr1/QgeLIZliMk9xsrFicR3/s=
494494
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae/go.mod h1:D2IckZVXARugvikE4fv1glvaJMohKSZRzrPsxCjo9O0=
495495
github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0=
@@ -542,8 +542,8 @@ github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/u
542542
github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
543543
github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4=
544544
github.com/elastic/lunes v0.1.0/go.mod h1:xGphYIt3XdZRtyWosHQTErsQTd4OP1p9wsbVoHelrd4=
545-
github.com/elastic/mito v1.23.0 h1:V9wS2EWpKWibLP+0WE2CXr4J/Mt/IPj1G+zf/ELNp/I=
546-
github.com/elastic/mito v1.23.0/go.mod h1:h1V+8B62+DXsu0TstJkjsTh5ewJIDJlwzxPkP3HBM9s=
545+
github.com/elastic/mito v1.24.0 h1:JFviWHsJOepVuIgARirMwe9My/NXkEht5c/j0KptrRM=
546+
github.com/elastic/mito v1.24.0/go.mod h1:h1V+8B62+DXsu0TstJkjsTh5ewJIDJlwzxPkP3HBM9s=
547547
github.com/elastic/mock-es v0.0.0-20250530054253-8c3b6053f9b6 h1:JVNuBrmOoqLJgp9o68YBMnOrXCzQI3mCppW+suwRSlw=
548548
github.com/elastic/mock-es v0.0.0-20250530054253-8c3b6053f9b6/go.mod h1:cXqWcLnmu5y4QveTb2hjk7rgzkHMuZsqeXtbJpNAcu0=
549549
github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.20.0 h1:UXuHrl76EUHn+PIVEiVFqdGKZwzNLLfhnoBKfmuxSrk=

internal/edot/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.10
55
replace github.com/elastic/elastic-agent => ../../
66

77
require (
8-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251127212816-fc9026ef8c9c
8+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251201185915-932bd62f8ba6
99
github.com/elastic/elastic-agent v0.0.0-00010101000000-000000000000
1010
github.com/elastic/elastic-agent-libs v0.26.2
1111
github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.20.0
@@ -277,7 +277,7 @@ require (
277277
github.com/elastic/gokrb5/v8 v8.0.0-20251105095404-23cc45e6a102 // indirect
278278
github.com/elastic/gosigar v0.14.3 // indirect
279279
github.com/elastic/lunes v0.1.0 // indirect
280-
github.com/elastic/mito v1.23.0 // indirect
280+
github.com/elastic/mito v1.24.0 // indirect
281281
github.com/elastic/opentelemetry-collector-components/internal/sharedcomponent v0.0.0-20251113000200-a6f7cddc8520 // indirect
282282
github.com/elastic/opentelemetry-collector-components/processor/lsmintervalprocessor v0.20.0 // indirect
283283
github.com/elastic/opentelemetry-lib v0.26.0 // indirect

internal/edot/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti
415415
github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk=
416416
github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0=
417417
github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68=
418-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251127212816-fc9026ef8c9c h1:9LIUu4e27FXnV6Ww9BzHeHH9k+xMQ6hYkn2ce3xiQyk=
419-
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251127212816-fc9026ef8c9c/go.mod h1:58O4n1hQ6Bw394Fu6aABP2Htbfe7OyDoF/IgZ+T29S0=
418+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251201185915-932bd62f8ba6 h1:ySOi1VdWuH52PlmhUHkpeapcH4O4jcdAizeDFoMfuEg=
419+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251201185915-932bd62f8ba6/go.mod h1:58O4n1hQ6Bw394Fu6aABP2Htbfe7OyDoF/IgZ+T29S0=
420420
github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0=
421421
github.com/elastic/elastic-agent-autodiscover v0.10.0/go.mod h1:Nf3zh9FcJ9nTTswTwDTUAqXmvQllOrNliM6xmORSxwE=
422422
github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk4MDDLWA0d8iHHOxLA=
@@ -465,8 +465,8 @@ github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/u
465465
github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
466466
github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4=
467467
github.com/elastic/lunes v0.1.0/go.mod h1:xGphYIt3XdZRtyWosHQTErsQTd4OP1p9wsbVoHelrd4=
468-
github.com/elastic/mito v1.23.0 h1:V9wS2EWpKWibLP+0WE2CXr4J/Mt/IPj1G+zf/ELNp/I=
469-
github.com/elastic/mito v1.23.0/go.mod h1:h1V+8B62+DXsu0TstJkjsTh5ewJIDJlwzxPkP3HBM9s=
468+
github.com/elastic/mito v1.24.0 h1:JFviWHsJOepVuIgARirMwe9My/NXkEht5c/j0KptrRM=
469+
github.com/elastic/mito v1.24.0/go.mod h1:h1V+8B62+DXsu0TstJkjsTh5ewJIDJlwzxPkP3HBM9s=
470470
github.com/elastic/mock-es v0.0.0-20250530054253-8c3b6053f9b6 h1:JVNuBrmOoqLJgp9o68YBMnOrXCzQI3mCppW+suwRSlw=
471471
github.com/elastic/mock-es v0.0.0-20250530054253-8c3b6053f9b6/go.mod h1:cXqWcLnmu5y4QveTb2hjk7rgzkHMuZsqeXtbJpNAcu0=
472472
github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.20.0 h1:UXuHrl76EUHn+PIVEiVFqdGKZwzNLLfhnoBKfmuxSrk=

internal/pkg/agent/application/application.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func New(
132132
cfg.Settings.DownloadConfig.OS(),
133133
cfg.Settings.MonitoringConfig,
134134
agentInfo,
135+
log,
135136
)
136137

137138
runtime, err := runtime.NewManager(
@@ -148,7 +149,7 @@ func New(
148149

149150
var configMgr coordinator.ConfigManager
150151
var managed *managedConfigManager
151-
var compModifiers = []coordinator.ComponentsModifier{InjectAPMConfig}
152+
var compModifiers = []component.ComponentsModifier{InjectAPMConfig}
152153
var composableManaged bool
153154
var isManaged bool
154155
var actionAcker acker.Acker

internal/pkg/agent/application/coordinator/coordinator.go

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,6 @@ type VarsManager interface {
206206
Watch() <-chan []*transpiler.Vars
207207
}
208208

209-
// ComponentsModifier is a function that takes the computed components model and modifies it before
210-
// passing it into the components runtime manager.
211-
type ComponentsModifier func(comps []component.Component, cfg map[string]interface{}) ([]component.Component, error)
212-
213209
// managerShutdownTimeout is how long the coordinator will wait during shutdown
214210
// to receive termination states from its managers.
215211
// Note: The current timeout (5s) is shorter than the default stop timeout for
@@ -249,7 +245,7 @@ type Coordinator struct {
249245
otelCfg *confmap.Conf
250246

251247
caps capabilities.Capabilities
252-
modifiers []ComponentsModifier
248+
modifiers []component.ComponentsModifier
253249

254250
// The current state of the Coordinator. This value and its subfields are
255251
// safe to read directly from within the main Coordinator goroutine.
@@ -419,7 +415,7 @@ func New(
419415
otelMgr OTelManager,
420416
fleetAcker acker.Acker,
421417
initialUpgradeDetails *details.Details,
422-
modifiers ...ComponentsModifier,
418+
modifiers ...component.ComponentsModifier,
423419
) *Coordinator {
424420
var fleetState cproto.State
425421
var fleetMessage string
@@ -1656,17 +1652,10 @@ func (c *Coordinator) updateManagersWithConfig(model *component.Model) {
16561652
func (c *Coordinator) splitModelBetweenManagers(model *component.Model) (runtimeModel *component.Model, otelModel *component.Model) {
16571653
var otelComponents, runtimeComponents []component.Component
16581654
for _, comp := range model.Components {
1659-
c.maybeOverrideRuntimeForComponent(&comp)
16601655
switch comp.RuntimeManager {
16611656
case component.OtelRuntimeManager:
16621657
otelComponents = append(otelComponents, comp)
16631658
case component.ProcessRuntimeManager:
1664-
// Hack to fix https://github.com/elastic/elastic-agent/issues/11169
1665-
// TODO: Remove this after https://github.com/elastic/elastic-agent/issues/10220 is resolved
1666-
if comp.ID == "prometheus/metrics-monitoring" {
1667-
c.logger.Warnf("The Otel prometheus metrics monitoring input can't run in a beats process, skipping")
1668-
continue
1669-
}
16701659
runtimeComponents = append(runtimeComponents, comp)
16711660
default:
16721661
// this should be impossible if we parse the configuration correctly
@@ -1688,7 +1677,7 @@ func (c *Coordinator) splitModelBetweenManagers(model *component.Model) (runtime
16881677
// Normally, we use the runtime set in the component itself via the configuration, but
16891678
// we may also fall back to the process runtime if the otel runtime is unsupported for
16901679
// some reason. One example is the output using unsupported config options.
1691-
func (c *Coordinator) maybeOverrideRuntimeForComponent(comp *component.Component) {
1680+
func maybeOverrideRuntimeForComponent(logger *logger.Logger, comp *component.Component) {
16921681
if comp.RuntimeManager == component.ProcessRuntimeManager {
16931682
// do nothing, the process runtime can handle any component
16941683
return
@@ -1697,7 +1686,7 @@ func (c *Coordinator) maybeOverrideRuntimeForComponent(comp *component.Component
16971686
// check if the component is actually supported
16981687
err := translate.VerifyComponentIsOtelSupported(comp)
16991688
if err != nil {
1700-
c.logger.Warnf("otel runtime is not supported for component %s, switching to process runtime, reason: %v", comp.ID, err)
1689+
logger.Warnf("otel runtime is not supported for component %s, switching to process runtime, reason: %v", comp.ID, err)
17011690
comp.RuntimeManager = component.ProcessRuntimeManager
17021691
}
17031692
}
@@ -1756,8 +1745,15 @@ func (c *Coordinator) generateComponentModel() (err error) {
17561745
existingCompState[comp.Component.ID] = comp.State.Pid
17571746
}
17581747

1748+
otelRuntimeModifier := func(comps []component.Component, cfg map[string]interface{}) ([]component.Component, error) {
1749+
for i := range comps {
1750+
maybeOverrideRuntimeForComponent(c.logger, &comps[i])
1751+
}
1752+
return comps, nil
1753+
}
17591754
comps, err := c.specs.ToComponents(
17601755
cfg,
1756+
append(c.modifiers, otelRuntimeModifier),
17611757
configInjector,
17621758
c.state.LogLevel,
17631759
c.agentInfo,
@@ -1770,13 +1766,6 @@ func (c *Coordinator) generateComponentModel() (err error) {
17701766
// Filter any disallowed inputs/outputs from the components
17711767
comps = c.filterByCapabilities(comps)
17721768

1773-
for _, modifier := range c.modifiers {
1774-
comps, err = modifier(comps, cfg)
1775-
if err != nil {
1776-
return fmt.Errorf("failed to modify components: %w", err)
1777-
}
1778-
}
1779-
17801769
// If we made it this far, update our internal derived values and
17811770
// return with no error
17821771
c.derivedConfig = cfg

0 commit comments

Comments
 (0)