2024 Feb 28 1:02 PM - edited 2024 Mar 05 4:12 PM
If you missed week 1, you could find all the details: here
If you missed week 2, you could find all the details: here
If you missed week 3, you could find all the details: here
Now that the challenge is complete: here is my sample solution: jung-thomas/dev-challenge-feb-2024: Developer Challenge February 2024 (github.com)
For the final week we are going to go all in. We have several remaining plugins and your challenge this week is to integrate all of them into your application.
The new Audit Log plugin provides out-of-the box support for logging personal data-related operations with the SAP Audit Log Service. All we need is annotations of respective entities and fields.
https://github.com/cap-js/audit-logging
Add the Audit Logging plugin to your application and add Personal Data Annotations to the Books entity. Share your screenshot of the audit entries after accessing the entity.
Bonus: Add a custom audit log entry when the submitOrder action is triggered
The Notifications plugin provides integration with the SAP Alert Notifications service to send notifications via email, Slack, Microsoft Teams, or SAP Fiori notifications. The client is implemented as a CAP service, which gives us a very simple programmatic API
https://github.com/cap-js/notifications
Add the Notifications plugin to your application. Throw a notification every time ListOfBooks entity is read and a discount has been applied. Post a screenshot of your notification in the log.
The Telemetry plugin provides observability features such as tracing and metrics, including automatic OpenTelemetry instrumentation. Simply add the plugin to your project and you will find telemetry output written to the console
https://github.com/cap-js/telemetry
Add the Telemetry plugin to your application. Post a screenshot of the telemetry output in our log.
2024 Feb 28 6:07 PM - edited 2024 Feb 28 7:31 PM
Audit logging :-
Notifications event:
Telemetry
2024 Feb 29 9:49 AM
2024 Feb 29 10:33 AM
Audit Logging:
Bonus: Submit Order:
Notifications:
Telemetry:
2024 Feb 29 10:38 PM
Audit logging:
Notifications:
Telemetry:
2024 Mar 01 5:04 AM
2024 Mar 01 10:23 AM
Does it matter where you write the annotations for these plug-ins? I added annotations for audit log, but I can not see those details in console when I access the entity.
Thanks
2024 Mar 01 10:57 AM - edited 2024 Mar 01 10:58 AM
I had the same issue. Had to debug the plugin to find out why. There must be at least a
2024 Mar 01 6:49 PM
Sounds like you generally got your solution. It shouldn't matter where you place your annotations as long as the file is reachable by the CDS compiler. I will share my solution. I did just happen to use IsPontentiallyPersonal and IsPotentiallySensitive on the same entity. I didn't know of any requirement to have both; maybe it was just dumb luck on my part. I don't think it's supposed to be a requirement to have both on the same entity. There is an example in the documentation that only has IsPotentiallyPersonal.
2024 Mar 01 11:49 AM
The example on the plugin documentation is not complete. It is missing the DataSubjectRole and EntitySemantics on the annotation.
Here you can find some more complete documentation about the plugin.
https://cap.cloud.sap/docs/guides/data-privacy/annotations#annotated-model
2024 Mar 01 10:58 AM
2024 Mar 01 12:37 PM
Audit Logging :
Bonus 1: Done but it shows tenant as undefined for me but your screenshot gives t1.
Notification
Telemetry
With Reagrds,
Ramesh Shrestha
2024 Mar 01 9:03 PM
Hi,
I am facing issues with audit-log.
I have installed the @cap-js/audit-logging plugin and added annotations as described below.
using { sap.capire.bookshop as db } from '../db/schema';
annotate db.Books with @PersonalData: {
EntitySemantics : 'DataSubject'
}
{
ID @PersonalData.FieldSemantics: 'DataSubjectID';
title @PersonalData.IsPotentiallyPersonal;
};
However, I am not seeing the 'SensitiveDataRead' logs, nor do I see the '[cds] connected to audit-log' message in the console. Am I missing any steps?
2024 Mar 01 9:32 PM
2024 Mar 02 6:16 AM
Audit-Logging
Notifications
Telemetry
2024 Mar 03 1:10 PM
Audit Logging
Notifications
telemetry
2024 Mar 03 2:17 PM
2024 Mar 03 8:22 PM
Audit-logging
Notification
Telemetry
2024 Mar 03 10:09 PM
2024 Mar 04 2:52 PM
Hello,
Audit-logging:
Notifications:
Telementry:
2024 Mar 04 5:20 PM
2024 Mar 05 4:45 AM
2024 Mar 05 4:11 PM
Yes. Here is my sample solution: jung-thomas/dev-challenge-feb-2024: Developer Challenge February 2024 (github.com)
2024 Mar 05 8:53 AM - edited 2024 Mar 05 10:08 AM
2024 Mar 05 4:02 PM - edited 2024 Mar 05 4:04 PM
Audit Logging
Bonus task:
Notifications
Telemetry
2024 Mar 07 2:09 AM
Here are my tryouts.
Audit Log -
Notifications
Telemetry
2024 Mar 08 9:27 AM