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

Add Configuration support for custom Injector and Extractor #263

Merged

Conversation

martinxsliu
Copy link
Contributor

@martinxsliu martinxsliu commented Feb 12, 2018

Re: #262

This PR adds the ability to specify custom Injectors and Extractors when creating new Tracers using the Configuration struct.

Usage:

c := jaegerconfig.Configuration{}

tracer, closer, err := c.New(
	"service",
	jaegerconfig.Injector("custom.format", CustomInjector{}),
	jaegerconfig.Extractor("custom.format", CustomExtractor{}),
)

@martinxsliu martinxsliu force-pushed the configuration-injector-extractor branch from 4461595 to d48354e Compare February 12, 2018 23:56
@codecov
Copy link

codecov bot commented Feb 12, 2018

Codecov Report

Merging #263 into master will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #263      +/-   ##
==========================================
+ Coverage   84.95%   85.02%   +0.07%     
==========================================
  Files          51       51              
  Lines        2705     2718      +13     
==========================================
+ Hits         2298     2311      +13     
  Misses        287      287              
  Partials      120      120
Impacted Files Coverage Δ
config/options.go 100% <100%> (ø) ⬆️
config/config.go 94.06% <100%> (+0.26%) ⬆️

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 f6dd779...d48354e. Read the comment docs.

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.

Nice! Thanks!

@yurishkuro yurishkuro merged commit 5060079 into jaegertracing:master Feb 13, 2018
@martinxsliu martinxsliu deleted the configuration-injector-extractor branch February 13, 2018 18:53
isaachier pushed a commit to isaachier/jaeger-client-go that referenced this pull request Mar 26, 2018
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.

2 participants