Skip to content

Commit e54439d

Browse files
[accounting]: rename accountingservice to accounting (open-telemetry#1827)
* rename accountingservice to accounting * Add ignore protos back --------- Co-authored-by: Juliano Costa <[email protected]>
1 parent 5f28491 commit e54439d

18 files changed

+34
-32
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative
4646
# Core Demo Services
4747
# ******************
4848
# Accounting Service
49-
ACCOUNTING_SERVICE_DOCKERFILE=./src/accountingservice/Dockerfile
49+
ACCOUNTING_DOCKERFILE=./src/accounting/Dockerfile
5050

5151
# Ad Service
5252
AD_SERVICE_PORT=9555

.github/workflows/component-build-images.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
fail-fast: false
5252
matrix:
5353
file_tag:
54-
- file: ./src/accountingservice/Dockerfile
55-
tag_suffix: accountingservice
54+
- file: ./src/accounting/Dockerfile
55+
tag_suffix: accounting
5656
context: ./
5757
setup-qemu: true
5858
- file: ./src/adservice/Dockerfile

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ src/shippingservice/target/
4343
test/tracetesting/tracetesting-vars.yaml
4444

4545
# Ignore copied/generated protobuf files
46+
/src/accounting/src/protos/
4647
/src/cartservice/src/protos/
4748
/src/featureflagservice/proto/
4849
/src/featureflagservice/src/ffs_demo_pb.erl
@@ -54,4 +55,3 @@ test/tracetesting/tracetesting-vars.yaml
5455
/src/paymentservice/demo.proto
5556
/src/shippingservice/proto/
5657
/src/currencyservice/proto
57-
/src/accountingservice/genproto

.licenserc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
],
3939
"ignore": [
4040
"node_modules/",
41-
"src/accountingservice/genproto/",
41+
"/src/accounting/src/protos/",
4242
"src/cartservice/src/obj/",
4343
"src/cartservice/tests/obj/",
4444
"src/checkoutservice/genproto/",

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ the release.
2525
([#1794](https://github.com/open-telemetry/opentelemetry-demo/pull/1784))
2626
* [paymentservice] Add nodejs instrumentation for runtime metrics
2727
([#1797](https://github.com/open-telemetry/opentelemetry-demo/pull/1797))
28+
* [accounting] rename accountingservice to accounting
29+
([#1827](https://github.com/open-telemetry/opentelemetry-demo/pull/1827))
2830

2931
## 1.12.0
3032

docker-compose-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ services:
5757
tracetest-server:
5858
condition: service_healthy
5959
# adding demo services as dependencies
60-
accountingservice:
60+
accounting:
6161
condition: service_started
6262
adservice:
6363
condition: service_started

docker-compose.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ services:
1818
# Core Demo Services
1919
# ******************
2020
# Accounting service
21-
accountingservice:
22-
image: ${IMAGE_NAME}:${DEMO_VERSION}-accountingservice
23-
container_name: accounting-service
21+
accounting:
22+
image: ${IMAGE_NAME}:${DEMO_VERSION}-accounting
23+
container_name: accounting
2424
build:
2525
context: ./
26-
dockerfile: ${ACCOUNTING_SERVICE_DOCKERFILE}
26+
dockerfile: ${ACCOUNTING_DOCKERFILE}
2727
cache_from:
28-
- ${IMAGE_NAME}:${IMAGE_VERSION}-accountingservice
28+
- ${IMAGE_NAME}:${IMAGE_VERSION}-accounting
2929
deploy:
3030
resources:
3131
limits:
@@ -36,7 +36,7 @@ services:
3636
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
3737
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
3838
- OTEL_RESOURCE_ATTRIBUTES
39-
- OTEL_SERVICE_NAME=accountingservice
39+
- OTEL_SERVICE_NAME=accounting
4040
depends_on:
4141
otelcol:
4242
condition: service_started

docker-gen-proto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ gen_proto_python() {
2121
python -m grpc_tools.protoc -I /build/pb/ --python_out="./src/$1/" --grpc_python_out="./src/$1/" /build/pb/demo.proto
2222
}
2323

24-
#gen_proto_dotnet accountingservice
24+
#gen_proto_dotnet accounting
2525
#gen_proto_java adservice
2626
#gen_proto_dotnet cartservice
2727
gen_proto_go checkoutservice

ide-gen-proto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ gen_proto_ts() {
6565
cd "$base_dir" || return
6666
}
6767

68-
gen_proto_dotnet accountingservice
68+
gen_proto_dotnet accounting
6969
# gen_proto_java adservice
7070
gen_proto_dotnet cartservice
7171
gen_proto_go checkoutservice

renovate.json5

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
"packageRules": [
1717
{
18-
"matchFileNames": ["src/accountingservice/**"],
19-
"groupName": "accountingservice",
18+
"matchFileNames": ["src/accounting/**"],
19+
"groupName": "accounting",
2020
},
2121
{
2222
"matchFileNames": ["src/adservice/**"],

src/accountingservice/AccountingService.sln src/accounting/Accounting.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.9.34701.34
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AccountingService", "AccountingService.csproj", "{C66C35E2-DF04-4DCF-8F6A-87B6D6433FF6}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Accounting", "Accounting.csproj", "{C66C35E2-DF04-4DCF-8F6A-87B6D6433FF6}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/accountingservice/Consumer.cs src/accounting/Consumer.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using Microsoft.Extensions.Logging;
66
using Oteldemo;
77

8-
namespace AccountingService;
8+
namespace Accounting;
99

1010
internal class Consumer : IDisposable
1111
{
@@ -74,7 +74,7 @@ private IConsumer<string, byte[]> BuildConsumer(string servers)
7474
{
7575
var conf = new ConsumerConfig
7676
{
77-
GroupId = $"accountingservice",
77+
GroupId = $"accounting",
7878
BootstrapServers = servers,
7979
// https://github.com/confluentinc/confluent-kafka-dotnet/tree/07de95ed647af80a0db39ce6a8891a630423b952#basic-consumer-example
8080
AutoOffsetReset = AutoOffsetReset.Earliest,

src/accountingservice/Dockerfile src/accounting/Dockerfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:8.0 AS builder
55
ARG TARGETARCH
66
ARG BUILD_CONFIGURATION=Release
77
WORKDIR /src
8-
COPY ["/src/accountingservice/", "AccountingService/"]
9-
COPY ["/pb/demo.proto", "AccountingService/proto/"]
10-
RUN dotnet restore "./AccountingService/AccountingService.csproj" -r linux-$TARGETARCH
11-
WORKDIR "/src/AccountingService"
8+
COPY ["/src/accounting/", "Accounting/"]
9+
COPY ["/pb/demo.proto", "Accounting/proto/"]
10+
RUN dotnet restore "./Accounting/Accounting.csproj" -r linux-$TARGETARCH
11+
WORKDIR "/src/Accounting"
1212

13-
RUN dotnet build "./AccountingService.csproj" -r linux-$TARGETARCH -c $BUILD_CONFIGURATION -o /app/build
13+
RUN dotnet build "./Accounting.csproj" -r linux-$TARGETARCH -c $BUILD_CONFIGURATION -o /app/build
1414

1515
# -----------------------------------------------------------------------------
1616

1717
FROM builder AS publish
1818
ARG TARGETARCH
1919
ARG BUILD_CONFIGURATION=Release
20-
RUN dotnet publish "./AccountingService.csproj" -r linux-$TARGETARCH -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
20+
RUN dotnet publish "./Accounting.csproj" -r linux-$TARGETARCH -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
2121

2222
# -----------------------------------------------------------------------------
2323

@@ -32,4 +32,4 @@ RUN chown app "/var/log/opentelemetry/dotnet"
3232
RUN chown app "/app/instrument.sh"
3333
USER app
3434

35-
ENTRYPOINT ["./instrument.sh", "dotnet", "AccountingService.dll"]
35+
ENTRYPOINT ["./instrument.sh", "dotnet", "Accounting.dll"]

src/accountingservice/Helpers.cs src/accounting/Helpers.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using System.Collections;
55

6-
namespace AccountingService
6+
namespace Accounting
77
{
88
internal static class Helpers
99
{

src/accountingservice/Log.cs src/accounting/Log.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Microsoft.Extensions.Logging;
55
using Oteldemo;
66

7-
namespace AccountingService
7+
namespace Accounting
88
{
99
internal static partial class Log
1010
{

src/accountingservice/Program.cs src/accounting/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
using AccountingService;
4+
using Accounting;
55
using Microsoft.Extensions.DependencyInjection;
66
using Microsoft.Extensions.Hosting;
77

src/accountingservice/README.md src/accounting/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This service consumes new orders from a Kafka topic.
77
To build the service binary, run:
88

99
```sh
10-
cp pb/demo.proto src/accoutingservice/proto/demo.proto # root context
10+
cp pb/demo.proto src/accouting/proto/demo.proto # root context
1111
dotnet build # accounting service context
1212
```
1313

@@ -16,13 +16,13 @@ dotnet build # accounting service context
1616
From the root directory, run:
1717

1818
```sh
19-
docker compose build accountingservice
19+
docker compose build accounting
2020
```
2121

2222
## Bump dependencies
2323

2424
To bump all dependencies run in Package manager:
2525

2626
```sh
27-
Update-Package -ProjectName AccountingService
27+
Update-Package -ProjectName Accounting
2828
```

0 commit comments

Comments
 (0)