Skip to content

Commit

Permalink
Add basic documentation about the various types of logs that AMO has (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
diox authored Sep 25, 2024
1 parent 6580bb5 commit d9610a8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

# General information about the project.
project = u'addons-server'
copyright = u'2023, Mozilla'
copyright = u'2024, Mozilla'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ refers to this project.
topics/readme_include
topics/api/index
topics/development/index
topics/logs
topics/remote_addr
topics/third-party
topics/blocklist
Expand Down
36 changes: 36 additions & 0 deletions docs/topics/logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Logs

(logs)=

We have various types of logs with different purposes in AMO. The following
tables summarize their characteristics:


| | `ActivityLog` / `LogEntry` |
|-| -------------------------- |
|Type| Database entry |
|Purpose| Storing information about developers/reviewers/admin actions |
|Stores IP| Depending on the action |
|Stores user| Yes, explictly (mandatory) |
|Retention| A year to forever depending on the action |
|Access| Redash |

| | [Application logging](./development/logging.md) |
|-| ----------------------------------------------- |
|Type| JSON (MozLog [^1]) |
|Purpose| Tracing specific calls / debugging |
|Stores IP| Yes |
|Stores user | Yes, if applicable (automatically for authenticated requests) |
|Retention| 6 months |
|Access| [Google Log Explorer](https://mozilla-hub.atlassian.net/wiki/spaces/SRE/pages/27921597/AMO+Dev+Resources#Application-Logs) |

| | CDN logs |
|-| -------- |
|Type| HTTP access logs |
|Purpose| Generic request logging |
|Stores IP| Yes |
|Stores user| No |
|Retention| 3 months |
|Access| Google Cloud Storage Bucket |

[^1]: addons-server and addons-frontend both produce application logs through python `logging` and `pino` respectively, emitting them in the [MozLog format](https://wiki.mozilla.org/Firefox/Services/Logging). That gets sent to our application logging pipeline used by all Firefox services.

0 comments on commit d9610a8

Please sign in to comment.