Comments (13)
do you have it written already? I'd be curious to see it first, just as a paste.
from jaeger-client-go.
Nothing special really:
// kitLogger wraps the application logger instance in a Jaeger compatible one.
type kitLogger struct {
logger log.Logger
}
// Error implements the github.com/uber/jaeger-client-go/log.Logger interface.
func (l *kitLogger) Error(msg string) {
level.Error(l.logger).Log("msg", msg)
}
// Infof implements the github.com/uber/jaeger-client-go/log.Logger interface.
func (l *kitLogger) Infof(msg string, args ...interface{}) {
level.Info(l.logger).Log("msg", fmt.Sprintf(msg, args...))
}
Needs a constructor and exporting a few bits. It would probably make sense to call level.* once and store the two leveled loggers.
Another feature could be changing the message key, as in case of the go-kit stdlog wrapper.
from jaeger-client-go.
Thanks. I wonder if it could be added simply as a recipe somewhere in the docs rather than part of the library, because it can't compile without requiring a dependency on go-kit. Or a separate small repo, like jaegertracing/go-client-gokit
from jaeger-client-go.
Fine by me. Though the jaeger-lib package already requires the go-kit package for metrics stuff.
from jaeger-client-go.
@sagikazarmark that's true, but if you look at glide.lock, the only thing that gets directly imported into the client is this:
- name: github.com/uber/jaeger-lib
version: 575c678b2873b62aaadd0fa5817a2aeb3155dc4d
subpackages:
- metrics
- metrics/testutils
The go-kit is not imported unless the end-user project wants to use its bindings.
My suggestion is to put your code into a github gist and submit a PR to this project with an update to README mentioning that there's the binding for go-kit.
from jaeger-client-go.
Which do you think would be better? A gist or a separate repo.
While I'm all for copying small amount of code which just works and never needs to be modified, one would prefer an installable package. A repo would let the user choose (copy/install) and we could write tests (even if that doesn't add much).
from jaeger-client-go.
another option is to put this into jaeger-lib, e.g. in client/log/gokit
from jaeger-client-go.
from jaeger-client-go.
yes, please
from jaeger-client-go.
Done, see PR above.
from jaeger-client-go.
once that PR is merged, we should make an entry in the README here
from jaeger-client-go.
Should I add a note in the readme?
from jaeger-client-go.
yes please
from jaeger-client-go.
Related Issues (20)
- New release 2.26 HOT 2
- go get v2.26.0 checksum mismatch HOT 8
- RemotelyControlledSampler.Close() stuck due to networking issues HOT 1
- Probabilistic sampler causes trace collisions HOT 1
- Import of "testing" package HOT 4
- Issue found by Svace static analyzer HOT 1
- codahale/hdrhistogram has transferred it's repo
- Span.SetTag does not behave like the opentracing Span interface docs
- consider add more verbosity to error for http span sender
- make install always downloads linux version of 'dep' HOT 1
- A Questions about sampling rate HOT 2
- Connecting jaegertracing-client-go from WSL2
- Suggest to support zipkin mode (and additional baggage prefix) from environment variable
- 128 bit mode should be default HOT 5
- sampler logger is NullLogger
- [Bug]: writeField5 panic
- [Bug]: Sampler tags are missing in root span generated from startSpan
- [Bug]: Performance impact of sprintf HOT 1
- [Bug]: mismatched parameters HOT 1
- [Bug]: `config.Configuration.InitGlobalTracer` panics if `http.DefaultTransport` is not a `*http.Transport`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jaeger-client-go.