• Stars
    star
    306
  • Rank 136,456 (Top 3 %)
  • Language HCL
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Top level repository for Haystack, containing documentation and deployment scripts

Build Status Docs License Join the chat at https://gitter.im/expedia-haystack/Lobby

haystack

This is an uber repository for all Haystack components. Visit our documentation site @ https://expediadotcom.github.io/haystack/

Overview

Haystack is an Expedia-backed open source project to facilitate detection and remediation of problems with enterprise-level web services and websites.

The Problem

Modern websites rely on dozens or even hundreds of services to function. These services are often spread across many platforms, data centers, and teams. Each service logs information of various kinds:

  • Telemetry data with tags or key/value pairs associated with the event
  • Request/response logs (the XML, JSON, etc. sent to and received from the service)
  • Application logs (typically errors logged via log4j or a similar system)
  • Metrics

With so much information spread across many different places, it can be challenging and time consuming to figure out where to look for the cause of a failure or slowdown.

The Solution

Haystack uses tracing data from a central store to help you locate the source of the problem -- to drill down to the precise part of a service transaction where failures or latency are occurring -- and find the proverbial "needle in a haystack". Once you know specifically where the problem is happening, it's much easier to identify the appropriate diagnostic data, understand the data, find the problem, and fix it.

High Level Block Diagram

Infrastructure

The Haystack system includes an easy-to-use "one click" deployment mechanism, based on Kubernetes, that deploys a working development environment with working implementations of all of the services in the block diagram above. This same mechanism, with different configurations, deploys to test and production environments as well. See the collection of scripts, CloudFormation templates, and YAML files in the deployment module for details.

Kafka

Internal Kafka is the Haystack message bus. The messages that enter the Haystack system are Span objects in protobuf format, and the modules below usually communicate with each other via this message bus.

haystack-trends

The haystack-trends module detects anomalies in metrics, based on user-defined "trend templates" that define the levels at which metrics should be considered "out of trend." A single anomalous metric does not necessarily merit alarming as out of trend, so the haystack-trends unit aggregates as directed by the trend templates. For example, a particular service call might have a typical TP99 value of 100 milliseconds. ("TP" means "top percentile" and TP99 refers to the minimum time under which 99% of the calls to the service have finished.) The trend template for such a service might declare that the TP99 metric is out of trend when it exceeds 150 milliseconds, a value that was chosen to be low enough to notify interested parties of a potential problem before it becomes serious but high enough to minimize false positive alarms. The haystack-trends module stores its data in a Time Series Data Base (TSDB).

haystack-pipes

The haystack-pipes module delivers a human-friendly JSON version of Haystack spans to zero or more "durable" locations for more permanent storage. Current "plug in" candidates for such storage include:

Indexer

The Indexer module collects Span objects sharing a trace ID into SpanBuffer protobuf objects which are written to the Kafka message bus. The Span objects are identified as related by the parent span IDs; the Span with a null parent Span ID is the root Span, child Spans have a parent Span ID of the root Span, grandchild Spans have a parent span ID of the appropriate child Span, etc.

Spans

The Spans module writes Span objects into a persistent store. That persistent store consists of two pieces: the Span data is stored in Cassandra, and the Span metadata is stored in ElasticSearch. Sampling, with the ability to force storing a particular Span, will be available (under configuration) to keep the size of the Cassandra and ElasticSearch stores reasonable, given the large volume of Span objects in a production system.

Dependencies

The Dependencies module uses the parent/child relationships of Span objects to create dependency graphs for each service, stored in a graph database.

haystack-ui

The haystack-ui (User Interface) module exposes (through a website) the Spans, Stitched Spans, haystack-trends, and Dependencies created by the other modules. To simplify the API from the haystack-ui module to the Span databases, a small Query module bundles the data from the Cassandra store with the metadata from the ElasticSearch store.

More Repositories

1

haystack-ui

JavaScript
111
star
2

alexa-conversation

Framework to easily test your Alexa skills functionally by creating a conversation with your skill.
JavaScript
52
star
3

cloudtrail-log-analytics

Cloudtrail Log Analytics using Amazon Elasticsearch Service - AWS Serverless Application
Python
31
star
4

haystack-docker

Repository with docker-compose files to start Haystack components in sandbox
TSQL
17
star
5

tesla

Java
15
star
6

haystack-agent

agent that dispatches spans to various sinks depending upon the configuration
Java
14
star
7

haystack-trends

Scala
10
star
8

haystack-traces

Components that handle spans, buffers them, writes to ElasticSearch/Cassandra, and provides API to access them .
Scala
9
star
9

haystack-idl

Span and other data model definitions used by Haystack
Go
9
star
10

haystack-client-java

Haystack bindings for OpenTracing API
Java
9
star
11

metrics-java

Metric library based on the Metrics 2.0 specification.
Java
8
star
12

spring-cloud-sleuth-haystack-reporter

Java
5
star
13

opentracing-spring-haystack-example

Java
5
star
14

haystack-client-go

Haystack bindings for OpenTracing API in Go
Go
5
star
15

haystack-metrics

A library to facilitate collecting metrics in Haystack
Java
4
star
16

haystack-collector

haystack component that collects spans from various sources and publish to kafka
Scala
4
star
17

haystack-client-python

Haystack bindings for OpenTracing in Python
Python
4
star
18

adaptive-alerting-detector-build

Adaptive Alerting detector build library
Python
4
star
19

haystack-istio

Haystack adapter for Istio Service Mesh
Go
3
star
20

haystack-blob-example

Example application to show how blobs and spans interact with haystack environment
Java
3
star
21

opentracing-spring-haystack-starter

Integration library to enable haystack integration with opentracing-spring-cloud-starter @ https://github.com/opentracing-contrib/java-spring-cloud
Java
3
star
22

haystack-alerting

Scala
3
star
23

haystack-dropwizard

Java
3
star
24

alert-manager

Java
3
star
25

haystack-service-graph

haystack component that infers service call graph from the spans received
Scala
3
star
26

EchoX3

EchoX3 is a distributed object cache that allows methods to be added to those objects so they can be called remotely.
Java
3
star
27

haystack-opencensus-exporter-java

OpenCensus Haystack Trace Exporter is an Opencensus exporter that exports data to Haystack.
Java
2
star
28

blobs-example

Dockerfile
2
star
29

haystack-dropwizard-example

Java
2
star
30

haystack-pipes

Packages to send ("pipe") Haystack data to external sinks (like AWS Firehose)
Java
2
star
31

haystack-client-node

Haystack bindings for OpenTracing API in node
TypeScript
2
star
32

haystack-commons

Module with common code that is used by various haystack components
Scala
2
star
33

haystack-log4j-metrics-appender

A log4j appender that sends an error count to a graphite endpoint
Java
1
star
34

haystack-logback-metrics-appender

A logback appender that sends an error count to a graphite endpoint
Java
1
star
35

nodebb-plugin-mentions-notifier

NodeBB plugin that posts mention notifications to endpoints, like slack
JavaScript
1
star
36

ExpediaDotCom.github.io

HTML
1
star
37

haystack-blob-node

npm module to handle blobs
TypeScript
1
star
38

spring-cloud-sleuth-haystack-reporter-example

spring-cloud-sleuth-haystack-reporter-example
Java
1
star
39

haystack-secrets-commons

Java
1
star