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

Document the default SDK instrumentation requires elevated permissions #1926

Open
MrAlias opened this issue Mar 4, 2025 · 0 comments
Open
Labels
documentation Improvements or additions to documentation

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Mar 4, 2025

The autosdk probe use bpf_probe_write_user to enable the auto/sdk package but also to write trace/span IDs:

void *tid = (void *)(go_sc + span_context_trace_id_pos);
long ret = bpf_probe_write_user(tid, &sc->TraceID, TRACE_ID_SIZE);
if (ret != 0) {
bpf_printk("write_span_context: failed to write trace ID: %ld", ret);
return -2;
}
void *sid = (void *)(go_sc + span_context_span_id_pos);
ret = bpf_probe_write_user(sid, &sc->SpanID, SPAN_ID_SIZE);
if (ret != 0) {
bpf_printk("write_span_context: failed to write span ID: %ld", ret);
return -3;
}
void *flags = (void *)(go_sc + span_context_trace_flags_pos);
ret = bpf_probe_write_user(flags, &sc->TraceFlags, TRACE_FLAGS_SIZE);
if (ret != 0) {
bpf_printk("write_span_context: failed to write trace flags: %ld", ret);
return -4;
}

This is required to correctly support trace context propagation and integration with the auto-instrumentation telemetry.

Because of this fundamental requirement, there are no known replacements for using this BPF API. Meaning that a non-locked down kernel and elevated permissions are required to run this probe. This needs to be clearly documented and the alternate behavior when this is not supported needs to be explained to users.

@MrAlias MrAlias added the documentation Improvements or additions to documentation label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

1 participant