Agent Configuration
OpenTelemetry monitoring is a Beta version so unexpected errors may occur. It is not recommended for using it for sensitive data or in the operation environment. If you have any feedback or issues, feel free to contact the support team at support@whatap.io.
You can configure the agent to collect and process various metrics from OpenTelemetry.
Agent
-
otel_grpc_server_enabled Boolean
Default
trueEnable the Grpc server to receive the data delivered via the OpenTelemetry protocol (OTLP).
-
otel_grpc_server_port String
Default
6600Listening port of the Grpc server.
NoteAfter changing the port number, be sure to restart the whatap-otel service.
-
otel_grpc_server_gzip_enabled Boolean
Default
trueIt enables
gzipby encrypting the data from the Grpc server. -
debug_otel_grpc_server_enabled Boolean
Default
falseIt enables the output of debugging logs for processing the OpenTelemetry Trace data.
Agent Log
-
log_keep_days Day Int
Default
7Set the retention period of log files.
-
log_stdout_enabled Boolean
Default
falseAdd the option to output to Stdout as the same as the file log.
Trace
Agent setting option for processing the OpenTelemetry Trace data. WhaTap gets values from the attributes object of Span, an OpenTelemetry Trace element, and uses them as monitoring information.
See the following code to see how the attributes object of Span relates to the WhaTap's agent configuration.
{
"name": "/v1/sys/health",
"context": {
"trace_id": "7bba9f33312b3dbb8b2c2c62bb7abe2d",
"span_id": "086e83747d0e381e"
},
"parent_id": "",
"start_time": "2021-10-22 16:04:01.209458162 +0000 UTC",
"end_time": "2021-10-22 16:04:01.209514132 +0000 UTC",
"status_code": "STATUS_CODE_OK",
"status_message": "",
"attributes": {
"net.transport": "IP.TCP",
"net.peer.ip": "172.17.0.1",
"net.peer.port": "51820",
"net.host.ip": "10.177.2.152",
"net.host.port": "26040",
"http.method": "GET",
"http.target": "/v1/sys/health",
"http.server_name": "mortar-gateway",
"http.route": "/v1/sys/health",
"http.user_agent": "Consul Health Check",
"http.scheme": "http",
"http.host": "10.177.2.152:26040",
"http.flavor": "1.1"
},
"events": [
{
"name": "",
"message": "OK",
"timestamp": "2021-10-22 16:04:01.209512872 +0000 UTC"
}
]
}
otel_attr_tx_host_keys=http.host
otel_attr_tx_method_keys=http.method
otel_attr_tx_useragent_keys=http.user_agent
-
For more information about the WhaTap trace analysis, see the following.
-
For more information about the trace data processing for OpenTelemetry, see the following link.
-
For more information about the attributes provided by OpenTelemetry, see the following links:
-
otel_trace_server_enabled Boolean
Default
trueIt enables to process the OpenTelemetry Trace data.
-
otel_trace_queue_size Int
Default
5000It sets the queue size for processing the OpenTelemetry Trace data.
-
otel_span_collector_max Int
Default
100000Set the maximum size (number) of the Span data buffers for the OpenTelemetry Trace data.
-
otel_attr_dbcon_keys String
Default
sql.system,db.connection_string,db.systemEnter the attribute name to be used as DB Connection information. Using this information, WhaTap displays it as the DB Connection step.
-
otel_attr_sql_keys String
Default
db.statement,sql.queryEnter the attribute name to use as SQL query information. Using this information, WhaTap displays it as the SQL step.
-
otel_attr_httpc_keys String
Default
url.full,http.url,http.targetEnter the attribute name to use as the HTTP call. Using this information, WhaTap displays it as the HTTP Call step.
-
otel_attr_tx_url_keys String
Default
http.url,http.route,http.target,tyk.api.path,http.urlEnter the attribute name to use as the service URL for transactions.
-
otel_attr_tx_host_keys String
Default
http.hostEnter the attribute name to use as the host name for transactions.
-
otel_attr_tx_method_keys String
Default
http.method,http.request.methodEnter the attribute name to use as the HTTP method.
-
otel_attr_tx_status_keys String
Default
http.status_codeEnter the attribute name to use as the HTTP status code for transactions.
-
otel_attr_tx_useragent_keys String
Default
http.user_agentEnter the attribute name to use as the User-Agent for transactions.
-
otel_attr_tx_clientip_keys String
Default
net.peer.ip,net.socket.peer.addrEnter the attribute name to use as the client IP for transactions.
-
otel_attr_tx_referer_keys String
Enter the attribute name to use as the HTTP Referer for transactions.
-
otel_attr_error_keys String
Default
error.typeEnter the attribute name to use as the error information for transactions.
-
otel_events_exception_keys String
Default
exception.typeSpecify the attribute name of the event data to use as the error type.
-
otel_events_error_message_keys String
Default
exception.messageSpecify the attribute name of the event data to use as the error message.
-
otel_events_error_stack_keys String
Default
exception.stacktraceSpecify the attribute name of the event data to use as the error stack.
-
otel_tx_path_setby_name_enabled Boolean
Default
falseSpecify the transaction name as the span name.
-
otel_mtrace_stepid_setby_trace_spanid_enabled Boolean
Default
falseSet the SpanID of the trace span to be recognized as ParentSpanID for external connection. Forcibly set it when there is no HTTP call span.
-
otel_virtual_httpc_enabled Boolean
Default
falseFor distributed tracing, forcibly set it when there is no HTTP call span. Set the HTTP call address by adding
otel_virtual_httpc_nameto the transaction name (URL). -
otel_virtual_httpc_name String
Default:
external http callForcibly specify the name when there is no HTTP call span.
-
transaction_status_error_enable Boolean
Default
falseSet to display as an error if the status code is 400 or higher.
-
tx_status_meter_enabled Boolean
Default
trueIt collects the number of cases for each status code of the entire URL every 10 seconds.
-
stat_txstatus_enabled Boolean
Default
trueThe number of status codes is collected every 5 minutes for each URL.
Gateway
Agent setting option for processing the OpenTelemetry Metric data.
-
otel_gateway_enabled Boolean
Default
falseIt sets whether or not to collect the query statistics data.
- It collects the elapsed time for each transaction, gateway, and API call for the entire URL every 10 seconds.
- It collects the elapsed time for each transaction, gateway, and API call for each URL and status every 5 minutes.
-
otel_attr_tx_gw_time_keys String
Default
duration.kongSpecify the attribute name (key) that has the gateway's elapsed time.
-
otel_attr_tx_api_time_key String
Default
duration.proxySet the elapsed time of the API call with the value of a specified attribute. Specify the attribute name (key) that has the API call's elapsed time.
-
otel_replace_tx_resp_time_enabled Boolean
Default
duration.proxyFor transactions, the response time is calculated based on the start time and end time. The feature to change the response time for transactions is enabled with the key value of the specified attribute.
- For the response time, set the key value of a specific attribute to
otel_attr_replace_tx_resp_time_keys.
- For the response time, set the key value of a specific attribute to
-
otel_attr_replace_tx_resp_time_keys String
Default
duration.kongSpecify the key name of the attribute to be set as the response time.
Metric
Agent setting option for processing the OpenTelemetry Metric data.
For more information about the metric data processing for OpenTelemetry, see the following link.
-
otel_metric_server_enabled Boolean
Default
falseIt enables to process the OpenTelemetry Metric data.
-
otel_metric_queue_size Int
Default
5000It sets the queue size for processing the OpenTelemetry Metric data.
Log
Agent setting option for processing the OpenTelemetry Log data.
For more information about the log data processing for OpenTelemetry, see the following link.
-
otel_log_server_enabled Boolean
Default
falseIt enables to process the OpenTelemetry Log data.
-
otel_log_queue_size Int
Default
5000It sets the queue size for processing the OpenTelemetry Log data.