Skip to content

Commit

Permalink
[nodejs] enable crashtracking tests (#3517)
Browse files Browse the repository at this point in the history
  • Loading branch information
rochdev authored Nov 21, 2024
1 parent c38d143 commit 3ce4399
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ refs:
- &ref_5_24_0 '>=5.24.0 || ^4.48.0'
- &ref_5_25_0 '>=5.25.0 || ^4.49.0'
- &ref_5_26_0 '>=5.26.0 || ^4.50.0'
- &ref_5_27_0 '>=5.27.0 || ^4.51.0'

tests/:
apm_tracing_e2e/:
Expand Down Expand Up @@ -644,7 +645,8 @@ tests/:
Test_Config_TraceEnabled: *ref_4_3_0
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: *ref_5_25_0
test_crashtracking.py: missing_feature
test_crashtracking.py:
Test_Crashtracking: *ref_5_27_0
test_dynamic_configuration.py:
TestDynamicConfigSamplingRules: *ref_5_16_0
TestDynamicConfigTracingEnabled: *ref_5_4_0
Expand Down
4 changes: 2 additions & 2 deletions utils/_context/_scenarios/parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ def node_library_factory() -> APMLibraryTestServer:
container_name="node-test-client",
container_tag="node-test-client",
container_img=f"""
FROM node:18.10-alpine
RUN apk add --no-cache bash curl git jq
FROM node:18.10-slim
RUN apt-get update && apt-get -y install bash curl git jq
WORKDIR /usr/app
COPY {nodejs_reldir}/../app.sh /usr/app/
RUN printf 'node server.js' >> app.sh
Expand Down
5 changes: 5 additions & 0 deletions utils/build/docker/nodejs/parametric/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ app.post('/trace/span/extract_headers', (req, res) => {
res.json({ span_id: extractedSpanID });
});

app.get('/trace/crash', (req, res) => {
process.kill(process.pid, 'SIGSEGV');
res.json({});
});

app.post('/trace/span/start', (req, res) => {
const request = req.body;
let parent = spans[request.parent_id] || ddContext[request.parent_id];
Expand Down

0 comments on commit 3ce4399

Please sign in to comment.