Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
deniseli committed Jul 22, 2024
1 parent 2f548a6 commit c896c64
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion cmd/ftl/cmd_serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (s *serveCmd) run(ctx context.Context, projConfig projectconfig.Config, ini

err = observability.Init(ctx, "ftl-serve", ftl.Version, s.ObservabilityConfig)
if err != nil {
return err
return fmt.Errorf("observability init failed: %w", err)
}

wg, ctx := errgroup.WithContext(ctx)
Expand Down
16 changes: 0 additions & 16 deletions go-runtime/ftl/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"reflect"

"connectrpc.com/connect"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/metric"

ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1"
"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"
Expand All @@ -19,20 +17,6 @@ import (
)

func call[Req, Resp any](ctx context.Context, callee reflection.Ref, req Req, inline Verb[Req, Resp]) (resp Resp, err error) {
// This is a test metric to make sure we actually propogate everything through the
// observability path correctly. In the future, errors should be tracked through
// otel logs instead of being swallowed as they are here. Error is swallowed to
// guarantee no impact to customers.
counter, err := otel.GetMeterProvider().Meter("ftl_verb_123").Int64Counter(
"verb_call",
metric.WithDescription("Count of FTL verb calls via the controller"),
metric.WithUnit("requests"))
if err != nil {
// log it
} else {
counter.Add(ctx, 1)
}

moduleCtx := modulecontext.FromContext(ctx).CurrentContext()
override, err := moduleCtx.BehaviorForVerb(schema.Ref{Module: callee.Module, Name: callee.Name})
if err != nil {
Expand Down

0 comments on commit c896c64

Please sign in to comment.