Purpose
Traffic logs are used to collect the site traffic information and upload/download events. This document explains each field in the artifactory-traffic.log, which will aid in log analysis.
Difference between Traffic v1 and v2 logs
Usually, all the requests to the artifactory get captured in the artifactory-request.log, including HTTP requests. However, Traffic v1 logs offer a more focused and concise view specifically for monitoring these transfer operations. When enabled, Traffic v1 logs concisely write essential details, such as the operation performed, user IP address, repository name, artifact path, and the size of the transferred data, to a separate, cleaner file. This makes it ideal for quickly assessing transfer activity without having to sift through general request logs.
For truly in-depth analysis of the Artifactory HTTP traffic, you'll need to enable Traffic v2 logs. These logs provide significantly more detail than their v1 counterparts, including the specific "actor" involved (e.g., a user, Xray, or a CI/CD pipeline), whether the data transfer was direct or routed through an external cloud storage provider like S3 or GCS, both the requested and transferred data sizes, the repository type, project key, and the username. This comprehensive information is crucial for auditing, troubleshooting transfer issues, and gaining a complete understanding of how data flows through the Artifactory instance.
Prerequisites
Enable the Traffic logs by following the steps given below:
1. Add the following property to the artifactory.system.properties file located at $JFROG_HOME/artifactory/var/etc/artifactory/ in all the nodes of the cluster.
For Traffic v1 logs:
artifactory.traffic.collectionActive=true
For Traffic v2 logs:
artifactory.traffic.v2.enabled=true
2. Restart the Artifactory
3. If you want to automatically compress and move the v1/v2 traffic logs to the archived directory, follow this documentation.
Sample Log Analysis
After enabling the Traffic V1 Logs, we should be able to see the log lines in artifactory-traffic-v1.log as shown below:
20250703135502|65b472308083b922|18|DOWNLOAD|127.0.0.1|example-repo-local:sample.zip|41803
In the above logs, the following fields are present.
20250703135502 - FormattedDate,
65b472308083b922 - TraceId,
18 - Request Duration
DOWNLOAD - Action Name,
127.0.0.1 - User Address,
example-repo-local:sample.zip - RepoPath:Artifact,
41803 - Transferred Size
After enabling the Traffic V2 Logs, we should be able to see the log lines in artifactory-traffic-v2.log as shown below:
20250703185639|42ba7822f66c1614|DOWNLOAD|USER|DIRECT|127.0.0.1|example-repo-local:single-dir-no-files.zip|158|158|158|example-repo-local|default|testuser|local|generic|example-repo-local|default|local|generic
In the above logs, the following fields are present.
20250703185639 - FormattedDate,
42ba7822f66c1614 - TraceId,
DOWNLOAD - Action Name,
USER - Actor Name,
DIRECT - redirectTarget,
127.0.0.1 - User Address,
example-repo-local:single-dir-no-files.zip - RepoPath,
158 - Size
158 - Requested Size
158 - Transferred Size
example-repo-local - Repo Key
default - Project Key
testuser - User Name
local - Repo Type
generic - Package Type
Artifactory Traffic log file record structure V2
Timestamp | Trace id | Action | Actor | Redirect Target | User Address | Repo Path | 189532 (Artifact size) | 189532(Requested size) | 189532(Actual bytes sent (or received) | Repo Key | Project Key | User | Repo type | Package type
Possible values for action
DOWNLOAD, UPLOAD, REDIRECT
For actor
USER,
XRAY,
PIPELINES,
FEDERATION,
ARTIFACTORY,
OBSERVABILITY,
DISTRIBUTION,
JFCONNECT
Possible values for redirectTarget
DIRECT, // in case the action is not REDIRECT
S3, // redirect to Amazon S3
CF, // redirect to Amazon CloudFront CDN
GCS, // redirect to Google Cloud Service
ABS, // redirect to Azure Blob Storage