-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[extension/jaegerremotesampling] remote sampling gRPC support #6694 #12788
[extension/jaegerremotesampling] remote sampling gRPC support #6694 #12788
Conversation
Once this is ready to be reviewed, move it out of Draft status and/or ping me. |
@jpkrohling thanks :) Should be ready to review 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good. Before doing my manual tests on this, I wanted to confirm whether you performed yours and how you did it. Thank you for this PR!
I used the following configuration based on the test data located in the receivers:
otlp:
protocols:
grpc:
http:
exporters:
logging:
logLevel: debug
extensions:
pprof:
jaegerremotesampling:
source:
reload_interval: 5s
file: strategies.json
service:
extensions: [jaegerremotesampling]
pipelines:
traces:
receivers: [otlp]
exporters: [logging] The specified strategies.json is downloaded from the Jaeger project v1.36.0. $ make otelcontribcol && ./bin/otelcontribcol_linux_amd64 --config config.yaml As counter part I used this small go program: package main
import (
"context"
"fmt"
"log"
"time"
jaegergrpc "github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/grpc"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
func main() {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
grpcOptions := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()}
conn, err := grpc.DialContext(ctx, "localhost:14250", grpcOptions...)
if err != nil {
log.Fatalf("failed to create gRPC connection to collector: %w", err)
}
defer conn.Close()
mgr := jaegergrpc.NewConfigManager(conn)
doReq := func(svc string) {
ctx, cancel = context.WithTimeout(context.Background(), time.Minute)
defer cancel()
resp, err := mgr.GetSamplingStrategy(ctx, "svc")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", resp)
}
for {
doReq("my-service")
time.Sleep(15 * time.Second)
}
} Then I changed the |
7c940b1
to
4b29ce6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Looks like this is missing the changelog entry. Please, check the contributing guidelines, but basically, you'll need a file within the "unreleased" directory. |
added 👍 |
@jpkrohling is there something else needed to continue? :) |
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
1bda828
to
9db0bec
Compare
just rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description:
This pr adds gRPC support to the jaegerremotesampling extension.
Link to tracking Issue:
Testing:
Documentation: