Skip to content

Commit

Permalink
Added text propagator for propagating the context
Browse files Browse the repository at this point in the history
  • Loading branch information
pinglamb committed Apr 23, 2020
1 parent 3cc4ff9 commit d154846
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/grpc/greeter_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def initialize

def request_response(request:, call:, method:)
# Extract context from request headers
# context = OpenTelemetry.propagation.http.extract(env)
context = OpenTelemetry.propagation.text.extract(call.metadata)

# Expected span name format: $package.$service/$method
span_name = "#{method.owner.service_name}/#{camelcase(method.name.to_s)}"
Expand All @@ -39,7 +39,7 @@ def request_response(request:, call:, method:)
'net.peer.port' => peer_port
},
kind: :server,
# with_parent_context: context
with_parent_context: context
) do |span|
begin
span.status = OpenTelemetry::Trace::Status::OK
Expand Down

0 comments on commit d154846

Please sign in to comment.