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

enhance metric support for product catalog service #231

Closed
Closed
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
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,12 @@ services:
dockerfile: ./src/productcatalogservice/Dockerfile
ports:
- "${PRODUCT_CATALOG_SERVICE_PORT}"
- "2112"
environment:
- PRODUCT_CATALOG_SERVICE_PORT
- FEATURE_FLAG_GRPC_SERVICE_ADDR
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
- OTEL_SERVICE_NAME=productcatalogservice
depends_on:
- otelcol
Expand Down
1 change: 1 addition & 0 deletions src/productcatalogservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ COPY ./src/productcatalogservice/products.json ./
COPY --from=builder /go/bin/productcatalogservice/ ./

EXPOSE ${PRODUCT_SERVICE_PORT}
EXPOSE 2112
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this port to the .env file, just to have more control over everything?

ENTRYPOINT [ "./productcatalogservice" ]
26 changes: 15 additions & 11 deletions src/productcatalogservice/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,35 @@ go 1.17

require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.7
github.com/sirupsen/logrus v1.8.1
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
google.golang.org/grpc v1.44.0
google.golang.org/grpc v1.46.2
)

require (
go.opentelemetry.io/otel/sdk v1.4.1
google.golang.org/protobuf v1.27.1
go.opentelemetry.io/contrib/instrumentation/runtime v0.34.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.31.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.31.0
go.opentelemetry.io/otel/metric v0.31.0
go.opentelemetry.io/otel/sdk v1.9.0
go.opentelemetry.io/otel/sdk/metric v0.31.0
go.opentelemetry.io/otel/trace v1.9.0
google.golang.org/protobuf v1.28.0
)

require (
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
github.com/go-logr/logr v1.2.2 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect
go.opentelemetry.io/otel/trace v1.4.1 // indirect
go.opentelemetry.io/proto/otlp v0.12.0 // indirect
go.opentelemetry.io/proto/otlp v0.18.0 // indirect
)

require (
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0
go.opentelemetry.io/otel v1.4.1
go.opentelemetry.io/otel v1.9.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/text v0.3.7 // indirect
Expand Down
Loading