-
Notifications
You must be signed in to change notification settings - Fork 131
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
Redesign telemetry support in Helm chart #6153
Changes from all commits
f853b98
758995e
e534e83
3171cab
9f6efa5
62887cf
a584a59
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,90 @@ This is broadly following the example from https://kubernetes.io/docs/tasks/acce | |
* Use the IP from the above output and add it to `/etc/hosts` via `echo "192.168.49.2 chart-example.local" | sudo tee /etc/hosts` | ||
* Verify that `curl chart-example.local` works | ||
|
||
### OpenTelemetry Collector with Minikube | ||
|
||
* Start Minikube cluster: `minikube start` | ||
* Create K8s Namespace: `kubectl create namespace nessie-ns` | ||
* Install cert-manager: | ||
|
||
```bash | ||
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml | ||
``` | ||
|
||
* Install Jaeger Operator: | ||
|
||
```bash | ||
kubectl create namespace observability | ||
kubectl apply -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.42.0/jaeger-operator.yaml -n observability | ||
``` | ||
|
||
If the above command fails with "failed to call webhook [...] connection refused", then cert-manager | ||
was not yet ready. Wait a few seconds and try again. | ||
|
||
* Create a Jaeger instance in Nessie's namespace: | ||
|
||
```bash | ||
kubectl apply -n nessie-ns -f - <<EOF | ||
apiVersion: jaegertracing.io/v1 | ||
kind: Jaeger | ||
metadata: | ||
name: jaeger | ||
EOF | ||
``` | ||
|
||
If the above command fails with "failed to call webhook [...] connection refused", then the Jaeger | ||
Operator was not yet ready. Wait a few seconds and try again. | ||
|
||
* Install Nessie Helm chart with OpenTelemetry Collector enabled: | ||
|
||
```bash | ||
helm install nessie -n nessie-ns helm/nessie \ | ||
--set tracing.enabled=true \ | ||
--set tracing.endpoint=http://jaeger-collector:4317 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it work with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I confess I don't know, I am going to run a few tests now to investigate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is what I found: According to this issue: open-telemetry/opentelemetry-specification#1148, it seems that in its early stages, OpenTelemetry chose to use ports 55680 and 55681 for OTLP/gRPC and OTLP/HTTP respectively. However, as the discussion in the issue reveals, these choices weren't good ones, because these ports are in the ephemeral range, and consequently, are not suitable to be used as service ports. So, they asked IANA to reserve instead two other ports: 4317 and 4318, the common ports that we use today for OTLP/gRPC and OTLP/HTTP respectively. If you look at the specs in 2020, the default endpoint for OTLP/gRPC was But if you look at the specs now, the default endpoint for OTLP/gRPC was changed to As a conclusion, I don't think there is any other alternate port that we should be supporting, only 4317 is nowadays being used for OTLP/gRPC. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice 👍 thanks for the detailed explanation! |
||
``` | ||
|
||
* Forward ports to Jaeger UI and Nessie UI: | ||
|
||
```bash | ||
kubectl port-forward -n nessie-ns service/nessie 19120:19120 & | ||
kubectl port-forward -n nessie-ns service/jaeger-query 16686:16686 & | ||
``` | ||
|
||
* Open the following URLs in your browser: | ||
* Nessie UI (to generate some traces): http://localhost:19120 | ||
* Jaeger UI (to retrieve the traces): http://localhost:16686/search | ||
|
||
To kill the port forwarding processes, run: | ||
|
||
```bash | ||
killall -9 kubectl | ||
``` | ||
|
||
### Custom Docker images for Nessie with Minikube | ||
|
||
You can modify Nessie's code and deploy it to Minikube. | ||
|
||
Once you've satisfied with your changes, build the project with: | ||
|
||
```bash | ||
./gradlew :nessie-quarkus:quarkusBuild | ||
``` | ||
|
||
Then build the Docker image and deploy it as follows: | ||
|
||
```bash | ||
eval $(minikube docker-env) | ||
docker build -f ./tools/dockerbuild/docker/Dockerfile-jvm -t nessie-test:latest ./servers/quarkus-server | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (same here) |
||
``` | ||
|
||
Then deploy Nessie with the custom Docker image: | ||
|
||
```bash | ||
helm install nessie -n nessie-ns helm/nessie \ | ||
--set image.repository=nessie-test \ | ||
--set image.tag=latest | ||
``` | ||
|
||
### Stop/Uninstall everything in Dev | ||
|
||
```sh | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
versionStoreType: INMEMORY | ||
jaegerTracing: | ||
tracing: | ||
enabled: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# -- The number of replicas to deploy (horizontal scaling). | ||
# Beware that replicas are stateless; don't set this number > 1 when using ROCKS version store type. | ||
# Beware that replicas are stateless; don't set this number > 1 when using INMEMORY or ROCKS version store types. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
replicaCount: 1 | ||
|
||
image: | ||
|
@@ -97,19 +97,23 @@ authorization: | |
# allowViewingBranch: op=='VIEW_REFERENCE' && role.startsWith('test_user') && ref.startsWith('allowedBranch') | ||
# allowCommits: op=='COMMIT_CHANGE_AGAINST_REFERENCE' && role.startsWith('test_user') && ref.startsWith('allowedBranch') | ||
|
||
jaegerTracing: | ||
# -- Specifies whether jaeger tracing for the nessie server should be enabled. | ||
tracing: | ||
# -- Specifies whether tracing for the nessie server should be enabled. | ||
enabled: false | ||
# -- The traces endpoint, in case the client should connect directly to the Collector, e.g. http://jaeger-collector:14268/api/traces | ||
endpoint: "" | ||
# -- The Jaeger service name. | ||
serviceName: nessie | ||
# -- Whether metrics are published if tracing is enabled. | ||
publishMetrics: true | ||
# -- The sampler type (const, probabilistic, ratelimiting or remote). | ||
samplerType: ratelimiting | ||
# -- The request sampling probability. 1=Sample all requests. Set samplerParam to somewhere between 0 and 1, e.g. 0.50, if you do not wish to sample all requests. | ||
samplerParam: 1 | ||
# -- The collector endpoint URL to connect to (required). | ||
# The endpoint URL must have either the http:// or the https:// scheme. | ||
# The collector must talk the OpenTelemetry protocol (OTLP) and the port must be its gRPC port (by default 4317). | ||
# See https://quarkus.io/guides/opentelemetry for more information. | ||
endpoint: "http://otlp-collector:4317" | ||
# -- Which requests should be sampled. Valid values are: "all", "none", or a ratio between 0.0 and | ||
# 1.0 (inclusive). E.g. 0.5 means that 50% of the requests will be sampled. | ||
sample: all | ||
# -- Resource attributes to identify the nessie service among other tracing sources. | ||
# See https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/#service. | ||
# If left empty, traces will be attached to a service named "Nessie"; to change this, provide a service.name attribute here. | ||
attributes: | ||
{} | ||
# service.name: my-nessie | ||
|
||
serviceMonitor: | ||
# -- Specifies whether a ServiceMonitor for Prometheus operator should be created. | ||
|
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.
Maybe add a
./gradlew :nessie-quarkus:quarkusBuild
?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.
Nice to see that that these Dockerfiles help w/ k8s stuff as well.