lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb in ls-trace-0.1.2 vs lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb in ls-trace-0.2.0
- old
+ new
@@ -33,11 +33,11 @@
def set_distributed_context!(tracer, metadata)
tracer.provider.context = Datadog::GRPCPropagator
.extract(metadata)
rescue StandardError => e
- Datadog::Tracer.log.debug(
+ Datadog.logger.debug(
"unable to propagate GRPC metadata to context: #{e}"
)
end
def annotate!(span, metadata)
@@ -46,11 +46,14 @@
span.set_tag(header, value)
end
# Set analytics sample rate
Contrib::Analytics.set_sample_rate(span, analytics_sample_rate) if analytics_enabled?
+
+ # Measure service stats
+ Contrib::Analytics.set_measured(span)
rescue StandardError => e
- Datadog::Tracer.log.debug("GRPC client trace failed: #{e}")
+ Datadog.logger.debug("GRPC client trace failed: #{e}")
end
def reserved_headers
[Datadog::Ext::DistributedTracing::GRPC_METADATA_TRACE_ID,
Datadog::Ext::DistributedTracing::GRPC_METADATA_PARENT_ID,