Skip to content

Commit fba070d

Browse files
chore: do not use Span.set_tag_str (#669)
* chore: do not use Span.set_tag_str Use Span.set_tag instead. Span.set_tag_str is being deprecated and removed * update to use node 20 for ci --------- Co-authored-by: Joey Zhao <[email protected]>
1 parent 56152da commit fba070d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ci/input_files/build.yaml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ default:
2727
- apt-get install -y ca-certificates curl gnupg xxd
2828
- mkdir -p /etc/apt/keyrings
2929
- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
30-
# We are explicitly setting the node_18.x version for the installation
31-
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
30+
# We are explicitly setting the node_20.x version for the installation
31+
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
3232
- apt-get update
3333
- apt-get install nodejs -y
3434
- npm install --global yarn

datadog_lambda/asm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def asm_start_request(
126126

127127
request_ip = _get_request_header_client_ip(request_headers, peer_ip, True)
128128
if request_ip is not None:
129-
span.set_tag_str("http.client_ip", request_ip)
130-
span.set_tag_str("network.client.ip", request_ip)
129+
span.set_tag("http.client_ip", request_ip)
130+
span.set_tag("network.client.ip", request_ip)
131131

132132
# Encode the parsed query and append it to reconstruct the original raw URI expected by AppSec.
133133
if parsed_query:

tests/test_asm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ def test_asm_start_request_parametrized(
331331

332332
# Check IP tags were set if IP is present
333333
if expected_ip:
334-
mock_span.set_tag_str.assert_any_call("http.client_ip", expected_ip)
335-
mock_span.set_tag_str.assert_any_call("network.client.ip", expected_ip)
334+
mock_span.set_tag.assert_any_call("http.client_ip", expected_ip)
335+
mock_span.set_tag.assert_any_call("network.client.ip", expected_ip)
336336

337337

338338
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)