Skip to content

Commit 8dd891c

Browse files
committed
Merge branch 'develop' v0.2.0
2 parents e40b24f + ae0e377 commit 8dd891c

File tree

7 files changed

+312
-234
lines changed

7 files changed

+312
-234
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.2.0] - 2021-09-03
10+
### Fixed
11+
- Changed metric namespace to include bot locale
12+
- Added bot and locale ID filters to CloudWatch Insight rules/queries
13+
- Fixed handling of ReadyForFullfilment state and empty data in conversation
14+
path widget
15+
### Removed
16+
- Removed session count value from Activity section due to exceptions if the
17+
selected time range is larger than 24 hours
18+
919
## [0.1.0] - 2021-08-26
1020
### Added
1121
- Initial release
1222

13-
[Unreleased]: https://github.com/aws-samples/aws-lex-v2-bot-analytics/compare/v0.1.0...develop
23+
[Unreleased]: https://github.com/aws-samples/aws-lex-v2-bot-analytics/compare/v0.2.0...develop
24+
[0.2.0]: https://github.com/aws-samples/aws-lex-v2-bot-analytics/releases/tag/v0.2.0
1425
[0.1.0]: https://github.com/aws-samples/aws-lex-v2-bot-analytics/releases/tag/v0.1.0

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ PYTHON_TARGET_REQUIREMENTS := $(patsubst \
6262
$(PYTHON_TARGET_REQUIREMENTS): $(OUT_DIR)/%: $(PYTHON_REQUIREMENTS_DIR)/% | $(OUT_DIR) $(VENV_CFG)
6363
@echo "[INFO] Installing python dependencies file: [$(^)]"
6464
@source '$(VIRTUALENV_BIN_DIR)/activate' && \
65-
pip install -r $(^) | tee $(@)
65+
pip install -U -r $(^) | tee $(@)
6666
install-python-requirements: $(PYTHON_TARGET_REQUIREMENTS)
6767
.PHONY: install-python-requirements
6868

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ visualize the performance and operational metrics of your
1010
It provides a dashboard that you can use to continuously analyze and improve the
1111
experience of end-users interacting with your chatbot.
1212

13-
This solution implements metrics and visualizations that helps you identify
14-
chatbot performance, trends and engagement insights. The solution extracts
13+
This solution implements metrics and visualizations that help you identify
14+
chatbot performance, trends and engagement insights. This is done by extracting
1515
operational data from your Lex V2 chatbot
1616
[conversation logs](https://docs.aws.amazon.com/lexv2/latest/dg/monitoring-logs.html).
17-
It presents a unified view of how users are interacting with your chatbot in an
17+
The solution presents a unified view of how users are interacting with your
18+
chatbot in an
1819
[Amazon CloudWatch dashboard](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html).
1920

2021
Features include:
@@ -35,11 +36,11 @@ Features include:
3536

3637
### Architecture
3738

38-
The solution architecture includes the following AWS Services:
39+
The solution architecture leverages the following AWS Services and features:
3940

40-
- **CloudWatch Logs** containing your chatbot conversation logs
41+
- **CloudWatch Logs** to store your chatbot conversation logs
4142
- **CloudWatch Metric Filters** to create custom metrics from conversation logs
42-
- **CloudWatch Insights** to query the conversation logs and to create powerful
43+
- **CloudWatch Log Insights** to query the conversation logs and to create powerful
4344
aggregations from the log data
4445
- **CloudWatch Contributor Insights** to identify top contributors and
4546
outliers in higly variable data such as sessions and utterances
@@ -144,6 +145,25 @@ stack name and bot information (name, ID, locale).
144145
**NOTE:** You may need to wait a few minutes for data to be reflected in the
145146
dashboard.
146147

148+
## Update Using SAR
149+
150+
After you've deployed the dashboard from SAR, you may need to update it.
151+
For example, you may need to change an application setting, or you may want
152+
to update the application to the latest version that was published.
153+
154+
You can use the same
155+
[link](https://console.aws.amazon.com/lambda/home#/create/app?applicationId=arn:aws:serverlessrepo:us-east-1:777566285978:applications/lexv2-analytics)
156+
used to deploy the stack to perform updates. Use the same procedure as
157+
deploying the application, and provide the same **Application name** that you
158+
originally used to deploy it.
159+
160+
*NOTE:* SAR prepends `serverlessrepro-` to your stack name. However, to deploy a
161+
new version of your application, you should provide the original application
162+
name without the `serverlessrepo-` prefix.
163+
164+
See the [SAR Updating Applications](https://docs.aws.amazon.com/serverlessrepo/latest/devguide/serverlessrepo-how-to-consume-new-version.html)
165+
documentation for details.
166+
147167
## Deploy Using SAM
148168

149169
In addition to deploying the project using SAR as shown in the
@@ -233,6 +253,10 @@ Here are more details about the general SAM parameters:
233253

234254
- Pie and bar charts in the dashboard may show not show accurate data for the
235255
selected time range. We are currently investigating this issue
256+
- Metrics using CloudWatch Contributor Insights are limited to a 24 hour window
257+
within the selected time range. The CloudWatch Contributor Insights feature
258+
allows a maximum time range for the report is 24 hours, but you can choose a
259+
24-hour window that occurred up to 15 days ago.
236260

237261
## Development
238262

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0
1+
0.2.0

requirements/requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# development dependencies
22
pip~=21.2.4
33
black~=21.7b0
4-
cfn-lint~=0.53.0
4+
cfn-lint~=0.53.1
55
flake8~=3.9.2
66
pylint~=2.9.6
77
yamllint~=1.26.2

src/lambda_functions/cw_custom_widget_nodejs/widgets/conversationPath.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ function displaySankey({ data, widgetContext } = {}) {
130130
function displayConversationPath({ widgetContext, queryResults }) {
131131
// flatten CloudWatch Insights results into objects
132132
const results = queryResults.map((x) => x.reduce((a, c) => ({ [c.field]: c.value, ...a }), {}));
133+
if (!results?.length) {
134+
return '<pre class="error">No data found</pre>';
135+
}
133136
const nodes = [
134137
...new Set(results.map((x) => x['@intentName'])),
135138
// add artificial start intent to have a single entry point

0 commit comments

Comments
 (0)