@@ -78,10 +78,11 @@ def modify(args)
7878 _ ( span . attributes [ 'ldap.auth' ] ) . must_equal '{"method":"anonymous"}'
7979 _ ( span . attributes [ 'ldap.base' ] ) . must_equal 'dc=com'
8080 _ ( span . attributes [ 'ldap.encryption' ] ) . must_equal '{"method":"simple_tls","tls_options":{"foo":"bar"}}'
81- _ ( span . attributes [ 'ldap.payload' ] ) . must_equal '{}'
82- _ ( span . attributes [ 'ldap.status_code' ] ) . must_equal 0
83- _ ( span . attributes [ 'net.peer.name' ] ) . must_equal 'test.mocked.com'
84- _ ( span . attributes [ 'net.peer.port' ] ) . must_equal 636
81+ _ ( span . attributes [ 'ldap.request.message' ] ) . must_equal '{}'
82+ _ ( span . attributes [ 'ldap.response.status_code' ] ) . must_equal 0
83+ _ ( span . attributes [ 'network.protocol.name' ] ) . must_equal 'ldap'
84+ _ ( span . attributes [ 'server.address' ] ) . must_equal 'test.mocked.com'
85+ _ ( span . attributes [ 'server.port' ] ) . must_equal 636
8586 end
8687 end
8788
@@ -95,10 +96,11 @@ def modify(args)
9596 _ ( span . attributes [ 'ldap.auth' ] ) . must_equal '{"method":"anonymous"}'
9697 _ ( span . attributes [ 'ldap.base' ] ) . must_equal 'dc=com'
9798 _ ( span . attributes [ 'ldap.encryption' ] ) . must_equal '{"method":"simple_tls","tls_options":{"foo":"bar"}}'
98- _ ( span . attributes [ 'ldap.payload' ] ) . must_equal '{"filter":"(uid=user1)","paged_searches_supported":false,"base":"dc=com"}'
99- _ ( span . attributes [ 'ldap.status_code' ] ) . must_equal 0
100- _ ( span . attributes [ 'net.peer.name' ] ) . must_equal 'test.mocked.com'
101- _ ( span . attributes [ 'net.peer.port' ] ) . must_equal 636
99+ _ ( span . attributes [ 'ldap.request.message' ] ) . must_equal '{"filter":"(uid=user1)","paged_searches_supported":false,"base":"dc=com"}'
100+ _ ( span . attributes [ 'ldap.response.status_code' ] ) . must_equal 0
101+ _ ( span . attributes [ 'network.protocol.name' ] ) . must_equal 'ldap'
102+ _ ( span . attributes [ 'server.address' ] ) . must_equal 'test.mocked.com'
103+ _ ( span . attributes [ 'server.port' ] ) . must_equal 636
102104 end
103105 end
104106
@@ -112,13 +114,15 @@ def modify(args)
112114
113115 _ ( exporter . finished_spans . size ) . must_equal 1
114116 _ ( span . name ) . must_equal 'add.net_ldap'
117+ _ ( span . attributes [ 'error.message' ] ) . must_equal 'Connection timed out - user specified timeout'
118+ _ ( span . attributes [ 'error.type' ] ) . must_equal 'Net::LDAP::Error'
115119 _ ( span . attributes [ 'ldap.auth' ] ) . must_equal '{"method":"anonymous"}'
116120 _ ( span . attributes [ 'ldap.base' ] ) . must_equal 'dc=com'
117121 _ ( span . attributes [ 'ldap.encryption' ] ) . must_equal '{"method":"simple_tls","tls_options":{"foo":"bar"}}'
118- _ ( span . attributes [ 'ldap.payload ' ] ) . must_equal '{}'
119- _ ( span . attributes [ 'ldap.error_message ' ] ) . must_equal 'Net::LDAP::Error: Connection timed out - user specified timeout '
120- _ ( span . attributes [ 'net.peer.name ' ] ) . must_equal 'test.mocked.com'
121- _ ( span . attributes [ 'net.peer .port' ] ) . must_equal 636
122+ _ ( span . attributes [ 'ldap.request.message ' ] ) . must_equal '{}'
123+ _ ( span . attributes [ 'network.protocol.name ' ] ) . must_equal 'ldap '
124+ _ ( span . attributes [ 'server.address ' ] ) . must_equal 'test.mocked.com'
125+ _ ( span . attributes [ 'server .port' ] ) . must_equal 636
122126 end
123127 end
124128
@@ -135,10 +139,11 @@ def modify(args)
135139 _ ( span . attributes [ 'ldap.auth' ] ) . must_equal '{"method":"anonymous"}'
136140 _ ( span . attributes [ 'ldap.base' ] ) . must_equal 'dc=com'
137141 _ ( span . attributes [ 'ldap.encryption' ] ) . must_equal '{"method":"simple_tls","tls_options":{"foo":"bar"}}'
138- _ ( span . attributes [ 'ldap.payload' ] ) . must_equal '{"dn":"CN=test,OU=test,DC=com","operations":[["replace","unicodePwd",["[REDACTED]"]]]}'
139- _ ( span . attributes [ 'ldap.status_code' ] ) . must_equal 0
140- _ ( span . attributes [ 'net.peer.name' ] ) . must_equal 'test.mocked.com'
141- _ ( span . attributes [ 'net.peer.port' ] ) . must_equal 636
142+ _ ( span . attributes [ 'ldap.request.message' ] ) . must_equal '{"dn":"CN=test,OU=test,DC=com","operations":[["replace","unicodePwd",["[REDACTED]"]]]}'
143+ _ ( span . attributes [ 'ldap.response.status_code' ] ) . must_equal 0
144+ _ ( span . attributes [ 'network.protocol.name' ] ) . must_equal 'ldap'
145+ _ ( span . attributes [ 'server.address' ] ) . must_equal 'test.mocked.com'
146+ _ ( span . attributes [ 'server.port' ] ) . must_equal 636
142147 end
143148 end
144149 end
0 commit comments