项目作者: tersesystems

项目描述 :
Example "observability" project using Play with Blindsight and Honeycomb
高级语言: Scala
项目地址: git://github.com/tersesystems/play-blindsight.git
创建时间: 2020-04-26T21:52:50Z
项目社区:https://github.com/tersesystems/play-blindsight

开源协议:Other

下载


Play-Blindsight

This is an example Play project that shows how to integrate Play with Honeycomb Tracing using the flow logger from Blindsight.

Requirements

You will need a Honeycomb account, which is free:

https://ui.honeycomb.io/signup

Create a dataset called blindsight-test.

Once you have the account, you’ll need to set the environment variables.

  1. export HONEYCOMB_API_KEY=<your-write-key>
  2. export HONEYCOMB_DATASET=blindsight-test

These correspond to the honeycomb appender in conf/logback.xml

  1. <appender name="HONEYCOMB" class="com.tersesystems.logback.honeycomb.HoneycombAppender">
  2. <apiKey>${HONEYCOMB_API_KEY}</apiKey>
  3. <dataSet>${HONEYCOMB_DATASET}</dataSet>
  4. <!-- ... -->
  5. </appender>

Running

Assuming you have sbt and java installed:

  1. sbt run

And go to http://localhost:9000.

You will see the page render.

Now go to the blindsight-test dataset in Honeycomb, and click on the trace that you see down at the bottom. You should see:

Trace From Play

How It Works

Magic.