Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: adding honeycomb datastore support #2471

Merged
merged 9 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/dataStores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ components:
type: string
SupportedDataStores:
type: string
enum: [jaeger, opensearch, tempo, signalfx, otlp, elasticapm, newrelic, lightstep, datadog, awsxray]
enum: [jaeger, opensearch, tempo, signalfx, otlp, elasticapm, newrelic, lightstep, datadog, awsxray, honeycomb]
SupportedClients:
type: string
enum: [http, grpc]
2 changes: 1 addition & 1 deletion cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/compose-spec/compose-go v1.5.1
github.com/cucumber/ci-environment/go v0.0.0-20220915001957-711b1c82415f
github.com/denisbrodbeck/machineid v1.0.1
github.com/fluidtruck/deepcopy v1.0.0
github.com/joho/godotenv v1.3.0
github.com/kubeshop/tracetest/server v0.0.0-20230208220354-63c9594b2160
github.com/mitchellh/mapstructure v1.5.0
Expand All @@ -31,6 +30,7 @@ require (
github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fluidtruck/deepcopy v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand Down
2 changes: 2 additions & 0 deletions cli/openapi/model_supported_data_stores.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

97 changes: 97 additions & 0 deletions docs/docs/configuration/connecting-to-data-stores/honeycomb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Honeycomb

If you want to use [Honeycomb](https://honeycomb.io/) as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Honeycomb. And, you don't have to change your existing pipelines to do so.

:::tip
Examples of configuring Tracetest with Honeycomb can be found in the [`examples` folder of the Tracetest GitHub repo](https://github.com/kubeshop/tracetest/tree/main/examples).
:::

## Configuring OpenTelemetry Collector to Send Traces to both Honeycomb and Tracetest

In your OpenTelemetry Collector config file:

- Set the `exporter` to `otlp/tt`
- Set the `endpoint` to your Tracetest instance on port `4317`

:::tip
If you are running Tracetest with Docker, and Tracetest's service name is `tracetest`, then the endpoint might look like this `http://tracetest:4317`
:::

Additionally, add another config:

- Set the `exporter` to `otlp/hc`
- Set the `endpoint` pointing to the Honeycomb API and using Honeycomb API KEY

```yaml
# collector.config.yaml

# If you already have receivers declared, you can just ignore
# this one and still use yours instead.
receivers:
otlp:
protocols:
grpc:
http:

processors:
batch:
timeout: 100ms

exporters:
logging:
logLevel: debug
# OTLP for Tracetest
otlp/tt:
endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
tls:
insecure: true
# OTLP for Honeycomb
otlp/hc:
endpoint: "api.honeycomb.io:443"
headers:
"x-honeycomb-team": "YOUR_API_KEY"
# Read more in docs here: https://docs.honeycomb.io/getting-data-in/otel-collector/

service:
pipelines:
traces/tt:
receivers: [otlp]
processors: [batch]
exporters: [otlp/tt]
traces/hc:
receivers: [otlp]
processors: [batch]
exporters: [logging, otlp/hc]
```

## Configure Tracetest to Use Honeycomb as a Trace Data Store

Configure your Tracetest instance to expose an `otlp` endpoint to make it aware it will receive traces from the OpenTelemetry Collector. This will expose Tracetest's trace receiver on port `4317`.

## Connect Tracetest to Honeycomb with the Web UI

In the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, select (3) Honeycomb.

![Honeycomb](../img/honeycomb-settings.png)

## Connect Tracetest to Honeycomb with the CLI

Or, if you prefer using the CLI, you can use this file config.

```yaml
type: DataStore
spec:
name: Honeycomb pipeline
type: honeycomb
default: true
```

Proceed to run this command in the terminal and specify the file above.

```bash
tracetest apply datastore -f my/data-store/file/location.yaml
```

:::tip
To learn more, [read the recipe on running a sample app with Honeycomb and Tracetest](../../examples-tutorials/recipes/running-tracetest-with-honeycomb.md).
:::
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/docs/examples-tutorials/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This integration point uses the OpenTelemetry Collector as a router to send trac
- [Sending traces to Lightstep and Tracetest from the OpenTelemetry Demo with OpenTelemetry Collector](./recipes/running-tracetest-with-lightstep.md)
- [Sending traces to New Relic and Tracetest from the OpenTelemetry Demo with OpenTelemetry Collector](./recipes/running-tracetest-with-new-relic.md)
- [Sending traces to Datadog and Tracetest from the OpenTelemetry Demo with OpenTelemetry Collector](./recipes/running-tracetest-with-datadog.md)
- [Sending traces to Honeycomb and Tracetest from a Node.js app using the OpenTelemetry Collector](./recipes/running-tracetest-with-honeycomb.md)

### Jaeger

Expand Down