Skip to content

Commit

Permalink
FACT-1729 Investigate reducing dependency Azure logs (#2592)
Browse files Browse the repository at this point in the history
* - tries to reduce dependency logs

* - fix conditional by changing to OR

* - adds some warning logs

* - adds some info logs

* - override sampling dependency type insights

* - adds health request to sampling override

* - revert appinsight changes

* - adds send letter mock to readme
  • Loading branch information
RuthKirby authored Sep 10, 2024
1 parent a9078a0 commit d392d6d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* [Locally](#locally)
* [Docker environment](#docker-environment)
* [Onboarding new services](#onboarding-new-services)
* [Manual Testing](#manual-testing)
* [License](#license)

## Overview
Expand Down Expand Up @@ -229,6 +230,10 @@ A letter can be in one of the following statuses:
* `Aborted` - processing of the letter has been aborted (result of a manual intervention)
* `Skipped` - letter was skipped due to an unrecoverable issue (requires manual action)
## Manual Testing
You can test the different environments of Send Letter Service by using [Send Letter Mock](https://github.com/hmcts/send-letter-mock).
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
Expand Down
21 changes: 21 additions & 0 deletions lib/applicationinsights.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,26 @@
"connectionString": "${file:/mnt/secrets/rpe-send-letter/APP_INSIGHTS_CONNECTION_STRING}",
"role": {
"name": "rpe-send-letter-service"
},
"preview": {
"sampling": {
"overrides": [
{
"telemetryType": "request",
"attributes": [
{
"key": "http.url",
"value": "https?://[^/]+/health.*",
"matchType": "regexp"
}
],
"percentage": 1
},
{
"telemetryType": "dependency",
"percentage": 0
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class AppInsights {
static final DateTimeFormatter DATE_TIME_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

private final TelemetryClient telemetryClient = new TelemetryClient();


public AppInsights() {

Expand Down

0 comments on commit d392d6d

Please sign in to comment.