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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add otel4k8s script #146

Merged
merged 3 commits into from
Feb 6, 2025
Merged

Add otel4k8s script #146

merged 3 commits into from
Feb 6, 2025

Conversation

svrnm
Copy link
Member

@svrnm svrnm commented Feb 5, 2025

Description

This PR adds a helper script that can be run to quickly instrument all running services in an app simulation with OpenTelemetry + it deploys a LGTM stack container to get immediate visibility.

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

@svrnm svrnm requested a review from a team as a code owner February 5, 2025 13:15
Copy link

github-actions bot commented Feb 5, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link
Contributor

@noMoreCLI noMoreCLI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@svrnm
why do you include a fixed sampler in the otel collector config?
Does your cue-example create too much traces?

Are there prerequisites for the k8s cluster, such as loadbalancer or ingress need to be available?

A very small and nice k8s distribution allowing you to work with a multi node cluster is kind (kubernetes in docker), would it work with kind too?

Copy link
Contributor

@noMoreCLI noMoreCLI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@svrnm
why do you include a fixed sampler in the otel collector config?
Does your cue-example create too much traces?

Are there prerequisites for the k8s cluster, such as loadbalancer or ingress need to be available?

A very small and nice k8s distribution allowing you to work with a multi node cluster is kind (kubernetes in docker), would it work with kind too?

Copy link
Contributor

@noMoreCLI noMoreCLI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does automatically instrument the app namespace, so no more additional annotation on pod/deployment level are required?

@svrnm
Copy link
Member Author

svrnm commented Feb 6, 2025

@svrnm why do you include a fixed sampler in the otel collector config? Does your cue-example create too much traces?

I left the sampler out initially but then it didn't work, it seems that it is mandatory. I can see if I can set it to something that samples 100%.

Are there prerequisites for the k8s cluster, such as loadbalancer or ingress need to be available?

I tested this with minikube only, so the honest answer is "I don't know". The goal for this script was to have something at hand that is easy to use in a constraint environment for demonstration and tutorial purpose.

A very small and nice k8s distribution allowing you to work with a multi node cluster is kind (kubernetes in docker), would it work with kind too?

Have not tested it, but I can!

This does automatically instrument the app namespace, so no more additional annotation on pod/deployment level are required?

This is a thing that needs improvement, right now it just annotates ALL containers with java automatic instrumentation, so what it would need is that we can annotate containers with their programming language and then use a label filter to only apply the changes to those matching a certain language. But I was planning to do this in a later stage, but I can add it right now as well

@svrnm
Copy link
Member Author

svrnm commented Feb 6, 2025

I created #147 for adding more labels to the k8s generator. If we do that, auto instrumentation can be much easier since we can select the language via a alabel

@noMoreCLI noMoreCLI merged commit f0cf899 into main Feb 6, 2025
8 checks passed
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 this pull request may close these issues.

2 participants