Giter VIP home page Giter VIP logo

auto-tracing-webhook's Introduction

Auto Tracing Webhook

A kubernetes webhook to automatically instrument any java application with open tracing abilities (without changing a line of code).

The webhook simply modifies the tagged deployment by adding the java-specialagent and setting up the environment correctly.

Deploy

Ensure jaeger is installed:

kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml

Apply the webhook to kubernetes

kubectl apply -f webhook.yml

Tag your namespace with the autotrace label:

kubectl label namespace default autotrace=enabled

Tag your deployment's pod template with the autotrace label:

spec:
  replicas: 1
  selector:
    matchLabels:
      app: service-a
  template:
    metadata:
      name: service-a
      labels:
        app: service-a
        autotrace: enabled

Now when you deploy your java app it should automatically instrument and begin tracing.

Generate Keys

mkdir keys
./generate-keys.sh keys

Check Certificate Expiry

openssl x509 -subject -enddate -noout -in keys/ca.crt
openssl x509 -subject -enddate -noout -in keys/webhook-server-tls.crt

Generate caBundle for webhook.yml

cat keys/ca.crt | base64 | tr -d "\n"

Add to webhook.yml

auto-tracing-webhook's People

Contributors

notmattlucas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

auto-tracing-webhook's Issues

Pass the buck pods not created

Hello,

I was trying out the guide here and I realized that the pod is not getting created with the following error on the replicaset. My Kubernetes is running using EKS on AWS.

Warning FailedCreate 3m50s (x17 over 9m17s) replicaset-controller Error creating: Internal error occurred: failed calling webhook "auto-tracing-mutating-webhook.default.svc.cluster.local": Post https://auto-tracing-mutating-webhook.default.svc:443/decorate?timeout=30s: x509: certificate has expired or is not yet valid

EDIT
I can also verify that I see the same issue on minikube

Webhook or any other services won't start

First, thank you for the effort with this tool!

I followed your Medium article, instructions in README (also regarding the certificates), but I keep having the issue that the webhook won't start, but also any other deployment won't start until the webhook is uninstalled form the cluster.

So I keep seeing 0/0 READY deployments in my k9s console with the following message when I describe the replica set:

replicaset-controller  Error creating: Internal error occurred: failed calling webhook "auto-tracing-mutating-webhook.default.svc.cluster.local": Post "https://auto-tracing-mutating-webhook.default.svc:443/decorate?timeout=30s": dial tcp 10.103.71.227:443: connect: connection refused

Do you have an idea what could be the issue?

Appreciate it!

auto tracing webhook not tracing deployment in the same namespace

Hi,

I'm using kubernetes 1.9 and have setup opentracing using auto-tracing-webhook following this page
https://medium.com/opentracing/opentracing-on-kubernetes-get-yer-tracing-for-free-7a69cca03c8a
I've deployed jaeger in default namespace and auto-tracing-webhook in test namespace (autotrace=enabled labeled namespace). I also have other deployments running in the test namespace. These deployments are labeled as autotrace=enabled but in my Jaeger UI, it's only showing 'jaeger-query' in the service name field. Both the jeager and auto-tracing-webhook pods are running without any error.
Why Jaeger UI is not showing other services. Am I missing something? Please help.

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.