Skip to content

Commit

Permalink
[BLD] Sync internal log service changes to OSS
Browse files Browse the repository at this point in the history
  • Loading branch information
eculver committed Dec 10, 2024
1 parent 702aec7 commit 65b86bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
14 changes: 6 additions & 8 deletions go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ ADD ./go/ ./
ENV GOCACHE=/root/.cache/go-build
RUN --mount=type=cache,target="/root/.cache/go-build" make

FROM debian:bookworm-slim as log
COPY --from=builder /build-dir/bin/logservice .
ENV PATH=$PATH:./
CMD ["./logservice"]

FROM debian:bookworm-slim as sysdb
COPY --from=builder /build-dir/bin/coordinator .
ENV PATH=$PATH:./

CMD /bin/bash


FROM debian:bookworm-slim as logservice
WORKDIR /app
COPY --from=builder /build-dir/bin/logservice .
CMD ["./logservice"]
CMD /bin/bash
3 changes: 2 additions & 1 deletion go/cmd/logservice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/chroma-core/chroma/go/pkg/utils"
libs "github.com/chroma-core/chroma/go/shared/libs"
"github.com/chroma-core/chroma/go/shared/otel"
sharedOtel "github.com/chroma-core/chroma/go/shared/otel"
"github.com/pingcap/log"
"github.com/rs/zerolog"
"go.uber.org/automaxprocs/maxprocs"
Expand Down Expand Up @@ -52,7 +53,7 @@ func main() {
if err != nil {
log.Fatal("failed to listen", zap.Error(err))
}
s := grpc.NewServer(grpc.UnaryInterceptor(otel.ServerGrpcInterceptor))
s := grpc.NewServer(grpc.UnaryInterceptor(sharedOtel.ServerGrpcInterceptor))
logservicepb.RegisterLogServiceServer(s, server)
log.Info("log service started", zap.String("address", listener.Addr().String()))
go leader.AcquireLeaderLock(ctx, func(ctx context.Context) {
Expand Down

0 comments on commit 65b86bf

Please sign in to comment.