Skip to content

Commit dc069a9

Browse files
committed
chore: bump minimal API version to 1.7, rename ldap.base to ldap.tree.base, add runtime dependency on semconv ~> 1.36
1 parent 26c3208 commit dc069a9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

instrumentation/net_ldap/lib/opentelemetry/instrumentation/net/ldap/instrumentation_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def initialize(args = {})
2727
def instrument(event, payload)
2828
attributes = {
2929
'ldap.auth' => auth.except(:password).to_json,
30-
'ldap.base' => base,
30+
'ldap.tree.base' => base,
3131
'ldap.encryption' => encryption.to_json,
3232
'ldap.request.message' => payload.to_json,
3333
OpenTelemetry::SemConv::SERVER::SERVER_ADDRESS => host || hosts,

instrumentation/net_ldap/opentelemetry-instrumentation-net_ldap.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
2525
spec.require_paths = ['lib']
2626
spec.required_ruby_version = ">= #{File.read(File.expand_path('../../gemspecs/RUBY_REQUIREMENT', __dir__))}"
2727

28-
spec.add_dependency 'opentelemetry-api', '~> 1.0'
29-
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'
28+
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.24'
29+
spec.add_dependency 'opentelemetry-semantic_conventions', '~> 1.36'
3030

3131
if spec.respond_to?(:metadata)
3232
spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"

instrumentation/net_ldap/test/opentelemetry/instrumentation/net/ldap/instrumentation_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ def modify(args)
7676
_(exporter.finished_spans.size).must_equal 1
7777
_(span.name).must_equal 'bind.net_ldap'
7878
_(span.attributes['ldap.auth']).must_equal '{"method":"anonymous"}'
79-
_(span.attributes['ldap.base']).must_equal 'dc=com'
8079
_(span.attributes['ldap.encryption']).must_equal '{"method":"simple_tls","tls_options":{"foo":"bar"}}'
8180
_(span.attributes['ldap.request.message']).must_equal '{}'
8281
_(span.attributes['ldap.response.status_code']).must_equal 0
82+
_(span.attributes['ldap.tree.base']).must_equal 'dc=com'
8383
_(span.attributes['network.protocol.name']).must_equal 'ldap'
8484
_(span.attributes['peer.service']).must_equal 'test:ldap'
8585
_(span.attributes['server.address']).must_equal 'test.mocked.com'
@@ -95,10 +95,10 @@ def modify(args)
9595
_(exporter.finished_spans.size).must_equal 1
9696
_(span.name).must_equal 'search.net_ldap'
9797
_(span.attributes['ldap.auth']).must_equal '{"method":"anonymous"}'
98-
_(span.attributes['ldap.base']).must_equal 'dc=com'
9998
_(span.attributes['ldap.encryption']).must_equal '{"method":"simple_tls","tls_options":{"foo":"bar"}}'
10099
_(span.attributes['ldap.request.message']).must_equal '{"filter":"(uid=user1)","paged_searches_supported":false,"base":"dc=com"}'
101100
_(span.attributes['ldap.response.status_code']).must_equal 0
101+
_(span.attributes['ldap.tree.base']).must_equal 'dc=com'
102102
_(span.attributes['network.protocol.name']).must_equal 'ldap'
103103
_(span.attributes['peer.service']).must_equal 'test:ldap'
104104
_(span.attributes['server.address']).must_equal 'test.mocked.com'
@@ -119,9 +119,9 @@ def modify(args)
119119
_(span.attributes['error.message']).must_equal 'Connection timed out - user specified timeout'
120120
_(span.attributes['error.type']).must_equal 'Net::LDAP::Error'
121121
_(span.attributes['ldap.auth']).must_equal '{"method":"anonymous"}'
122-
_(span.attributes['ldap.base']).must_equal 'dc=com'
123122
_(span.attributes['ldap.encryption']).must_equal '{"method":"simple_tls","tls_options":{"foo":"bar"}}'
124123
_(span.attributes['ldap.request.message']).must_equal '{}'
124+
_(span.attributes['ldap.tree.base']).must_equal 'dc=com'
125125
_(span.attributes['network.protocol.name']).must_equal 'ldap'
126126
_(span.attributes['peer.service']).must_equal 'test:ldap'
127127
_(span.attributes['server.address']).must_equal 'test.mocked.com'
@@ -140,10 +140,10 @@ def modify(args)
140140
_(exporter.finished_spans.size).must_equal 1
141141
_(span.name).must_equal 'modify.net_ldap'
142142
_(span.attributes['ldap.auth']).must_equal '{"method":"anonymous"}'
143-
_(span.attributes['ldap.base']).must_equal 'dc=com'
144143
_(span.attributes['ldap.encryption']).must_equal '{"method":"simple_tls","tls_options":{"foo":"bar"}}'
145144
_(span.attributes['ldap.request.message']).must_equal '{"dn":"CN=test,OU=test,DC=com","operations":[["replace","unicodePwd",["[REDACTED]"]]]}'
146145
_(span.attributes['ldap.response.status_code']).must_equal 0
146+
_(span.attributes['ldap.tree.base']).must_equal 'dc=com'
147147
_(span.attributes['network.protocol.name']).must_equal 'ldap'
148148
_(span.attributes['peer.service']).must_equal 'test:ldap'
149149
_(span.attributes['server.address']).must_equal 'test.mocked.com'

0 commit comments

Comments
 (0)