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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to include only specific services? #12

Open
JanC opened this issue Nov 14, 2023 · 1 comment 路 May be fixed by #13
Open

How to include only specific services? #12

JanC opened this issue Nov 14, 2023 · 1 comment 路 May be fixed by #13

Comments

@JanC
Copy link

JanC commented Nov 14, 2023

Hey 馃憢
thanks for making this tool!

I have a trace with a lot of services that I'd like to exclude for readability. I thought that by specifying only the services I'm interested in using the include_services would exclude all other services but that does not seem to be the case.

In fact, even in your example config, the v3-service is still present in the diagram even if the config includes only the v1-service and v2-service:

include_services:
  - v1-service
  - v2-service
 ./jigsaw -config config.yaml trace.json
%% Generated by https://github.com/upamune/jigsaw
sequenceDiagram
    v1-service->>v2-service: Ping Request
    v2-service->>v3-service: Pong Request
    v3-service->>v2-service: Pong Response
    v2-service->>v1-service: Ping Response

How could I include only the services I'm interested in?

@JanC JanC changed the title How to exclude services? How to include only specific services? Nov 14, 2023
@JanC
Copy link
Author

JanC commented Feb 4, 2024

Here is an example:
trace:

{
    "trace": {
        "spans": {
            "1234567890": {
                "span_id": "1234567890",
                "service": "v1-service",
                "start": 1627781875.00000,
                "parent_id": "0",
                "meta": {
                    "grpc.method.name": "v2-service/1"
                },
                "children_ids": ["1234567892", "1234567893"],
                "type": "rpc"
            },
            "1234567892": {
                "span_id": "1234567892",
                "service": "v2-service",
                "start": 1627781877.00000,
                "meta": {
                    "grpc.method.name": "v3-service/2"
                },
                "type": "rpc"
            },
            "1234567893": {
                "span_id": "1234567893",
                "service": "v3-service",
                "start": 1627781878.00000,
                "meta": {
                    "grpc.method.name": "v4-service/4"
                },
                "type": "rpc"
            }
        }
    }
}

config:

include_services:
  - v1-service
  - v2-service

I'd expect only:

    v1-service->>v2-service: 1 Request
    v2-service->>v3-service: 2 Request
    v3-service->>v2-service: 2 Response
    v2-service->>v1-service: 1 Response

but I get

    v1-service->>v2-service: 1 Request
    v2-service->>v3-service: 2 Request
    v3-service->>v2-service: 2 Response
    v3-service->>v4-service: 4 Request
    v4-service->>v3-service: 4 Response
    v2-service->>v1-service: 1 Response

The exchange between service 3 and 4 should not be present

This condition seems to be always true and hence all the services are included:

return caller == callee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant