Skip to content

Conversation

rsempe
Copy link
Collaborator

@rsempe rsempe commented May 19, 2025

Roadmap Task

👉 https://getlago.canny.io/feature-requests/p/access-audit-logs

Context

Our users want to have visibility on what’s happening in Lago.

Examples:

  • A plan and prices have been updated: When? By whom? What?
  • A subscription has been deleted: When? By whom? What?

Description

This PR is the global PR for merging activity logs.

@rsempe rsempe force-pushed the activity-logs branch 6 times, most recently from 4054f14 to 037a359 Compare May 26, 2025 14:02
@rsempe rsempe force-pushed the activity-logs branch 3 times, most recently from 6ce8b1d to 3e37e0d Compare May 28, 2025 08:59
@rsempe rsempe marked this pull request as ready for review May 28, 2025 10:18
@rsempe rsempe force-pushed the activity-logs branch 7 times, most recently from 4202624 to 1ddac2b Compare June 2, 2025 07:20
rsempe added 8 commits June 4, 2025 10:57
## Roadmap Task

👉
[https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs)

## Context

Our users want to have visibility on what’s happening in Lago.

Examples:
- *A plan and prices have been updated: When? By whom? What?*
- *A subscription has been deleted: When? By whom? What?*

## Description

The goal of this PR is to create activity logs when creating/updating or
deleting a plan.
## Roadmap Task

👉
[https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs)

## Context

Our users want to have visibility on what’s happening in Lago.

Examples:
- *A plan and prices have been updated: When? By whom? What?*
- *A subscription has been deleted: When? By whom? What?*

## Description

The goal of this PR is to add customer activity logs.
## Roadmap Task

👉
[https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs)

## Context

Our users want to have visibility on what’s happening in Lago.

Examples:
- *A plan and prices have been updated: When? By whom? What?*
- *A subscription has been deleted: When? By whom? What?*

## Description

The goal of this PR is to return deleted activity object for activity
logs.
mariohd and others added 20 commits June 4, 2025 10:57
Activity Logs for Wallets.
BillingEntities activity logs

`billing_entities.deleted` is not implemented yet and, if necessary,
will have to handled manually using the console.
Activity logs for coupons.
## Roadmap Task

👉
[https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs)

## Context

Our users want to have visibility on what’s happening in Lago.

Examples:
- *A plan and prices have been updated: When? By whom? What?*
- *A subscription has been deleted: When? By whom? What?*

## Description

The goal of this PR is to create activity logs for credit notes.
Adds the invoice activity logs
Activity logs for subscriptions.

**It requires the code to produce activity log without a block.**
Activity Logs for Wallet Transactions. 

It requires the code to produce activity log without a block.
Activity log for payment.recorded.
👉
[https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs)

Our users want to have visibility on what’s happening in Lago.

Examples:
- *A plan and prices have been updated: When? By whom? What?*
- *A subscription has been deleted: When? By whom? What?*

The goal of this PR is to add relations to activity logs.
It will be useful for displaying activity logs tab on several objects
(customer / invoice / subscription / ...)
Some fixes for the Activity Logs.


```
 "billable_metric.created" => OK
 "billable_metric.updated" => OK
 "billable_metric.deleted" => OK
 "plan.created" => OK
 "plan.updated" => OK
 "plan.deleted" => OK
 "customer.created" => OK
 "customer.updated" => OK
 "customer.deleted" => OK
 "invoice.drafted"
 "invoice.failed"
 "invoice.created"
 "invoice.one_off_created" => FIXED OK
 "invoice.paid_credit_added"
 "invoice.generated" => OK
 "invoice.payment_status_updated" => OK
 "invoice.payment_overdue"
 "invoice.voided" => OK
 "invoice.payment_failure"
 "payment_receipt.created" => FIXED OK / *** PaymentReceipt does not have a customer associated
 "payment_receipt.generated" => FIXED OK / *** same as "payment_receipt.created"
 "credit_note.created" => OK
 "credit_note.generated" => OK
 "credit_note.refund_failure" => FIXED OK
 "billing_entities.created"
 "billing_entities.updated"
 "billing_entities.deleted" => NOT IMPLEMENTED
 "subscription.started" => OK
 "subscription.terminated" => FIXED OK
 "subscription.updated" => OK
 "wallet.created" => OK / *** Front has to fix ".id" to use ".lago_id" or use wallet ".name"
 "wallet.updated" => OK / *** same as "wallet.created" 
 "wallet_transaction.payment_failure"
 "wallet_transaction.created" => OK / *** same as "wallet.created" 
 "wallet_transaction.updated" => FIXED OK / *** same as "wallet.created" 
 "payment.recorded" => FIXED OK / *** The activity_object is a Payment. Resouce can be an Invoice or PaymentRequest. Front expects to activity_object to have "invoice_number".
 "coupon.created" => OK
 "coupon.updated" => OK
 "coupon.deleted" => OK / *** Maybe add "coupon.terminated" ?
 "applied_coupon.created" => OK / *** Front is broken, it expects activity_object have ".code" but its ".coupon_code" 
 "applied_coupon.deleted" => OK / *** same as "applied_coupon.created"
```
## Roadmap Task

👉
[https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs)

## Context

Our users want to have visibility on what’s happening in Lago.

Examples:
- *A plan and prices have been updated: When? By whom? What?*
- *A subscription has been deleted: When? By whom? What?*

## Description

The goal of this PR is to
- include serialized sub resources to activity logs
- add api key object in the activity log resolver
@rsempe rsempe merged commit 2eee73a into main Jun 5, 2025
14 checks passed
@rsempe rsempe deleted the activity-logs branch June 5, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants