Skip to main content

Agent Configuration

Caution

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 true

    Enable the Grpc server to receive the data delivered via the OpenTelemetry protocol (OTLP).

  • otel_grpc_server_port String

    Default 6600

    Listening port of the Grpc server.

    Note

    After changing the port number, be sure to restart the whatap-otel service.

  • otel_grpc_server_gzip_enabled Boolean

    Default true

    It enables gzip by encrypting the data from the Grpc server.

  • debug_otel_grpc_server_enabled Boolean

    Default false

    It enables the output of debugging logs for processing the OpenTelemetry Trace data.

Agent Log

  • log_keep_days Day Int

    Default 7

    Set the retention period of log files.

  • log_stdout_enabled Boolean

    Default false

    Add 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.

OpenTelemetry - Span example
{
"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"
}
]
}
whatap.conf
otel_attr_tx_host_keys=http.host
otel_attr_tx_method_keys=http.method
otel_attr_tx_useragent_keys=http.user_agent
Note
  • otel_trace_server_enabled Boolean

    Default true

    It enables to process the OpenTelemetry Trace data.

  • otel_trace_queue_size Int

    Default 5000

    It sets the queue size for processing the OpenTelemetry Trace data.

  • otel_span_collector_max Int

    Default 100000

    Set 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.system

    Enter 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.query

    Enter 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.target

    Enter 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.url

    Enter the attribute name to use as the service URL for transactions.

  • otel_attr_tx_host_keys String

    Default http.host

    Enter the attribute name to use as the host name for transactions.

  • otel_attr_tx_method_keys String

    Default http.method,http.request.method

    Enter the attribute name to use as the HTTP method.

  • otel_attr_tx_status_keys String

    Default http.status_code

    Enter the attribute name to use as the HTTP status code for transactions.

  • otel_attr_tx_useragent_keys String

    Default http.user_agent

    Enter the attribute name to use as the User-Agent for transactions.

  • otel_attr_tx_clientip_keys String

    Default net.peer.ip,net.socket.peer.addr

    Enter 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.type

    Enter the attribute name to use as the error information for transactions.

  • otel_events_exception_keys String

    Default exception.type

    Specify the attribute name of the event data to use as the error type.

  • otel_events_error_message_keys String

    Default exception.message

    Specify the attribute name of the event data to use as the error message.

  • otel_events_error_stack_keys String

    Default exception.stacktrace

    Specify the attribute name of the event data to use as the error stack.

  • otel_tx_path_setby_name_enabled Boolean

    Default false

    Specify the transaction name as the span name.

  • otel_mtrace_stepid_setby_trace_spanid_enabled Boolean

    Default false

    Set 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 false

    For distributed tracing, forcibly set it when there is no HTTP call span. Set the HTTP call address by adding otel_virtual_httpc_name to the transaction name (URL).

  • otel_virtual_httpc_name String

    Default: external http call

    Forcibly specify the name when there is no HTTP call span.

  • transaction_status_error_enable Boolean

    Default false

    Set to display as an error if the status code is 400 or higher.

  • tx_status_meter_enabled Boolean

    Default true

    It collects the number of cases for each status code of the entire URL every 10 seconds.

  • stat_txstatus_enabled Boolean

    Default true

    The 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 false

    It 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.kong

    Specify the attribute name (key) that has the gateway's elapsed time.

  • otel_attr_tx_api_time_key String

    Default duration.proxy

    Set 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.proxy

    For 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.
  • otel_attr_replace_tx_resp_time_keys String

    Default duration.kong

    Specify the key name of the attribute to be set as the response time.

Metric

Agent setting option for processing the OpenTelemetry Metric data.

Note

For more information about the metric data processing for OpenTelemetry, see the following link.

  • otel_metric_server_enabled Boolean

    Default false

    It enables to process the OpenTelemetry Metric data.

  • otel_metric_queue_size Int

    Default 5000

    It sets the queue size for processing the OpenTelemetry Metric data.

Log

Agent setting option for processing the OpenTelemetry Log data.

Note

For more information about the log data processing for OpenTelemetry, see the following link.

  • otel_log_server_enabled Boolean

    Default false

    It enables to process the OpenTelemetry Log data.

  • otel_log_queue_size Int

    Default 5000

    It sets the queue size for processing the OpenTelemetry Log data.