jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.22k stars 2.41k forks source link

[Feature]: Expose all-in-one as a package to allowing embedding an ephemeral Jaeger server for integration tests #4022

Open andreib1 opened 1 year ago

andreib1 commented 1 year ago

Requirement

As a Jaeger Exported developer I want to be able to embed an ephemeral all-in-one Jaeger server So that I can run integration tests all in-process.

Thank you.

Problem

The all-in-one main.go code references internal packages. This stops me from using similar code to start an ephemeral Jaeger server in-process.

Proposal

If this was changed so that main.go created an exported (non internal) JaegerAllInOne struct eg.

j := &JaegerAllInOne{}
j.Start()
defer j.Shutdown()
// Code to wait for sigterm goes here

It could allow developers to run up a quick local Jaeger instance while running tests.

Open questions

No response

yurishkuro commented 1 year ago

Why do you need to build a Jaeger exporter in the first place? See https://medium.com/jaegertracing/better-alignment-with-opentelemetry-by-focusing-on-otlp-f3688939073f

andreib1 commented 1 year ago

The trace we are outputting to Jaeger is a non-standard trace where the start and end of a span are not in the same processing domain. see: https://go-workflow.com or https://gitlab.com/shar-workflow/shar/-/tree/main/telemetry Jaeger is being used to trace BPMN workflow activities.

andreib1 commented 1 year ago

I understand and appreciate your suggestion, and will probably find a way to hack OLTP in a similar way. The question is however orthogonal to my requirement. Either way, I would like to bring up Jaeger to ensure the correct values have been recorded in the trace.

andreib1 commented 1 year ago

Sorry, I meant to give you a more specific example of what the application does. https://go-workflow.com/architecture/engine/

clarkmcc commented 1 year ago

This would be useful for other reasons as well. I've got enterprise-level Go applications running on customer servers. Occasionally it would be nice to review traces by embedding jaeger in our Go application and exporting traces directly to it. Expecting customers to set up Docker on these servers and maintain a separate jaeger instance is probably not an option.