Skip to content

Commit a051efe

Browse files
Updates to logs searching
Signed-off-by: Lukasz Gryglicki <[email protected]> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
1 parent e3fd390 commit a051efe

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CO_AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ We use internal caching while doing all those lookups with cache key `name` and
164164

165165
# How to fix missing commit author message
166166

167-
make sure that co-authors use one of the following formats in their commit message:
167+
Make sure that co-authors use one of the following formats in their commit message:
168168

169169
- `Co-authored-by: Any name <[email protected]>` - exact GitHub user will be found by unique `ID` part.
170170
- `Co-authored-by: Any name <[email protected]>` - exact GitHub user will be found by unique `username` part.

utils/calculate_api_stats.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Copyright The Linux Foundation and each contributor to CommunityBridge.
3+
# SPDX-License-Identifier: MIT
4+
if [ -z "$STAGE" ]
5+
then
6+
export STAGE=prod
7+
fi
8+
if [ -z "$1" ]
9+
then
10+
echo "$0: please provide time range from value as a 1st argument, for example '2 hours ago'"
11+
exit 1
12+
fi
13+
export DTFROM="${1}"
14+
REGION=us-east-1 NO_ECHO=1 DTTO='1 second ago' OUT="api-logs-${STAGE}-1.json" ./utils/search_aws_logs.sh 'LG:api-request-path'
15+
REGION=us-east-2 NO_ECHO=1 DTTO='1 second ago' OUT="api-logs-${STAGE}-2.json" ./utils/search_aws_logs.sh 'LG:api-request-path'
16+
jq -s 'add' "api-logs-${STAGE}-1.json" "api-logs-${STAGE}-2.json" > "api-logs-${STAGE}.json" && rm -f "api-logs-${STAGE}-1.json" "api-logs-${STAGE}-2.json"
17+
./utils/count_apis.sh "api-logs-${STAGE}.json" > "api-logs-${STAGE}.log" && cat "api-logs-${STAGE}.log"

0 commit comments

Comments
 (0)