-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenTracing support #669
Merged
Merged
OpenTracing support #669
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
b64a77f
Merge pull request #1 from 3scale/master
jmprusi a945c2f
Merge remote-tracking branch 'upstream/master'
jmprusi 163d2b0
Adds jaeger config
jmprusi 1a1d3aa
Include opentracing modules and jaeger conf
jmprusi 9dde2b9
Sets proper service_name and location_names for all servers
jmprusi 925aaf4
Read jaeger vars from ENV
jmprusi b1466d1
created opentracing directory to include individual tracer confs
jmprusi 4d38495
Adds new ENV vars for opentracing_enabled and opentracing_tracer
jmprusi fb9ded4
Remove the specific configs from each conf and put all of them into t…
jmprusi 63a58d7
Checkout from master
jmprusi f27a9d2
Replace endif to endunless
jmprusi cfb6950
Use opentracing_tracer instead of a bool
jmprusi 49c1898
Forwared uber-trace-id header
jmprusi fa38640
Use opentracing load tracer for jaeger
jmprusi 1950a75
Allow the user to change the config file path
jmprusi 597f370
Use uber-trace-id by default
jmprusi c5febb5
Allow to set the opentracing forward header via ENV
jmprusi 493145b
CHANGELOG: OpenTracing support
jmprusi f949669
Fix CHANGELOG merge
jmprusi 4225d52
[nginx] search for modules in standard nginx directory
mikz e8377c1
[opentracing] ability to load jaegertracing on macOS
mikz fdbe642
[compose] provide jaeger all-in-one to try opentracing
mikz 6a0dbc0
[t] test opentracing
mikz 6e51fcd
[circle] bump s2i-openresty to 1.13.6.1-rover12
mikz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's openresty? cool. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thats the Test::Nginx testing framework: http://search.cpan.org/~agent/Test-Nginx/lib/Test/Nginx/Socket.pm#udp_listen |
||
--- udp_reply | ||
--- udp_query eval | ||
qr/jaeger.version/ | ||
--- wait: 10 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be
if
.