-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
OpenTelemetry Collector Demo #711
Conversation
I am not sure why the build is failing, as the |
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.
Overall looks good with minor formatting suggestions. The important thing to change though is the Go code suggestions. I think we want the example to be verbose and explicit as a basis to develop from.
I think we could just fully commit to running all the dependencies in Kubernetes and include Deployment
s for both the collector and Jaeger in this example. This could also be included in a follow up if you think that is better.
Agreed, but I wasn't sure how much of the other dependencies you would want as part of this example, so I kept it to a minimum :) I will add them as part of this commit as there shouldn't be too many more files (unless you want to merge this first to close the issue). |
I'm in favor of adding to this PR. 👍 |
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
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.
Looks like go.sum
needs to be synced. You can do this with make precommit
or directly with go mod tidy
.
This comment has been minimized.
This comment has been minimized.
I think this is pretty much ready :) I updated to include both the Jaeger and OpenTelemetry Collector kubernetes deployments, but kept the demo application outside the cluster. I think it's ok this way, as the example can be used to get started with a functional connection and illustrates the code behind it. Then it's simple enough to build a docker image and deploy the application inside the cluster. Also, I used a NodePort to connect the application to the Collector running inside k8s, as it's an easy way to get a static port/ip for the example, and it works on both local and hosted clusters. It's also easy to change it afterwards to a ClusterIP or LoadBalancer depending on the use case. |
paging @puckpuck and @irvingpop to help me review this |
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.
Looks awesome!
Missing license headers for the Kubernetes manifests, otherwise 🚀
example/otel-collector/k8s/jaeger/jaeger_cluster_role_binding.yaml
Outdated
Show resolved
Hide resolved
example/otel-collector/k8s/jaeger/jaegertracing.io_jaegers_crd.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
I deployed this in my test environment, and though the spans did get through to Jaeger, I noticed some oddities about it that were not apparent until i really dug in. The initial and final span seem to never make it into Jaeger. In my setup, I ran the code locally inside of VS code, pointed to an opentelemetry-collector deployed in K8s exposed via a loadbalancer. The K8s environment is on another host within my local network. To solve this, I removed the
|
True, I missed that. tp, err := sdktrace.NewProvider(
...
sdktrace.WithSyncer(exp)) I updated the PR with the suggested change, but I think this should be an issue on the batcher side. What do you guys think? |
ahhh... using sdktrace.WithSyncer(exp) instead of batch makes sense for this example. |
I think this is something actively being discussed in other threads.
I agree with this. Let's merge this and switch to a syncer in a subsequent PR. |
Example of exporting traces from the go-sdk to the OpenTelemetry Collector, and from there to Jaeger. This PR addresses issue #643 .