0.1.4 • Published 2 years ago

appium-ddlog-plugin v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

appium-ddlog-plugin

Appium plugin to stream command result logs to Datadog without Datadog Agent.

Command Logs

The plugin sends two logs per a command, one at the start of the command execution and at its completion. The former contains information about the arguments of the command and the latter contains the result of the command. Logs can contain information such as command name, session ID, command name, and capacities as tags as well.

Appium Logs (disabled by default)

If you set EXPORT_APPLICATION_LOGS=true, the plugin sends all logs of Appium to Datadog. However, these logs cannot include session id or capabilities information as tags.

Run

# install plubin
appium plugin install --source=npm appium-ddlog-plugin

# run appium with the plugin
export DD_API_KEY="Put your API key here"
appium server --use-plugins=appium-ddlog-plugin

Configuration

You can configure the plugin with environment variables.

EnvDefaultDesciption
DD_API_KEYDatadog API key. This is required.
DD_LOG_HOSThttp-intake.logs.datadoghq.comDatadog Logs API endpoint.
DD_LOG_LEVELinfoLog level.
DD_TAGSTags to be added to the log. e.g. env:development,region:us-east-1
DD_SERVICEappiumService name sent with log.
DD_HOSTNAMEos.hostname()Host name sent with log.
DD_SOURCEnodejsSource name sent with log.
DD_BATCH_INTERVAL5000The number of milliseconds to wait before sending the HTTP request to Datadog.
DD_BATCH_COUNT30The number of logs to cumulate before sending the HTTP request to Datadog.
EXPORT_COMMAND_LOGStrueWhether to send command execution logs.
EXPORT_APPLICATION_LOGSfalseIf true, the plugin hooks the logger used by Appium and sends all logs Datadog.
DD_CAP_TAGSIf the keys specified by DD_CAP_TAGS exist in the capabilities, they are sent as tags. e.g. platformName,app,udid
DD_CAP_TAG_PREFIXPrefix for tags specified by DD_CAP_TAGS.
DD_CAP_MESSAGESIf the keys specified by DD_CAP_MESSAGES exist in the capabilities, they are sent as fields in a log.
DD_CAP_MESSAGE_PREFIXPrefix for field names specified by DD_CAP_MESSAGES.
SHOW_SESSION_ID_IN_MESSAGEfalseWhether to include session id in a log message.
0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago