02-28-2024 1:02 PM - edited 03-05-2024 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.
02-28-2024 6:07 PM - edited 02-28-2024 7:31 PM
Audit logging :-
Notifications event:
Telemetry
02-29-2024 9:49 AM
02-29-2024 10:33 AM
Audit Logging:
Bonus: Submit Order:
Notifications:
Telemetry:
02-29-2024 10:38 PM
Audit logging:
Notifications:
Telemetry:
03-01-2024 5:04 AM
03-01-2024 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
03-01-2024 10:57 AM - edited 03-01-2024 10:58 AM
I had the same issue. Had to debug the plugin to find out why. There must be at least a
03-01-2024 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.
03-01-2024 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
03-01-2024 10:58 AM
03-01-2024 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
03-01-2024 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?
03-01-2024 9:32 PM
03-02-2024 6:16 AM
Audit-Logging
Notifications
Telemetry
03-03-2024 1:10 PM
Audit Logging
Notifications
telemetry
03-03-2024 2:17 PM
03-03-2024 8:22 PM
Audit-logging
Notification
Telemetry
03-03-2024 10:09 PM
03-04-2024 2:52 PM
Hello,
Audit-logging:
Notifications:
Telementry:
03-04-2024 5:20 PM
03-05-2024 4:45 AM
03-05-2024 4:11 PM
Yes. Here is my sample solution: jung-thomas/dev-challenge-feb-2024: Developer Challenge February 2024 (github.com)
03-05-2024 8:53 AM - edited 03-05-2024 10:08 AM
03-05-2024 4:02 PM - edited 03-05-2024 4:04 PM
Audit Logging
Bonus task:
Notifications
Telemetry
03-07-2024 2:09 AM
Here are my tryouts.
Audit Log -
Notifications
Telemetry
03-08-2024 9:27 AM