mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04: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 {
|
||||
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{
|
||||
client: appinsights.NewTelemetryClient(*resp.Properties.InstrumentationKey),
|
||||
client: client,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user