Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8467

Fixing trace creation if/else flow in ActivateTracingSpan

XMLWordPrintable

      I identified an issue with the ActivateTracingSpan SMT (with the Debezium versions we've been using – 2.6, 2.7, 3.0).

      Contrary to what the docs state, the tracing.with.context.field.only setting currently has no effect and when no context is passed through a SQL table cell, no traces are emitted, no matter what.

      The bug comes down to how the if/else statement is written:

      current pseudo code is:

      IF no trace_context
          IF require_context_field
              THEN: return untraced record
      ELSE: return traced record 

      when it should be:

      IF no trace_context
          IF require_context_field
              THEN: return untraced record
          ELSE: return traced record
      ELSE: return traced record 

      Or better yet:

      IF no trace_context AND require_context_field
          THEN: return untraced record
      ELSE: return traced record 

       
       
      We already have a fix for it that I will offer as a GitHub PR

              Unassigned Unassigned
              jean.vintache.dd Jean Vintache
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: