Skip to content

Commit

Permalink
chore: update examples for datadog propagation (#3803)
Browse files Browse the repository at this point in the history
update datadog example
  • Loading branch information
danielbdias authored May 16, 2024
1 parent f5d7cb6 commit 5931da3
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gem "puma", "~> 5.6"
gem "tzinfo-data"

# Adding support for Datadog
gem "ddtrace", require: "ddtrace/auto_instrument"
gem "ddtrace", "1.23.0", require: "ddtrace/auto_instrument"

# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Tracing
module Transport
class SerializableTrace
def to_msgpack(packer = nil)
if ENV.has_key?('INJECT_UPPER_TRACE_ID')
if !ENV.has_key?('INJECT_UPPER_TRACE_ID')
return trace.spans.map { |s| SerializableSpan.new(s) }.to_msgpack(packer)
end

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
type: Test
spec:
id: CdhJp_xIR
name: Test observability integration between OTelSDK-instrumented API to Datadog-instrumented API
trigger:
type: http
httpRequest:
method: GET
url: http://api-otel:8080/remotehello
headers:
- key: Content-Type
value: application/json
specs:
- selector: "span[tracetest.span.type=\"http\" name=\"HelloController#remote_hello\" http.target=\"/remotehello\" http.method=\"GET\"]"
name: OpenAPI-instrumented API has been called
assertions:
- attr:http.status_code = 200
- selector: span[tracetest.span.type="http" name="rack.request" http.method="GET"]
name: Datadog-instrumented API has been called
assertions:
- attr:http.status_code = 200
10 changes: 10 additions & 0 deletions examples/datadog-propagation/tracebased-tests/tracing-backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: DataStore
spec:
id: current
name: Jaeger Tracing Backend
type: jaeger
default: true
jaeger:
endpoint: jaeger:16685
tls:
insecure: true

0 comments on commit 5931da3

Please sign in to comment.