Skip to content

Commit 2c5c95c

Browse files
committed
fix: use uuid instead of metricreport.EphemeralID()
1 parent 62efd60 commit 2c5c95c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libbeat/cmd/instance/beat.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ func NewBeat(name, indexPrefix, v string, elasticLicensed bool, initFuncs []func
237237
return nil, err
238238
}
239239

240+
ephemeralID, err := uuid.NewV4()
241+
if err != nil {
242+
return nil, err
243+
}
244+
240245
b := beat.Beat{
241246
Info: beat.Info{
242247
Beat: name,
@@ -248,7 +253,7 @@ func NewBeat(name, indexPrefix, v string, elasticLicensed bool, initFuncs []func
248253
ID: id,
249254
FirstStart: time.Now(),
250255
StartTime: time.Now(),
251-
EphemeralID: metricreport.EphemeralID(),
256+
EphemeralID: ephemeralID,
252257
FIPSDistribution: version.FIPSDistribution,
253258
},
254259
Fields: fields,

0 commit comments

Comments
 (0)