Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JaegerExporter GenerateServiceSpecificBatches option #1498

Conversation

CodeBlanch
Copy link
Member

@CodeBlanch CodeBlanch commented Nov 10, 2020

Fixes #1388.

Public API Changes

Makes the JaegerExporter batch behavior configurable by adding a new option:

        /// <summary>
        /// Gets or sets a value indicating whether or not a batch should be sent to the Jaeger agent for each service. Default value: true.
        /// </summary>
        /// <remarks>
        /// Jaeger UI will only detect &amp; color dependency spans when both
        /// the client &amp; server processes report data to the same Jaeger
        /// instance. For processes that make calls to non-instrumented services
        /// (third parties, SQL, legacy systems, etc.) the
        /// GenerateServiceSpecificBatches flag is provided to trick Jaeger into
        /// correctly detecting and displaying all dependent spans as if both
        /// sides reported data. For more details, see <a
        /// href="https://github.com/jaegertracing/jaeger-ui/issues/594">jaeger-ui/issues/594</a>.
        /// </remarks>
        public bool GenerateServiceSpecificBatches { get; set; } = true;

Examples

GenerateServiceSpecificBatches = true

image

GenerateServiceSpecificBatches = false

image

TODOs

  • CHANGELOG.md updated for non-trivial changes
  • Changes in public API reviewed

@CodeBlanch CodeBlanch requested a review from a team November 10, 2020 01:59
@codecov
Copy link

codecov bot commented Nov 10, 2020

Codecov Report

Merging #1498 (5c74376) into master (fa1e17f) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1498      +/-   ##
==========================================
- Coverage   81.25%   81.25%   -0.01%     
==========================================
  Files         232      232              
  Lines        6312     6316       +4     
==========================================
+ Hits         5129     5132       +3     
- Misses       1183     1184       +1     
Impacted Files Coverage Δ
...rc/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs 85.41% <100.00%> (+0.47%) ⬆️
...Telemetry.Exporter.Jaeger/JaegerExporterOptions.cs 100.00% <100.00%> (ø)
...ZPages/Implementation/ZPagesExporterEventSource.cs 56.25% <0.00%> (-6.25%) ⬇️

@yurishkuro
Copy link
Member

While I understand the desire behind this config option, I still think it's a bad thing for the SDK to support the ability to generate misleading data. I provided more reasoning in the ticket #1388 (comment)

@CodeBlanch
Copy link
Member Author

@yurishkuro Did you see the images in the description? A thousand words, as they say. That test is mixing in instrumented and un-instrumented services. First one looks great, easy to understand, conveys a lot of meaning, shows relationships at a glance. The second one takes many more mental cycles to derive the same information.

@ndrwrbgs
Copy link
Contributor

ndrwrbgs commented Nov 10, 2020

Yuri, does Jaeger only wish to support setups that have 100% tracing (all only in Jaeger)?

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -48,5 +48,20 @@ public class JaegerExporterOptions
/// Gets or sets the tags that should be sent with telemetry.
/// </summary>
public IEnumerable<KeyValuePair<string, object>> ProcessTags { get; set; }

/// <summary>
/// Gets or sets a value indicating whether or not a batch should be sent to the Jaeger agent for each service. Default value: true.
Copy link
Member

Choose a reason for hiding this comment

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

Given there is a concern that this causes exporter to send "incorrect" data, should we make this default to "false", so that SDK by default exports correct data. If a user want to send "incorrect" data to have better UI experience, let them explicitly opt-in to this behavior?

Copy link
Member

Choose a reason for hiding this comment

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

I think the incorrect behavior should be removed altogether, without options to enable it. The Jaeger UI enhancement is already being added in jaegertracing/jaeger-ui#659

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to verify everything works with the new Jaeger UI and then I'll open a PR to remove the hack. Question, is a note in CHANGELOG recommending users upgrade Jaeger UI to restore the functionality sufficient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect conversion to Jaeger model
6 participants