You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tracer.rb
    path of file: ./repos/dd-trace-rb/lib/datadog/tracing/contrib/shoryuken
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative '../analytics'

module Datadog
  module Tracing
    module Contrib
      module Shoryuken
        # Tracer is a Shoryuken server-side middleware which traces executed jobs
        class Tracer
          def initialize(options = {})
            @shoryuken_service = options[:service_name] || configuration[:service_name]
            @er
    
          def call(worker_instance, queue, sqs_msg, body)
            Tracing.trace(
              Ext::SPAN_JOB,
              service: @shoryuken_service,
              span_type: Tracing::Metadata::Ext::AppTypes::TYPE_WORKER,
              on_error: @error_handler
            ) do |span|
              span.set_tag(Contrib::Ext::Messaging::TAG_SYSTEM, Ext::TAG_MESSAGING_SYSTEM)

              span.set_tag(Tracing::Metadata::Ext::TAG_COMPONENT, Ext::TAG_COMPONENT)
              span.set_tag(Tracing::Metadata::Ext::TAG_OPERATION, Ext::TAG_OPERATION_JOB)

              # Set analytics sample rate
              if Contrib::Analytics.enabled?(configuration[:analytics_enabled])
                Contrib::Analytics.set_sample_rate(span, configuration[:analytics_sample_rate])
              end

              # Measure service stats
              Contrib::Analytics.set_measured(span)

              span.resource = resource(worker_instance, body)
              span.set_tag(Ext::TAG_JOB_ID, sqs_msg.message_id)
              span.set_tag(Ext::TAG_JOB_QUEUE, queue)
              span.set_tag(Ext::TAG_JOB_ATTRIBUTES, sqs_msg.attributes) if sqs_msg.respond_to?(:attributes)
              span.set_tag(Ext::TAG_JOB_BODY, body) if configuration[:tag_body]

              span.set_tag(Tracing::Metadata::Ext::TAG_KIND, Tracing::Metadata::Ext::SpanKind::TAG_CONSUMER)

              yield
            end