Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Provide ability for clients to add HTTP headers #479

Merged
merged 1 commit into from
Dec 17, 2019

Conversation

albertteoh
Copy link
Contributor

@albertteoh albertteoh commented Dec 16, 2019

Which problem is this PR solving?

Resolves: #478

When services, such as jaeger-collector, are deployed to production, they are assigned ephemeral IP addresses and ports when listening for HTTP requests.

In order for caller services (whether calling from development or production) to reach specific endpoints of callee services, a side-car process is used to route the outbound request to the correct IP and port which is achieved by providing the:

  • caller service name
  • target service name
  • target HTTP endpoint

Currently, jaeger-client-go does not provide a capability for clients to flexibly add headers to the outbound HTTP request.

Short description of the changes

  • Add a key-value map Headers to ReporterConfig
  • This allows clients to configure custom headers which will be passed to the NewHTTPTransport
  • These custom headers will be set in the outbound HTTP request when submitting spans

@codecov
Copy link

codecov bot commented Dec 16, 2019

Codecov Report

Merging #479 into master will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #479     +/-   ##
=========================================
+ Coverage    88.1%   88.21%   +0.1%     
=========================================
  Files          59       59             
  Lines        3507     3512      +5     
=========================================
+ Hits         3090     3098      +8     
+ Misses        305      302      -3     
  Partials      112      112
Impacted Files Coverage Δ
transport/http.go 83.82% <100%> (+1.28%) ⬆️
config/config.go 95.3% <100%> (+2.01%) ⬆️

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 15ec52a...388f357. Read the comment docs.

config/config.go Outdated Show resolved Hide resolved
@albertteoh albertteoh force-pushed the add-header branch 3 times, most recently from 0ef89a9 to c847fd1 Compare December 16, 2019 23:06
config/config.go Outdated Show resolved Hide resolved
Signed-off-by: Albert Teoh <albteo@uber.com>
@yurishkuro yurishkuro merged commit 667bc9e into jaegertracing:master Dec 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide ability for clients to add HTTP headers
2 participants