github.com/waldiirawan/apm-agent-go/v2@v2.2.2/features/user_agent.feature (about)

     1  Feature: Agent Transport User agent Header
     2  
     3    Scenario: Default user-agent
     4      Given an agent
     5      When the agent sends a request to APM server
     6      Then the User-Agent header of the request matches regex '^apm-agent-[a-z]+/[^ ]* \(.*\)'
     7  
     8    Scenario: Default user-agent when setting invalid service
     9      Given an agent configured with
    10        | setting         | value            |
    11        | service_name    | myService/()<>@  |
    12      When the agent sends a request to APM server
    13      Then the User-Agent header of the request matches regex '^apm-agent-[a-z]+/[^ ]* \(.*\)'
    14  
    15    Scenario: User-agent with service name only
    16      Given an agent configured with
    17        | setting         | value            |
    18        | service_name    | myService        |
    19      When the agent sends a request to APM server
    20      Then the User-Agent header of the request matches regex '^apm-agent-[a-z]+/[^ ]* \(myService\)'
    21  
    22    Scenario Outline: User-agent with service name and service version
    23      Given an agent configured with
    24        | setting         | value             |
    25        | service_name    | <SERVICE_NAME>    |
    26        | service_version | <SERVICE_VERSION> |
    27      When the agent sends a request to APM server
    28      Then the User-Agent header of the request matches regex '^apm-agent-[a-z]+/[^ ]* \(<ESCAPED_SERVICE_NAME> <ESCAPED_SERVICE_VERSION>\)'
    29      Examples:
    30        | SERVICE_NAME   | ESCAPED_SERVICE_NAME  | SERVICE_VERSION   | ESCAPED_SERVICE_VERSION |
    31        | myService      | myService             | v42               | v42                     |
    32        | myService      | myService             | 123(:\;)456       | 123_:_;_456             |