-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add orchestrator for supporting multiple processes #208
Add orchestrator for supporting multiple processes #208
Conversation
…/opentelemetry-go-instrumentation into dinesh.gurumurthy/multiprocess
@edeNFed This PR is working on baremetal and as sidecar for a pod. But when i run same as a deployment in k8s, am getting error below error. Can you please help with same.
|
@dineshg13 could you share the deployment yaml you're trying? |
@damemi I have used our test case by converting the sidecar to a deployment. I have built the docker images and loaded them to the kind cluster. I have loaded the images into kind cluster and created below two pods.
our app
|
@dineshg13 ah thanks, I wasn't sure what you meant by that. So they are running in separate pods It looks like it does find the sample app process, but the thread error says I would also recommend adding an e2e test for this use case |
@dineshg13 please try to use |
Thanks @edeNFed i was to get this working with @damemi i prefer to add an e2e test in a follow-up PR. This PR is already big and backward compatible with existing functionality. The current test framework has only k8s sidecar, I want to refactor the tests to support all 3 paths viz sidecar, deployment & bare-metal. Let me know your thoughts. |
Looks good @dineshg13 |
I think it would be a lot better to have some testing for the new functionality before merging. You should be able to use the workflow matrix to deploy a different set of manifests for the sample app + instrumentation. I'm happy to help if you have any questions |
@damemi i added bare-metal tests to the workflow. Currently the tests are failing on service-name. This might require some discussion, I have added this agenda to next SIG meeting. |
@dineshg13 thanks, the bare metal test is a good idea and probably wouldn't fit with the kind tests since the setup is so different. If it helps, I put together a commit damemi@9ef0f4d based on your branch that shows what I mean for the deployment tests. Feel free to pick this commit to this PR or I can push it to your branch if you'd like (not sure I have permission). The tests pass in a test PR damemi#10 Right now, I think this would be good enough to show everything working in the new feature. The fixtures can be shared between deployment+sidecar modes because we expect the output to be identical. But if we add more configurability (like service name), we should look at restructuring the fixtures. This can be part of a broader refactor for the e2e framework. |
log.Logger.V(0).Info("Establishing connection to OTLP receiver ...") | ||
otlpTraceClient := otlptracegrpc.NewClient( | ||
otlptracegrpc.WithDialOption(grpc.WithUserAgent(autoinstUserAgent)), | ||
) | ||
traceExporter, err := otlptrace.New(ctx, otlpTraceClient) |
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.
Should this be passed as an option instead?
It seems like this could continue to be setup in the controller. It could be changed in a targeted follow up PR instead.
I think changing the exporter setup in this PR is going to bloat this PR. Especially since this doesn't seem like the appropriate way to expose the option to the user.
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.
Agree, we can do this in the followup PR. The intent was we can create mock exporter that we write unit tests against. This is a step in that direction.
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.
Why not just leave this in the Controller
and make the change to the trace exporter setup in its own PR?
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.
We want to use same exporter for monitoring all the processes. If we do inside the controller, we will be creating on grpc connection for each process.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
There are too many breaking changes. It has become harder to update the PR. Closing the effort. |
changes necessary to resolve #197 .
This PR moves the logic from
main
, and creates a new orchestrator pkg for handling multiple processes.