Skip to content

Commit

Permalink
LNK-3005: app-label-configuration (#489)
Browse files Browse the repository at this point in the history
### 🛠 Description of Changes

Please provide a high-level overview of the changes included in this PR.

### 🧪 Testing Performed

Please describe the testing that was performed on the changes included
in this PR.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new application-specific identifier for the Loki logging
service.
- Enhanced logging configuration by allowing dynamic reference to the
application name.

- **Bug Fixes**
- Improved configurability of the logging setup by replacing hardcoded
values with dynamic references.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
arianamihailescu authored Oct 2, 2024
2 parents 4df1192 + 1610501 commit be3006a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Java/measureeval/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ telemetry:
loki:
enabled: true
url: http://localhost:3100
app: link-dev

springdoc:
api-docs:
Expand Down
3 changes: 2 additions & 1 deletion Java/measureeval/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<springProperty scope="context" name="loki_enabled" source="loki.enabled"/>
<springProperty scope="context" name="loki_url" source="loki.url"/>
<springProperty scope="context" name="loki_app" source="loki.app" />

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
Expand All @@ -18,7 +19,7 @@
</http>
<format>
<label>
<pattern>app=link-cloud,component=MeasureEval,TraceId="%X{traceId}",SpanId="%X{spanId}"</pattern>
<pattern>app=${loki_app},component=MeasureEval,TraceId="%X{traceId}",SpanId="%X{spanId}"</pattern>
<readMarkers>true</readMarkers>
</label>
<message>
Expand Down

0 comments on commit be3006a

Please sign in to comment.