Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing RC capabilities #3888

Merged
merged 4 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/datadog/tracing/remote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ class << self
PRODUCT = 'APM_TRACING'

CAPABILITIES = [
1 << 29 # APM_TRACING_SAMPLE_RULES: Dynamic trace sampling rules configuration
1 << 12, # APM_TRACING_SAMPLE_RATE: Dynamic trace sampling rate configuration
1 << 13, # APM_TRACING_LOGS_INJECTION: Dynamic trace logs injection configuration
1 << 14, # APM_TRACING_HTTP_HEADER_TAGS: Dynamic trace HTTP header tags configuration
1 << 29, # APM_TRACING_SAMPLE_RULES: Dynamic trace sampling rules configuration
].freeze

def products
Expand Down
6 changes: 3 additions & 3 deletions spec/datadog/core/remote/client/capabilities_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

describe '#base64_capabilities' do
it 'matches tracing capabilities only' do
expect(capabilities.base64_capabilities).to eq('IAAAAA==')
expect(capabilities.base64_capabilities).to eq('IABwAA==')
end
end
end
Expand All @@ -53,7 +53,7 @@

describe '#base64_capabilities' do
it 'matches tracing capabilities only' do
expect(capabilities.base64_capabilities).to eq('IAAAAA==')
expect(capabilities.base64_capabilities).to eq('IABwAA==')
end
end
end
Expand Down Expand Up @@ -85,7 +85,7 @@

context 'Tracing component' do
it 'register capabilities, products, and receivers' do
expect(capabilities.capabilities).to eq([1 << 29])
expect(capabilities.capabilities).to contain_exactly(1 << 12, 1 << 13, 1 << 14, 1 << 29)
expect(capabilities.products).to include('APM_TRACING')
expect(capabilities.receivers).to include(
lambda { |r|
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/tracing/remote_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
end

it 'declares rule sampling capabilities' do
expect(remote.capabilities).to eq([1 << 29])
expect(remote.capabilities).to contain_exactly(1 << 12, 1 << 13, 1 << 14, 1 << 29)
end

it 'declares matches that match APM_TRACING' do
Expand Down
Loading