summaryrefslogtreecommitdiffstats
path: root/addons/ot/test/cmp/ot.cfg
blob: 21b15dd61bb9decc218a279babb19bb7501396f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[ot-test-cmp]
    ot-tracer ot-test-tracer
        config cmp/cfg-jaeger.yml
        plugin libjaeger_opentracing_plugin-0.5.0.so
#       log localhost:514 local7 debug
        option dontlog-normal
        option hard-errors
        no option disabled
        rate-limit 100.0

        scopes client_session_start
        scopes frontend_tcp_request
        scopes frontend_http_request
        scopes backend_tcp_request
        scopes backend_http_request
        scopes server_unavailable

        scopes server_session_start
        scopes tcp_response
        scopes http_response http_response-error server_session_end client_session_end

    ot-scope client_session_start
        span "HAProxy session" root
            baggage "haproxy_id" var(sess.ot.uuid)
        span "Client session" child-of "HAProxy session"
        event on-client-session-start

    ot-scope frontend_tcp_request
        span "Frontend TCP request" child-of "Client session"
        event on-frontend-tcp-request

    ot-scope frontend_http_request
        span "Frontend HTTP request" follows-from "Frontend TCP request"
            tag "http.method" method
            tag "http.url" url
            tag "http.version" str("HTTP/") req.ver
        finish "Frontend TCP request"
        event on-frontend-http-request

    ot-scope backend_tcp_request
        span "Backend TCP request" follows-from "Frontend HTTP request"
        finish "Frontend HTTP request"
        event on-backend-tcp-request

    ot-scope backend_http_request
        span "Backend HTTP request" follows-from "Backend TCP request"
        finish "Backend TCP request"
        event on-backend-http-request

    ot-scope server_unavailable
        span "HAProxy session"
            tag "error" bool(true)
            log "status" str("503 Service Unavailable")
        finish *
        event on-server-unavailable

    ot-scope server_session_start
        span "Server session" child-of "HAProxy session"
        finish "Backend HTTP request"
        event on-server-session-start

    ot-scope tcp_response
        span "TCP response" child-of "Server session"
        event on-tcp-response

    ot-scope http_response
        span "HTTP response" follows-from "TCP response"
            tag "http.status_code" status
        finish "TCP response"
        event on-http-response

    ot-scope http_response-error
        span "HTTP response"
            tag "error" bool(true)
        event on-http-response if !acl-http-status-ok

    ot-scope server_session_end
        finish "HTTP response" "Server session"
        event on-http-response

    ot-scope client_session_end
        finish "*"
        event on-http-response