-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #669 from 3scale/opentracing
OpenTracing support
- Loading branch information
Showing
11 changed files
with
186 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
opentracing on; | ||
|
||
{% if opentracing_config == nil or opentracing_config == empty %} | ||
{% assign opentracing_config = "conf.d/opentracing/jaeger.example.json" | filesystem | first%} | ||
{% endif %} | ||
|
||
{% if platform == "OSX" %} | ||
opentracing_load_tracer libjaegertracing.dylib {{ opentracing_config }}; | ||
{% else %} | ||
opentracing_load_tracer libjaegertracing.so {{ opentracing_config }}; | ||
{% endif %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"service_name": "apicast", | ||
"disabled": false, | ||
"sampler": { | ||
"type": "const", | ||
"param": 1 | ||
}, | ||
"reporter": { | ||
"queueSize": 100, | ||
"bufferFlushInterval": 10, | ||
"logSpans": false, | ||
"localAgentHostPort": "127.0.0.1:6831" | ||
}, | ||
"headers": { | ||
"jaegerDebugHeader": "debug-id", | ||
"jaegerBaggageHeader": "baggage", | ||
"TraceContextHeaderName": "uber-trace-id", | ||
"traceBaggageHeaderPrefix": "testctx-" | ||
}, | ||
"baggage_restrictions": { | ||
"denyBaggageOnInitializationFailure": false, | ||
"hostPort": "127.0.0.1:5778", | ||
"refreshInterval": 60 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use lib 't'; | ||
use Test::APIcast::Blackbox 'no_plan'; | ||
|
||
$ENV{OPENTRACING_TRACER} ||= 'jaeger'; | ||
|
||
repeat_each(1); | ||
run_tests(); | ||
|
||
|
||
__DATA__ | ||
=== TEST 1: OpenTracing | ||
Request passing through APIcast should publish OpenTracing info. | ||
--- configuration | ||
{ | ||
"services": [ | ||
{ | ||
"proxy": { | ||
"policy_chain": [ | ||
{ "name": "apicast.policy.upstream", | ||
"configuration": | ||
{ | ||
"rules": [ { "regex": "/", "url": "http://echo" } ] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
--- request | ||
GET /a_path? | ||
--- response_body eval | ||
qr/uber-trace-id: / | ||
--- error_code: 200 | ||
--- no_error_log | ||
[error] | ||
--- udp_listen: 6831 | ||
--- udp_reply | ||
--- udp_query eval | ||
qr/jaeger.version/ | ||
--- wait: 10 |