Skip to content
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

Allow the Configuration of Additional Headers on the Jaeger Query HTTP API #2056

Merged
merged 22 commits into from
Feb 8, 2020

Conversation

joe-elliott
Copy link
Member

@joe-elliott joe-elliott commented Feb 5, 2020

Which problem is this PR solving?

Short description of the changes

  • Added a parameter query.additional-headers that allows for multiple headers to be added to jaeger query's api
  • Configurable from the CLI
    • --query.additional-headers "Access-Control-Allow-Origin: https://mozilla.org" --query-additional-headers "Access-Control-Expose-Headers: X-My-Custom-Header"
  • Configurable from yaml
    query:
      additional-headers:
        - "Access-Control-Allow-Origin: https://mozilla.org"
        - "Access-Control-Expose-Headers: X-My-Custom-Header"
    
  • Added a config.StringSlice object that can be used to pass string slices through pflag/viper

@joe-elliott
Copy link
Member Author

Functionality confirmed with local testing. Dropping Draft status.

@joe-elliott joe-elliott marked this pull request as ready for review February 5, 2020 17:04
@joe-elliott joe-elliott requested a review from a team as a code owner February 5, 2020 17:04
@joe-elliott joe-elliott changed the title Additional headers Allow the Configuration of Additional Headers on the Jaeger Query HTTP API Feb 5, 2020
@codecov
Copy link

codecov bot commented Feb 5, 2020

Codecov Report

Merging #2056 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2056      +/-   ##
=========================================
+ Coverage   97.39%   97.4%   +<.01%     
=========================================
  Files         207     209       +2     
  Lines       10307   10340      +33     
=========================================
+ Hits        10039   10072      +33     
  Misses        224     224              
  Partials       44      44
Impacted Files Coverage Δ
cmd/query/app/additional_headers_handler.go 100% <100%> (ø)
cmd/query/app/flags.go 100% <100%> (ø) ⬆️
cmd/query/app/server.go 91.78% <100%> (+0.11%) ⬆️
pkg/config/string_slice.go 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29e7131...bc95bb2. Read the comment docs.

cmd/query/app/flags.go Show resolved Hide resolved
cmd/query/app/http_handler.go Outdated Show resolved Hide resolved
cmd/query/app/server.go Outdated Show resolved Hide resolved
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
joe-elliott and others added 6 commits February 8, 2020 07:22
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-Authored-By: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yurishkuro
Copy link
Member

restarting unit tests to get the coverage numbers (call to codecov timed out)

@yurishkuro yurishkuro merged commit df16a71 into jaegertracing:master Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CORS handling to query API
2 participants