Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate protobuf files #1359

Merged
merged 2 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions certificate-authority/pb/cert.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions certificate-authority/pb/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion certificate-authority/pb/service.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 37 additions & 46 deletions certificate-authority/pb/service_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions certificate-authority/pb/signingRecords.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions coap-gateway/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,12 @@ func New(ctx context.Context, config Config, fileWatcher *fsnotify.Watcher, logg
tracerProvider: tracerProvider,
}

return s.createServices(fileWatcher, logger)
ss, err := s.createServices(fileWatcher, logger)
if err != nil {
nats.Close()
return nil, fmt.Errorf("cannot create services: %w", err)
}
return ss, nil
}

func getDeviceID(client *session) string {
Expand Down Expand Up @@ -410,7 +415,7 @@ func (s *Service) processCommandTask(req *mux.Message, client *session, span tra
span.SetStatus(otelCodes.Error, err.Error())
}
if resp != nil {
otelcoap.MessageSentEvent(req.Context(), resp)
otelcoap.MessageSentEvent(req.Context(), otelcoap.MakeMessage(resp))
span.SetAttributes(otelcoap.StatusCodeAttr(resp.Code()))
}
client.logRequestResponse(req, resp, err)
Expand All @@ -426,7 +431,7 @@ func (s *Service) makeCommandTask(req *mux.Message, client *session, fnc func(re
ctx, span := otelcoap.Start(req.Context(), path, req.Code().String(), otelcoap.WithTracerProvider(s.tracerProvider), otelcoap.WithSpanOptions(trace.WithSpanKind(trace.SpanKindServer)))
span.SetAttributes(semconv.NetPeerNameKey.String(client.deviceID()))
req.SetContext(ctx)
otelcoap.MessageReceivedEvent(ctx, req.Message)
otelcoap.MessageReceivedEvent(ctx, otelcoap.MakeMessage(req.Message))
otelcoap.SetRequest(ctx, req.Message)

x := struct {
Expand Down
4 changes: 2 additions & 2 deletions coap-gateway/service/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@ func (c *session) do(req *pool.Message) (*pool.Message, error) {
defer span.End()
span.SetAttributes(semconv.NetPeerNameKey.String(c.deviceID()))

otelcoap.MessageSentEvent(ctx, req)
otelcoap.MessageSentEvent(ctx, otelcoap.MakeMessage(req))

resp, err := c.coapConn.Do(req)
if err != nil {
span.RecordError(err)
span.SetStatus(otelCodes.Error, err.Error())
return nil, err
}
otelcoap.MessageReceivedEvent(ctx, resp)
otelcoap.MessageReceivedEvent(ctx, otelcoap.MakeMessage(resp))
span.SetAttributes(otelcoap.StatusCodeAttr(resp.Code()))

return resp, nil
Expand Down
Loading
Loading