Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

hypertrace/hypertrace-trace-enricher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hypertrace Trace Enricher

org.hypertrace.traceenricher

CircleCI

A streaming job that enriches the incoming spans with identified entities like Endpoint, Service, Backend, etc.

trace-enrichers

We have different enrichers in the pipeline and all those enrichers are executed as a DAG. The list of enrichers Hypertrace uses is as follows:

  • SpanTypeAttributeEnricher
  • ApiStatusEnricher
  • EndpointEnricher
  • TransactionNameEnricher
  • ApiBoundaryTypeAttributeEnricher
  • ErrorsAndExceptionsEnricher
  • BackendEntityEnricher
  • HttpAttributeEnricher
  • DefaultServiceEntityEnricher
  • UserAgentSpanEnricher

Description

space-1.jpg
Hypertrace Ingestion Pipeline

trace-enrichers are being used to enrich spans/traces with entity information. hypertrace-trace-enricher service talks to entity-service which fetches entity information from Mongo as required.

For example, Let's say we got span which has http method related attribute method: /api/v1/user?name. So, in this case, if we already have Endpoint entity which refers to /api/v1/user, we fetch the id of that entity and add it to span. Now, span will have one more attribute like this method:/api/v1/user?name, api_id:1234.

Building locally

hypertrace-trace-enricher uses gradlew to compile/install/distribute. Gradle wrapper is already part of the source code. To build hypertrace-trace-enricher, run:

./gradlew dockerBuildImages

Testing

Running unit tests

Run ./gradlew test to execute unit tests.

Testing image

You can test the image you built after modification by running docker-compose or helm setup.

docker-compose

Change the tag for hypertrace-trace-enricher from :main to :test in docker-compose file like this.

  hypertrace-trace-enricher:
    image: hypertrace/hypertrace-trace-enricher:test
    container_name: hypertrace-trace-enricher
    ...

and then run docker-compose up to test the setup.

Docker Image Source: