Skip to content

Commit

Permalink
Merge pull request #2619 from DataDog/zarir/dalli-spankind
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc authored Feb 15, 2023
2 parents 849af21 + 89786ea commit ba7fd9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/datadog/tracing/contrib/dalli/instrumentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def request(op, *args)
span.service = datadog_configuration[:service_name]
span.span_type = Ext::SPAN_TYPE_COMMAND

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

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

Expand Down
2 changes: 2 additions & 0 deletions spec/datadog/tracing/contrib/dalli/instrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
expect(span.get_tag('out.host')).to eq(test_host)
expect(span.get_tag('out.port')).to eq(test_port.to_f)
expect(span.get_tag('db.system')).to eq('memcached')
expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_KIND)).to eq('client')
expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_COMPONENT)).to eq('dalli')
expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_OPERATION)).to eq('command')
end
Expand Down Expand Up @@ -95,6 +96,7 @@
expect(span.get_tag('out.port')).to eq(test_port.to_f)

expect(span.get_tag('db.system')).to eq('memcached')
expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_KIND)).to eq('client')
expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_COMPONENT)).to eq('dalli')
expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_OPERATION)).to eq('command')
end
Expand Down

0 comments on commit ba7fd9c

Please sign in to comment.