Skip to content

Commit

Permalink
Merge pull request #7 from pagopa/PRDP-133-change-log-service-name
Browse files Browse the repository at this point in the history
[PRDP-133] fix: Change log service name
  • Loading branch information
pasqualespica authored Sep 13, 2023
2 parents 9796c42 + cdeb9b4 commit f38c895
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ microservice-chart:
CONSOLE_LOG_THRESHOLD: "DEBUG"
CONSOLE_LOG_PATTERN: "%d{HH:mm:ss.SSS}[%thread]%-5level%logger{36}-%msg%n"
CONSOLE_LOG_CHARSET: "UTF-8"
ECS_SERVICE_NAME: "pagopareceiptpdfgeneratorotl"
OTEL_RESOURCE_ATTRIBUTES: "service.name=pagopareceiptpdfgeneratorotl,deployment.environment=dev"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_LOGS_EXPORTER: none
Expand Down
1 change: 0 additions & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ microservice-chart:
CONSOLE_LOG_THRESHOLD: "DEBUG"
CONSOLE_LOG_PATTERN: "%d{HH:mm:ss.SSS}[%thread]%-5level%logger{36}-%msg%n"
CONSOLE_LOG_CHARSET: "UTF-8"
ECS_SERVICE_NAME: "pagopareceiptpdfgeneratorotl"
OTEL_RESOURCE_ATTRIBUTES: "service.name=pagopareceiptpdfgeneratorotl,deployment.environment=prod"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_LOGS_EXPORTER: none
Expand Down
1 change: 0 additions & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ microservice-chart:
CONSOLE_LOG_THRESHOLD: "DEBUG"
CONSOLE_LOG_PATTERN: "%d{HH:mm:ss.SSS}[%thread]%-5level%logger{36}-%msg%n"
CONSOLE_LOG_CHARSET: "UTF-8"
ECS_SERVICE_NAME: "pagopareceiptpdfgeneratorotl"
OTEL_RESOURCE_ATTRIBUTES: "service.name=pagopareceiptpdfgeneratorotl,deployment.environment=uat"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_LOGS_EXPORTER: none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public synchronized AppInfo getInfo() {
if (inputStream != null) {
properties.load(inputStream);
version = properties.getProperty("version", null);
name = properties.getProperty("artifactId", null);
name = properties.getProperty("name", null);
}
} catch (Exception e) {
logger.error("Impossible to retrieve information from pom.properties file.", e);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources-filtered/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=${project.version}
artifactId=${project.artifactId}
name=${project.name}
2 changes: 1 addition & 1 deletion src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<if condition='"TRUE".equalsIgnoreCase("${ENABLE_ECS_CONSOLE}")'>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="co.elastic.logging.logback.EcsEncoder">
<serviceName>${ECS_SERVICE_NAME}</serviceName>
<serviceName>${name}</serviceName>
<serviceVersion>${version}</serviceVersion>
<serviceEnvironment>${ENV}</serviceEnvironment>
</encoder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void runOK() {
assertNotNull(responseBody.getName());
assertNotNull(responseBody.getVersion());
assertNotNull(responseBody.getEnvironment());
assertEquals("receipt-pdf-generator", responseBody.getName());
assertEquals("pagopa-receipt-pdf-generator", responseBody.getName());
assertEquals("azure-fn", responseBody.getEnvironment());
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven
#Mon Jul 31 17:21:09 CEST 2023
groupId=it.gov.pagopa.receipt
artifactId=receipt-pdf-generator
name=pagopa-receipt-pdf-generator
version=x.y.z

0 comments on commit f38c895

Please sign in to comment.