Skip to content

Commit

Permalink
[fraud-detection] rename frauddetectionservice to fraud-detection (#1862
Browse files Browse the repository at this point in the history
)

* rename frauddetectionservice to fraud-detection

* rename frauddetectionservice to fraud-detection

---------

Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
  • Loading branch information
puckpuck and julianocosta89 authored Dec 23, 2024
1 parent 969fe3b commit 3868f0e
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ EMAIL_ADDR=http://email:${EMAIL_PORT}
EMAIL_DOCKERFILE=./src/email/Dockerfile

# Fraud Service
FRAUD_SERVICE_DOCKERFILE=./src/frauddetectionservice/Dockerfile
FRAUD_DOCKERFILE=./src/fraud-detection/Dockerfile

# Frontend
FRONTEND_PORT=8080
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/component-build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ jobs:
tag_suffix: email
context: ./
setup-qemu: true
- file: ./src/frauddetectionservice/Dockerfile
tag_suffix: frauddetectionservice
- file: ./src/fraud-detection/Dockerfile
tag_suffix: fraud-detection
context: ./
setup-qemu: true
- file: ./src/frontend/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test/tracetesting/tracetesting-vars.yaml
/src/featureflagservice/src/ffs_demo_pb.erl
/src/featureflagservice/src/ffs_service_*.erl
/src/featureflagservice/src/oteldemo_*.erl
/src/frauddetectionservice/src/main/proto
/src/fraud-detection/src/main/proto
/src/frontend/pb/
/src/frontend/protos/
/src/paymentservice/demo.proto
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ the release.
([#1858](https://github.com/open-telemetry/opentelemetry-demo/pull/1858))
* [email] rename emailservice to email
([#1861](https://github.com/open-telemetry/opentelemetry-demo/pull/1861))
* [fraud-detection] rename frauddetectionservice to fraud-detection
([#1862](https://github.com/open-telemetry/opentelemetry-demo/pull/1862))

## 1.12.0

Expand Down
2 changes: 1 addition & 1 deletion docker-compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
condition: service_started
email:
condition: service_started
frauddetectionservice:
fraud-detection:
condition: service_started
frontend:
condition: service_started
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ services:
logging: *logging

# Fraud Detection service
frauddetectionservice:
image: ${IMAGE_NAME}:${DEMO_VERSION}-frauddetectionservice
container_name: frauddetection-service
fraud-detection:
image: ${IMAGE_NAME}:${DEMO_VERSION}-fraud-detection
container_name: fraud-detection
build:
context: ./
dockerfile: ${FRAUD_SERVICE_DOCKERFILE}
dockerfile: ${FRAUD_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice
- ${IMAGE_NAME}:${IMAGE_VERSION}-fraud-detection
args:
OTEL_JAVA_AGENT_VERSION: ${OTEL_JAVA_AGENT_VERSION}
deploy:
Expand All @@ -244,7 +244,7 @@ services:
- OTEL_INSTRUMENTATION_KAFKA_EXPERIMENTAL_SPAN_ATTRIBUTES=true
- OTEL_INSTRUMENTATION_MESSAGING_EXPERIMENTAL_RECEIVE_TELEMETRY_ENABLED=true
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=frauddetectionservice
- OTEL_SERVICE_NAME=fraud-detection
depends_on:
otel-collector:
condition: service_started
Expand Down
4 changes: 2 additions & 2 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"groupName": "featureflagservice",
},
{
"matchFileNames": ["src/frauddetectionservice/**"],
"groupName": "frauddetectionservice",
"matchFileNames": ["src/fraud-detection/**"],
"groupName": "fraud-detection",
},
{
"matchFileNames": ["src/frontend/**"],
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM --platform=${BUILDPLATFORM} gradle:8-jdk17 AS builder

WORKDIR /usr/src/app/

COPY ./src/frauddetectionservice/ ./
COPY ./src/fraud-detection/ ./
COPY ./pb/ ./src/main/proto/
RUN gradle shadowJar

Expand All @@ -17,8 +17,8 @@ FROM gcr.io/distroless/java17-debian11
ARG OTEL_JAVA_AGENT_VERSION
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/build/libs/frauddetectionservice-1.0-all.jar ./
COPY --from=builder /usr/src/app/build/libs/fraud-detection-1.0-all.jar ./
ADD --chmod=644 https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$OTEL_JAVA_AGENT_VERSION/opentelemetry-javaagent.jar /app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS=-javaagent:/app/opentelemetry-javaagent.jar

ENTRYPOINT [ "java", "-jar", "frauddetectionservice-1.0-all.jar" ]
ENTRYPOINT [ "java", "-jar", "fraud-detection-1.0-all.jar" ]
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ cp -r ../../pb/ src/main/proto/
To build using Docker run from the repo root:

```sh
docker build -f ./src/frauddetectionservice/Dockerfile .
docker build -f ./src/fraud-detection/Dockerfile .
```
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ protobuf {
}

application {
mainClass.set("frauddetectionservice.MainKt")
mainClass.set("frauddetection.MainKt")
}

tasks.jar {
manifest.attributes["Main-Class"] = "frauddetectionservice.MainKt"
manifest.attributes["Main-Class"] = "frauddetection.MainKt"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/fraud-detection/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

rootProject.name = "fraud-detection"

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package frauddetectionservice
package frauddetection

import org.apache.kafka.clients.consumer.ConsumerConfig.*
import org.apache.kafka.clients.consumer.KafkaConsumer
Expand All @@ -24,7 +24,7 @@ import dev.openfeature.sdk.Value
import dev.openfeature.sdk.OpenFeatureAPI

const val topic = "orders"
const val groupID = "frauddetectionservice"
const val groupID = "fraud-detection"

private val logger: Logger = LogManager.getLogger(groupID)

Expand Down
3 changes: 0 additions & 3 deletions src/frauddetectionservice/settings.gradle.kts

This file was deleted.

0 comments on commit 3868f0e

Please sign in to comment.