Coder Social home page Coder Social logo

observiq-otel-collector-k8s's Introduction

License

observiq-otel-collector-k8s

Configuration for instrumenting Kubernetes with the observIQ OpenTelemetry collector.

Support

Cluster Support

Most clusters should be supported. The following are tested:

  • On Prem / Minikube
  • Google Kubernetes Engine (GKE)
  • Amazon Elastic Kubernetes Service (EKS)
  • Azure Kubernetes Service (AKS)

Platform / Exporter Support

Most exporters should work. Some require additional configuration to work well (Google Cloud) while others support native OTLP (New Relic). The following are tested:

  • Google Cloud
  • New Relic
  • OTLP

Telemetry Types

Metrics, logs and traces are supported.

Metrics

  • K8s Metrics: Cluster, node, pod, and container metrics are collected.
  • App Metrics: Application specific metrics can be collected as well, see app/redis for an example.
  • Custom Metrics: If you have applications emitting metrics using an Open Telemetry SDK, they can be sent to the gateway collector at observiq-gateway:4317 (OTLP GRPC receiver).

Logs

Container logs are collected using the node agent.

If you have applications emitting logs using an Open Telemetry SDK, they can be sent to the gateway collector at observiq-gateway:4317 (OTLP GRPC receiver).

Traces

If you have applications emitting traces using an Open Telemetry SDK, they can be sent to the gateway collector at observiq-gateway:4317 (OTLP GRPC receiver).

Usage

โš ๏ธ Please reference a tagged release, Do not rely on main branch to be reliable. If implementing this in a production environment, it is strongly recommended that you copy this code to your own deployment repository.

Prerequisites

Deploy Collectors

Installation

kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml

kustomize build environments/ci | kubectl apply -f -

kubectl apply -f app/redis/redis.yaml

New Relic

  1. Deploy New Relic API Key (insert your api key into the command):
kubectl create secret generic newrelic-credentials \
    --from-literal=api-key=<api key here>
  1. Update the override file in environments/newrelic/agent.yaml
  • Set K8S_CLUSTER environment variable to the name of your cluster.
  1. Using Kustomize, deploy the New Relic configuration:
kustomize build environments/newrelic | kubectl apply -f -

OTLP

The OTLP configuration exposes the entire collector configuration to the user because OTLP is going to be unique for each environment.

  1. Edit environments/otlp/agent_gateway.yaml and set the endpoint field (near the top) to the otlp endpoint you wish to send to. Make any additional changes required to match the OTLP destination you are sending to.

  2. Using Kustomize, deploy the New Relic configuration:

kustomize build environments/otlp | kubectl apply -f -

agratae

Application Monitoring

Redis Example App

Redis will be our example application for metrics. When deployed, the OpenTelemetry operator will inject a collector container into each Redis pod, to collect metrics via localhost.

kubectl apply -f app/redis/redis.yaml

Sidecar injection is one method to collect application level metrics. Alternatively, the collector could be deployed as a single pod Deployment or Statefulset targeting the application's service. This would require the receiver to be "cluster aware". For example, Prometheus receiver with kubernetes detection (service discovery) or Elasticsearch (capable of collecting whole cluster metrics from a single endpoint).

observiq-otel-collector-k8s's People

Contributors

algchoo avatar dependabot[bot] avatar jsirianni avatar

Forkers

isabella232

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.