When configuring Middleware APM in a dockerize system, both ways are valid: use environment variables or replicate an existing.ini
configuration file. However, if the Docker image has already been generated, using environment variables is usually the most convenient option.
Here is the list of all the attributes along with their environment variable that can be passed in environment file to .ini file
Config Attribute | Environment Variable |
---|---|
service_name | MW_SERVICE_NAME or OTEL_SERVICE_NAME |
access_token | MW_API_KEY |
collect_traces | MW_APM_COLLECT_TRACES |
collect_metrics | MW_APM_COLLECT_METRICS |
collect_logs | MW_APM_COLLECT_LOGS |
collect_profiling | MW_APM_COLLECT_PROFILING |
log_level | MW_LOG_LEVEL or OTEL_LOG_LEVEL |
mw_agent_service | MW_AGENT_SERVICE |
target | MW_TARGET or OTEL_EXPORTER_OTLP_ENDPOINT |
custom_resource_attributes | MW_CUSTOM_RESOURCE_ATTRIBUTES |
otel_propagators | MW_PROPAGATORS or OTEL_PROPAGATORS |
disable_info | MW_DISABLE_INFO |
console_exporter | MW_CONSOLE_EXPORTER |
debug_log_file | MW_DEBUG_LOG_FILE |
project_name | MW_PROJECT_NAME |
For more details, you can refer the documentation.