Skip to content

Commit

Permalink
Upstream changes needed merge (#41)
Browse files Browse the repository at this point in the history
* Commit generated Go code and bump dependencies (open-telemetry#946)

* accountingservice: commit generated code

bump deps

* license-checker to ignore genproto

* Update README.md

* Add comment to tools.go

* checkoutservice: commit generated code

bump dependencies

* productcatalogservice: commit generated code

bump dependencies

* Configure Renovate (open-telemetry#931)

* Add renovate.json

* only update otel deps

* update renovate config

* update renovate config

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: austinlparker <[email protected]>
Co-authored-by: Carter Socha <[email protected]>

* [cartservice] code cleanup (open-telemetry#943)

* File scope namespaces

* Sort modifiers

* Remove redundant type declaration

* Avoid hiding variables

* join declaration and assignment

* Use standard .NET convention for fields and consts

* inline out variable

* object initializer

* collection initializer

* drop unused using

* drop unused parameters

* remove redundant field initializer

---------

Co-authored-by: Austin Parker <[email protected]>

* Add Axiom to list of vendors (open-telemetry#963)

We would very much like to add [Axiom](axiom.co) to the list of vendors in the README. I linked a public demo dashboard that is feed by the demo.

---------

Signed-off-by: YANGDB <[email protected]>
Co-authored-by: Robert Pająk <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: austinlparker <[email protected]>
Co-authored-by: Carter Socha <[email protected]>
Co-authored-by: Piotr Kiełkowicz <[email protected]>
Co-authored-by: Lukas Malkmus <[email protected]>
  • Loading branch information
7 people committed Jul 8, 2023
1 parent 0b90026 commit 33de211
Show file tree
Hide file tree
Showing 38 changed files with 16,089 additions and 1,644 deletions.
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
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/[email protected]
RUN go install google.golang.org/grpc/cmd/[email protected]

# 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

0 comments on commit 33de211

Please sign in to comment.