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

[nodejs] enable crashtracking tests #3517

Merged
merged 7 commits into from
Nov 21, 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
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 @@ -640,7 +641,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