Skip to content

The ctx position in return probe might be incorrect #1581

Open
@minimAluminiumalism

Description

This issue has already been mentioned in Slack, and it is posted here to track progress.

In the database/sql instrumentation, I found two pieces of code:
https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/e6f3f3cab8[…]2/internal/pkg/instrumentation/bpf/database/sql/bpf/probe.bpf.c

get_Go_context(ctx, 2, 0, true, &go_context);

https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/e6f3f3cab8[…]2/internal/pkg/instrumentation/bpf/database/sql/bpf/probe.bpf.c

UPROBE_RETURN(queryDC, struct sql_request_t, sql_events, events, 3, 0, true)

In the entry probe, the context_pos is 2, but in the return probe the context_pos is 3? I suppose the position in the return probe is also 2?

Although I believe there is an error of ctx pos, currently the functionality is still working properly.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions