mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-24 17:00:21 -05:00
Add node name to early boot logging (#323)
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
parent
050e8fdc4a
commit
19b731b5f7
@ -39,9 +39,16 @@ func NewLogger(ctx context.Context, metadata *Metadata) (*Logger, error) {
|
|||||||
if resp.Properties == nil || resp.Properties.InstrumentationKey == nil {
|
if resp.Properties == nil || resp.Properties.InstrumentationKey == nil {
|
||||||
return nil, errors.New("unable to get instrumentation key")
|
return nil, errors.New("unable to get instrumentation key")
|
||||||
}
|
}
|
||||||
|
client := appinsights.NewTelemetryClient(*resp.Properties.InstrumentationKey)
|
||||||
|
|
||||||
|
instance, err := metadata.GetInstance(ctx, providerID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client.Context().CommonProperties["instance-name"] = instance.Name
|
||||||
|
|
||||||
return &Logger{
|
return &Logger{
|
||||||
client: appinsights.NewTelemetryClient(*resp.Properties.InstrumentationKey),
|
client: client,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user