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

Upstream updates #52

Merged
merged 6 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ PROMETHEUS_SERVICE_PORT=9090
PROMETHEUS_SERVICE_HOST=prometheus
PROMETHEUS_ADDR=${PROMETHEUS_SERVICE_HOST}:${PROMETHEUS_SERVICE_PORT}

# OpenSearch versionins
VERSION=2.8.0

# OpenSearch Node1
OPENSEARCH1_PORT=9200
OPENSEARCH1_HOST=opensearch-node1
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,13 @@ src/frontend/cypress/screenshots
src/shippingservice/target/

# Ignore copied/generated protobuf files
/src/accountingservice/genproto/
/src/cartservice/src/protos/
/src/checkoutservice/genproto/
/src/featureflagservice/proto/
/src/featureflagservice/src/ffs_demo_pb.erl
/src/featureflagservice/src/ffs_service_*.erl
/src/featureflagservice/src/oteldemo_*.erl
/src/frontend/pb/
/src/frontend/protos/
/src/paymentservice/demo.proto
/src/productcatalogservice/genproto/
/src/recommendationservice/demo_pb2*.py
/src/shippingservice/proto/
3 changes: 3 additions & 0 deletions .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
],
"ignore": [
"node_modules/",
"src/accountingservice/genproto/",
"src/cartservice/src/obj/",
"src/cartservice/tests/obj/",
"src/checkoutservice/genproto/",
"src/featureflagservice/assets/vendor/",
"src/featureflagservice/priv/",
"src/productcatalogservice/genproto/",
"internal/tools/"
]
}
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ We welcome any vendor to fork the project to demonstrate their services and
adding a link below. The community is committed to maintaining the project and
keeping it up to date for you.

| | | |
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |----------------------------------------------------------------------------------------------|
| [AlibabaCloud LogService](https://github.com/aliyun-sls/opentelemetry-demo) | [Grafana Labs](https://github.com/grafana/opentelemetry-demo) | [Sentry](https://github.com/getsentry/opentelemetry-demo) |
| [AppDynamics](https://www.appdynamics.com/blog/cloud/how-to-observe-opentelemetry-demo-app-in-appdynamics-cloud/) | [Helios](https://otelsandbox.gethelios.dev) | [Splunk](https://github.com/signalfx/opentelemetry-demo) |
| [Aspecto](https://github.com/aspecto-io/opentelemetry-demo) | [Honeycomb.io](https://github.com/honeycombio/opentelemetry-demo) | [Sumo Logic](https://www.sumologic.com/blog/common-opentelemetry-demo-application/) |
| [Coralogix](https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix) | [Instana](https://github.com/instana/opentelemetry-demo) | [TelemetryHub](https://github.com/TelemetryHub/opentelemetry-demo/tree/telemetryhub-backend) |
| [Datadog](https://github.com/DataDog/opentelemetry-demo) | [Kloudfuse](https://github.com/kloudfuse/opentelemetry-demo) | [Teletrace](https://github.com/teletrace/opentelemetry-demo) |
| [Dynatrace](https://www.dynatrace.com/news/blog/opentelemetry-demo-application-with-dynatrace/) | [Lightstep](https://github.com/lightstep/opentelemetry-demo) | [Uptrace](https://github.com/uptrace/uptrace/tree/master/example/opentelemetry-demo) |
| [Elastic](https://github.com/elastic/opentelemetry-demo) | [New Relic](https://github.com/newrelic/opentelemetry-demo) | [OpenSearch](https://github.com/opensearch-project/opentelemetry-demo) |
| | | |
| | | |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [AlibabaCloud LogService](https://github.com/aliyun-sls/opentelemetry-demo) | [Elastic](https://github.com/elastic/opentelemetry-demo) | [OpenSearch](https://github.com/opensearch-project/opentelemetry-demo) |
| [AppDynamics](https://www.appdynamics.com/blog/cloud/how-to-observe-opentelemetry-demo-app-in-appdynamics-cloud/) | [Grafana Labs](https://github.com/grafana/opentelemetry-demo) | [Sentry](https://github.com/getsentry/opentelemetry-demo) |
| [Aspecto](https://github.com/aspecto-io/opentelemetry-demo) | [Helios](https://otelsandbox.gethelios.dev) | [Splunk](https://github.com/signalfx/opentelemetry-demo) |
| [Axiom](https://play.axiom.co/axiom-play-qf1k/dashboards/otel.traces.otel-demo-traces) | [Honeycomb.io](https://github.com/honeycombio/opentelemetry-demo) | [Sumo Logic](https://www.sumologic.com/blog/common-opentelemetry-demo-application/) |
| [Azure Data Explorer](https://github.com/Azure/Azure-kusto-opentelemetry-demo) | [Instana](https://github.com/instana/opentelemetry-demo) | [TelemetryHub](https://github.com/TelemetryHub/opentelemetry-demo/tree/telemetryhub-backend) |
| [Coralogix](https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix) | [Kloudfuse](https://github.com/kloudfuse/opentelemetry-demo) | [Teletrace](https://github.com/teletrace/opentelemetry-demo) |
| [Datadog](https://github.com/DataDog/opentelemetry-demo) | [Lightstep](https://github.com/lightstep/opentelemetry-demo) | [Uptrace](https://github.com/uptrace/uptrace/tree/master/example/opentelemetry-demo) |
| [Dynatrace](https://www.dynatrace.com/news/blog/opentelemetry-demo-application-with-dynatrace/) | [New Relic](https://github.com/newrelic/opentelemetry-demo) | |

## Contributing

Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ services:

# OpenSearch store - node1
opensearch-node1: # This is also the hostname of the container within the Docker network (i.e. https://opensearch-node1/)
image: opensearchproject/opensearch:2.7.0 # Specifying the latest available image - modify if you want a specific version
image: opensearchproject/opensearch:2.8.0 # Specifying the latest available image - modify if you want a specific version
YANG-DB marked this conversation as resolved.
Show resolved Hide resolved
container_name: opensearch-node1
environment:
- cluster.name=opensearch-cluster # Name the cluster
Expand Down Expand Up @@ -741,7 +741,7 @@ services:

# OpenSearch store - node2
opensearch-node2:
image: opensearchproject/opensearch:2.7.0 # This should be the same image used for opensearch-node1 to avoid issues
image: opensearchproject/opensearch:2.8.0 # This should be the same image used for opensearch-node1 to avoid issues
container_name: opensearch-node2
environment:
- cluster.name=opensearch-cluster
Expand All @@ -762,7 +762,7 @@ services:

# OpenSearch store - dashboard
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:2.7.0 # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
image: opensearchproject/opensearch-dashboards:2.8.0 # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
container_name: opensearch-dashboards
ports:
- 5601:5601 # Map host port 5601 to container port 5601
Expand Down
114 changes: 114 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"schedule": "every weekend",
"packageRules": [
{
"matchPaths": ["*"],
"ignorePaths": ["src/"],
"groupName": "config-no-service"
},
{
"matchPaths": ["src/accountingservice"],
"groupName": "accountingservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/adservice"],
"groupName": "adservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/cartservice"],
"groupName": "cartservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/checkoutservice"],
"groupName": "checkoutservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/currencyservice"],
"groupName": "currencyservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/emailservice"],
"groupName": "emailservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/featureflagservice"],
"groupName": "featureflagservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/frauddetectionservice"],
"groupName": "frauddetectionservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/frontend"],
"groupName": "frontend",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/frontendproxy"],
"groupName": "frontendproxy",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/grafana"],
"groupName": "grafana",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/kakfa"],
"groupName": "kakfa",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/loadgenerator"],
"groupName": "loadgenerator",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/otelcollector"],
"groupName": "otelcollector",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/paymentservice"],
"groupName": "paymentservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/productcatalogservice"],
"groupName": "productcatalogservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/prometheus"],
"groupName": "prometheus",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/quoteservice"],
"groupName": "quoteservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/recommendationservice"],
"groupName": "recommendationservice",
"assigneesFromCodeOwners": true
},
{
"matchPaths": ["src/shippingservice"],
"groupName": "shippingservice",
"assigneesFromCodeOwners": true
}
]
}
18 changes: 1 addition & 17 deletions src/accountingservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,10 @@


FROM golang:1.19.2-alpine AS builder
RUN apk add build-base protobuf-dev protoc
RUN apk add --no-cache git
RUN apk add --no-cache curl

WORKDIR /usr/src/app/

# Restore dependencies
COPY ./src/accountingservice/ ./
COPY ./pb/ ./proto/

ENV GOPROXY=direct
ENV GOSUMDB=off

RUN go mod download
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2

# Build executable
RUN protoc -I ./proto/ ./proto/demo.proto --go_out=./ --go-grpc_out=./
RUN go build -o /go/bin/accountingservice/ ./
RUN go build -o /go/bin/accountingservice/

# -----------------------------------------------------------------------------

Expand Down
25 changes: 22 additions & 3 deletions src/accountingservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ This service consumes new orders from a Kafka topic.

## Local Build

To build the protos and the service binary, run:
To build the service binary, run:

```sh
protoc -I ../../pb/ ../../pb/demo.proto --go_out=./ --go-grpc_out=./
go build -o /go/bin/accountingservice/ ./
go build -o /go/bin/accountingservice/
```

## Docker Build
Expand All @@ -18,3 +17,23 @@ From the root directory, run:
```sh
docker compose build accountingservice
```

## Regenerate protos

> **Note**
> [`protoc`](https://grpc.io/docs/protoc-installation/) is required.

To regenerate gRPC code run:

```sh
go generate
```

## Bump dependencies

To bump all dependencies run:

```sh
go get -u -t ./...
go mod tidy
```
Loading