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

Failed to get pattern path #1139

Open
minimAluminiumalism opened this issue Sep 30, 2024 · 1 comment
Open

Failed to get pattern path #1139

minimAluminiumalism opened this issue Sep 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@minimAluminiumalism
Copy link
Contributor

Describe the bug

Missing pattern path causes incomplete span name.

截屏2024-09-30 17 23 16 截屏2024-09-30 17 24 16

Environment

  • OS: Linux/arm64
  • Go Version: go1.23.1
  • Version: latest

To Reproduce

Let's see the example rolldice you've provided.

When I running the example in docker container using docker compose up, everything is ok, and I can see the full span name on the jaeger web page, which like the picture 2 I've provided above.

But when I instrument an application on the same host, the span doesn't have any pattern name which only consists of http method.

I checked carefully and only found the running environment is different.

Expected behavior

Full span name with http method and pattern path

Additional context

In fact, you can check the demo picture http_Db_traces.jpg in example/httpPlusdb/, the span name is also incompleted.

Maybe here is the code that causes the problem in internal/pkg/instrumentation/bpf/net/http/server/bpf/probe.bpf.c (I cannot ensure that, but I found pat_ptr is sometimes 0 so it won't execute read_go_string())

if (pattern_path_supported) {
        void *pat_ptr = NULL;
        bpf_probe_read(&pat_ptr, sizeof(pat_ptr), (void *)(req_ptr + req_pat_pos));
        if (pat_ptr != NULL) {
            read_go_string(pat_ptr, pat_str_pos, http_server_span->path_pattern, sizeof(http_server_span->path), "patterned path from Request");
        }
    }
@minimAluminiumalism
Copy link
Contributor Author

#896 Maybe this question is similar to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant