Skip to content

Using PerOperationSampler #38

Open
@TioLuiso

Description

@TioLuiso

Hello

I am just learning OpenTracing and Jaeger, so first of all, forgive me if the question is stupid.
Also, I have tried to find this issue but haven't found it

I am trying to use PerOperationSampler, because there are some operations that usually I don't want to be sampled, but others are critical and want sampled.

So at first I instantiate a PerOperationSampler, with a OperationSamplingParameters with a DefaultProbability (1.0d) and a collection of PerOperationSamplingParameters. One of them I assigned probability 0.0d. For the operation I use [Controller]/[Action]. That is what had some sense to me.

I run it, and I see that the operation is being traced. Then I delve into your code, and I believe I know the reason.

The outmost span the one that is being generated by HostingEventProvider. And the operationName isn't Controller/Action, but "HTTP GET" or "HTTP POST".

There is an inner span generated by MvcEventProcessor, that has the information that I want. its operation names are Controller/Action. But the filtering is done at the outer spans.

I see the reason in generating outer spans such as you are doing, but I believe that renders the PerOperationSampler quite useless, unless I want to filter all HTTP GETs.

Is there a solution for that? That is: Filtering per Controller/Action

Metadata

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