Skip to content

Add useful info to trace#2860

Open
djeebus wants to merge 1 commit into
mainfrom
add-useful-info
Open

Add useful info to trace#2860
djeebus wants to merge 1 commit into
mainfrom
add-useful-info

Conversation

@djeebus
Copy link
Copy Markdown
Contributor

@djeebus djeebus commented May 29, 2026

No description provided.

@cursor
Copy link
Copy Markdown

cursor Bot commented May 29, 2026

PR Summary

Low Risk
Observability-only change with no logic, security, or data-path modifications.

Overview
This change enriches the OpenTelemetry span for template cache lookups so traces show template ID, tag, team ID, and cluster ID alongside the existing get template operation, making it easier to debug access and cluster mismatches without changing runtime behavior.

Reviewed by Cursor Bugbot for commit 4da5793. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
2686 5 2681 7
View the full list of 7 ❄️ flaky test(s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/sandboxes::TestSandboxListPaginationRunningLargerLimit

Flake rate in main: 42.45% (Passed 713 times, Failed 526 times)

Stack Traces | 93.4s run time
=== RUN   TestSandboxListPaginationRunningLargerLimit
    sandbox_list_test.go:327: Created sandbox 1/12: ihd55fbcaj6c38jv6g4np
    sandbox_list_test.go:327: Created sandbox 2/12: i2lldettb4ztt0t82aivp
    sandbox_list_test.go:327: Created sandbox 3/12: io92jem5qatx1ve7cubl4
    sandbox_list_test.go:327: Created sandbox 4/12: ierel0ljzmjve5jitpobz
    sandbox_list_test.go:327: Created sandbox 5/12: iw6lrcm3icunoowjqi8ey
    sandbox_list_test.go:327: Created sandbox 6/12: idpm7ssqgoqscnt80dp8h
    sandbox_list_test.go:327: Created sandbox 7/12: is5to63vv66r95zsormsj
    sandbox_list_test.go:327: Created sandbox 8/12: iweheopejzf5hv702df25
    sandbox_list_test.go:327: Created sandbox 9/12: i7xy4gv1eq7kb3gdb810h
    sandbox_list_test.go:327: Created sandbox 10/12: i6bq3du1yihdy0zthoo6s
    sandbox_list_test.go:327: Created sandbox 11/12: io328tg8drqwcoezdqpfp
    sandbox_list_test.go:327: Created sandbox 12/12: if3y4x4mul3mngyr43mxf
    sandbox_list_test.go:330: 
        	Error Trace:	.../api/sandboxes/sandbox_list_test.go:340
        	            				.../hostedtoolcache/go/1.26.3.../src/runtime/asm_amd64.s:1771
        	Error:      	"[]" should have 12 item(s), but has 0
    sandbox_list_test.go:330: 
        	Error Trace:	.../api/sandboxes/sandbox_list_test.go:330
        	Error:      	Condition never satisfied
        	Test:       	TestSandboxListPaginationRunningLargerLimit
--- FAIL: TestSandboxListPaginationRunningLargerLimit (93.40s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxFilesystemPauseResumeIntegrity

Flake rate in main: 42.69% (Passed 702 times, Failed 523 times)

Stack Traces | 0s run time
=== RUN   TestSandboxFilesystemPauseResumeIntegrity
=== PAUSE TestSandboxFilesystemPauseResumeIntegrity
=== CONT  TestSandboxFilesystemPauseResumeIntegrity
--- FAIL: TestSandboxFilesystemPauseResumeIntegrity (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxFilesystemPauseResumeIntegrity/contiguous_write_hash_survives_pause

Flake rate in main: 42.36% (Passed 702 times, Failed 516 times)

Stack Traces | 22.1s run time
=== RUN   TestSandboxFilesystemPauseResumeIntegrity/contiguous_write_hash_survives_pause
=== PAUSE TestSandboxFilesystemPauseResumeIntegrity/contiguous_write_hash_survives_pause
=== CONT  TestSandboxFilesystemPauseResumeIntegrity/contiguous_write_hash_survives_pause
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{start:{pid:1263}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] completed successfully in sandbox iu4uqxoz78hu7ndf2glxq
Executing command bash in sandbox iu4uqxoz78hu7ndf2glxq (user: root)
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{start:{pid:1268}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{data:{stdout:"9aeda0ca13e528c577f7436bdf406521ffbce63dde0d7ae17dc0aa0ea709fe89\n"}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] completed successfully in sandbox iu4uqxoz78hu7ndf2glxq
Executing command bash in sandbox iu4uqxoz78hu7ndf2glxq (user: root)
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{start:{pid:1274}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{data:{stdout:"67108864\n"}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] completed successfully in sandbox iu4uqxoz78hu7ndf2glxq
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{start:{pid:1279}}
Executing command bash in sandbox i3mvmoz0ev1j1526szrrj (user: root)
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{data:{stdout:"9aeda0ca13e528c577f7436bdf406521ffbce63dde0d7ae17dc0aa0ea709fe89\n"}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    filesystem_pause_resume_integrity_test.go:31: Command [bash] completed successfully in sandbox iu4uqxoz78hu7ndf2glxq
Executing command bash in sandbox iu4uqxoz78hu7ndf2glxq (user: root)
    filesystem_pause_resume_integrity_test.go:31: Command [bash] output: event:{start:{pid:1285}}
    filesystem_pause_resume_integrity_test.go:31: 
        	Error Trace:	.../tests/orchestrator/filesystem_pause_resume_integrity_test.go:114
        	            				.../tests/orchestrator/filesystem_pause_resume_integrity_test.go:140
        	            				.../tests/orchestrator/filesystem_pause_resume_integrity_test.go:31
        	Error:      	Received unexpected error:
        	            	failed to execute command bash in sandbox iu4uqxoz78hu7ndf2glxq: invalid_argument: protocol error: incomplete envelope: unexpected EOF
        	Test:       	TestSandboxFilesystemPauseResumeIntegrity/contiguous_write_hash_survives_pause
--- FAIL: TestSandboxFilesystemPauseResumeIntegrity/contiguous_write_hash_survives_pause (22.09s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxMemoryIntegrity

Flake rate in main: 57.85% (Passed 706 times, Failed 969 times)

Stack Traces | 63s run time
=== RUN   TestSandboxMemoryIntegrity
=== PAUSE TestSandboxMemoryIntegrity
=== CONT  TestSandboxMemoryIntegrity
    sandbox_memory_integrity_test.go:27: Build completed successfully
--- FAIL: TestSandboxMemoryIntegrity (62.99s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxMemoryIntegrity/tmpfs_hash

Flake rate in main: 57.97% (Passed 696 times, Failed 960 times)

Stack Traces | 187s run time
=== RUN   TestSandboxMemoryIntegrity/tmpfs_hash
=== PAUSE TestSandboxMemoryIntegrity/tmpfs_hash
=== CONT  TestSandboxMemoryIntegrity/tmpfs_hash
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{start:{pid:1256}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stdout:"Total memory: 985 MB\nUsed memory before tmpfs mount: 191 MB\nFree memory before tmpfs mount: 793 MB\nMemory to use in integrity test (60% of free, min 64MB): 475 MB\n"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"475+0 records in\n475+0 records out\n498073600 bytes (498 MB, 475 MiB) copied, 2.17616 s, 229 MB/s\n"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"\tCommand being timed: \"dd if=/dev/urandom of=/mnt/testfile bs=1M count=475\"\n\tUser time (seconds): 0.00\n\tSystem time (seconds): 2.18\n\tPercent of CPU this job got: 99%\n\tElapsed (wall clock) time (h:mm:ss or m:ss): 0:02.20\n\tAverage shared text size (kbytes): 0\n\tAverage unshared data size (kbytes): 0\n\tAverage stack size (kbytes): 0\n\tAverage total size (kbytes): 0\n\tMaximum resident set size (kbytes): 2700\n\tAverage resident set size (kbytes): 0\n\tMajor (requiring I/O) page faults: 3\n\tMinor (reclaiming a frame) page faults: 343\n\tVoluntary context switches: 4\n\tInvoluntary context switches: 9\n\tSwaps: 0\n\tFile system inputs: 176\n\tFile system outputs: 0\n\tSocket messages sent: 0\n\tSocket messages received: 0\n\tSignals delivered: 0\n\tPage size (bytes): 4096\n\tExit status: 0\n"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stdout:"Used memory after tmpfs mount and file fill: 670 MB\n"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    sandbox_memory_integrity_test.go:70: Command [bash] completed successfully in sandbox i5k2zscoqawy3y9umyp5y
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{start:{pid:1273}}
Executing command bash in sandbox iombzkh4qd482gk1gshyc (user: root)
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{data:{stdout:"e0772899771c551cc3f0ada15d39f616e7d987ba213af0cd8d66843aaa589cac\n"}}
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    sandbox_memory_integrity_test.go:80: Command [bash] completed successfully in sandbox i5k2zscoqawy3y9umyp5y
Executing command bash in sandbox iombzkh4qd482gk1gshyc (user: root)
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{start:{pid:1276}}
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
Executing command bash in sandbox i5k2zscoqawy3y9umyp5y (user: root)
    sandbox_memory_integrity_test.go:110: 
        	Error Trace:	.../tests/orchestrator/sandbox_memory_integrity_test.go:81
        	            				.../hostedtoolcache/go/1.26.3.../src/runtime/asm_amd64.s:1771
        	Error:      	Received unexpected error:
        	            	failed to execute command bash in sandbox i5k2zscoqawy3y9umyp5y: unavailable: HTTP status 502 Bad Gateway
    sandbox_memory_integrity_test.go:110: 
        	Error Trace:	.../tests/orchestrator/sandbox_memory_integrity_test.go:78
        	            				.../tests/orchestrator/sandbox_memory_integrity_test.go:110
        	Error:      	Condition never satisfied
        	Test:       	TestSandboxMemoryIntegrity/tmpfs_hash
--- FAIL: TestSandboxMemoryIntegrity/tmpfs_hash (187.45s)
github.com/e2b-dev/infra/tests/integration/internal/tests/proxies::TestEnvdAccessTokenAutoResumeViaProxy

Flake rate in main: 42.88% (Passed 702 times, Failed 527 times)

Stack Traces | 11.2s run time
=== RUN   TestEnvdAccessTokenAutoResumeViaProxy
=== PAUSE TestEnvdAccessTokenAutoResumeViaProxy
=== CONT  TestEnvdAccessTokenAutoResumeViaProxy
    traffic_access_token_test.go:357: 
        	Error Trace:	.../tests/proxies/traffic_access_token_test.go:357
        	Error:      	Received unexpected error:
        	            	Get "http://localhost:3002/health": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
        	Test:       	TestEnvdAccessTokenAutoResumeViaProxy
--- FAIL: TestEnvdAccessTokenAutoResumeViaProxy (11.23s)
github.com/e2b-dev/infra/tests/integration/internal/tests/proxies::TestSandboxAutoResumeViaProxy

Flake rate in main: 43.68% (Passed 700 times, Failed 543 times)

Stack Traces | 12.1s run time
=== RUN   TestSandboxAutoResumeViaProxy
=== PAUSE TestSandboxAutoResumeViaProxy
=== CONT  TestSandboxAutoResumeViaProxy
    auto_resume_test.go:116: 
        	Error Trace:	.../tests/proxies/auto_resume_test.go:116
        	Error:      	Received unexpected error:
        	            	Get "http://localhost:3002": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
        	Test:       	TestSandboxAutoResumeViaProxy
--- FAIL: TestSandboxAutoResumeViaProxy (12.05s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Comment on lines +115 to +118
attribute.String("template_id", templateID),
attribute.String("tag", sharedUtils.DerefOrDefault(tag, "")),
attribute.String("team_id", teamID.String()),
attribute.String("cluster_id", clusterID.String()),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some of these attributes, we have WithTeamID, WithClusterID (etc) helpers to keep the attribute name united

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants