Skip to content

add Jaeger target#384

Merged
haf merged 9 commits intomasterfrom
jaeger-target
Jan 7, 2019
Merged

add Jaeger target#384
haf merged 9 commits intomasterfrom
jaeger-target

Conversation

@lust4life
Copy link
Contributor

it works:

image

@haf
Copy link
Member

haf commented Dec 28, 2018

This is good code; I think it needs a test suite, too.

Copy link
Member

@haf haf left a comment

Choose a reason for hiding this comment

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

This;

  • needs unit/integration tests like the other targets
  • needs to add docs into the readme
  • needs to discuss, either in code, or here, how child spans are to be sent and,
  • needs to discuss the limitations of the existing code and how it is to be extended

It would be nice to also document how to run a minikube or docker-compose with Jaeger; I'll then test it locally before releasing it.

@haf
Copy link
Member

haf commented Jan 7, 2019

Nice! Do you think you could bump paket as well, and I'll make a new release tonight?

@haf
Copy link
Member

haf commented Jan 7, 2019

Ping @lapponiandevil — this should interest you

@lust4life
Copy link
Contributor Author

@haf away from laptop few days,

  • add ut for jaeger target.
  • add usage in readme

needs to discuss, either in code, or here, how child spans are to be sent

span are created from logger, and inherit IDisposable, have a finish method, user can use one of them(Dispose/finish) to trigger the log action (generate span info, use its logger to send them to targets).

before the span finish, every log message produced are belong to this span (if they are flow the execution context and using ambientSpanId middleware to set the parentSpanInfo or parentSpanId). And user can set them explicitly, if they cann't use the ambient info.

when target receive a log message (message without spanInfo context),

  • it will be appended to buffer waiting for its span to finish. If it has no spanId context , it will be dropped, since jaeger target will only process span and its logs. (this can be filtered before sending to targets by config a pipeline)
  • if its span message (message with spanInfo context) arrived, it will find its log messages and generate a jaeger span, if reach the target's conf BatchSpanSize, it will be sent to jaeger's agent through a udp client. if not, it will append to a buffer.
  • the AutoFlushInterval in conf is used for a time control, when span is not reach the limit size and there is not any new span created.
  • the RetentionTime in conf is used for a situation if user forget to finish its span, the log message generated will be gc after this RetentionTime. Avoid memory leaks.

@haf haf merged commit e0aebb3 into master Jan 7, 2019
@haf haf deleted the jaeger-target branch January 7, 2019 16:10
@lust4life
Copy link
Contributor Author

needs to discuss the limitations of the existing code and how it is to be extended

limitations:

@lust4life
Copy link
Contributor Author

It would be nice to also document how to run a minikube or docker-compose with Jaeger; I'll then test it locally before releasing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

try add a target for jaeger tracing

2 participants