Package org.bluezoo.gumdrop.ftp
Class FTPServerMetrics
java.lang.Object
org.bluezoo.gumdrop.ftp.FTPServerMetrics
OpenTelemetry metrics for FTP servers.
This class provides standardized FTP server metrics for monitoring file transfer operations.
Metrics provided:
ftp.server.connections- Total number of FTP control connectionsftp.server.active_connections- Number of active control connectionsftp.server.session.duration- Session duration in millisecondsftp.server.authentications- Authentication attemptsftp.server.transfers- File transfers (uploads/downloads)ftp.server.bytes.uploaded- Bytes uploaded by clientsftp.server.bytes.downloaded- Bytes downloaded by clientsftp.server.transfer.duration- File transfer durationftp.server.commands- FTP commands executed
- Author:
- Chris Burdess
-
Constructor Summary
ConstructorsConstructorDescriptionFTPServerMetrics(TelemetryConfig config) Creates FTP server metrics using the given telemetry configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidRecords an authentication attempt.voidRecords a failed authentication.voidRecords a successful authentication.voidRecords an AUTH TLS upgrade.voidcommandExecuted(String command) Records an FTP command execution.voidconnectionClosed(double durationMs) Records an FTP control connection closing.voidRecords a new FTP control connection.voidRecords a data connection closing.voidRecords a data connection opening.voidRecords a directory creation.voiddirectoryListed(String command) Records a directory listing operation.voidRecords a file deletion.voidfileDownloaded(long sizeBytes, double durationMs) Records a file download (RETR).voidfileUploaded(long sizeBytes, double durationMs) Records a file upload (STOR).
-
Constructor Details
-
FTPServerMetrics
Creates FTP server metrics using the given telemetry configuration.- Parameters:
config- the telemetry configuration
-
-
Method Details
-
connectionOpened
public void connectionOpened()Records a new FTP control connection. -
connectionClosed
public void connectionClosed(double durationMs) Records an FTP control connection closing.- Parameters:
durationMs- the session duration in milliseconds
-
dataConnectionOpened
public void dataConnectionOpened()Records a data connection opening. -
dataConnectionClosed
public void dataConnectionClosed()Records a data connection closing. -
commandExecuted
Records an FTP command execution.- Parameters:
command- the command name (e.g., "RETR", "STOR", "LIST")
-
authAttempt
public void authAttempt()Records an authentication attempt. -
authSuccess
public void authSuccess()Records a successful authentication. -
authFailure
public void authFailure()Records a failed authentication. -
fileUploaded
public void fileUploaded(long sizeBytes, double durationMs) Records a file upload (STOR).- Parameters:
sizeBytes- the file size in bytesdurationMs- the transfer duration in milliseconds
-
fileDownloaded
public void fileDownloaded(long sizeBytes, double durationMs) Records a file download (RETR).- Parameters:
sizeBytes- the file size in bytesdurationMs- the transfer duration in milliseconds
-
directoryListed
Records a directory listing operation.- Parameters:
command- the listing command (LIST, NLST, MLSD)
-
directoryCreated
public void directoryCreated()Records a directory creation. -
fileDeleted
public void fileDeleted()Records a file deletion. -
authTlsUpgraded
public void authTlsUpgraded()Records an AUTH TLS upgrade.
-