diff --git a/api/dataStores.yaml b/api/dataStores.yaml index 59700c920f..a1472a3baa 100644 --- a/api/dataStores.yaml +++ b/api/dataStores.yaml @@ -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] diff --git a/cli/openapi/model_supported_data_stores.go b/cli/openapi/model_supported_data_stores.go index e62ae68018..a8e5a3ebe6 100644 --- a/cli/openapi/model_supported_data_stores.go +++ b/cli/openapi/model_supported_data_stores.go @@ -30,6 +30,7 @@ const ( LIGHTSTEP SupportedDataStores = "lightstep" DATADOG SupportedDataStores = "datadog" AWSXRAY SupportedDataStores = "awsxray" + HONEYCOMB SupportedDataStores = "honeycomb" ) // All allowed values of SupportedDataStores enum @@ -44,6 +45,7 @@ var AllowedSupportedDataStoresEnumValues = []SupportedDataStores{ "lightstep", "datadog", "awsxray", + "honeycomb", } func (v *SupportedDataStores) UnmarshalJSON(src []byte) error { diff --git a/docs/docs/configuration/connecting-to-data-stores/honeycomb.md b/docs/docs/configuration/connecting-to-data-stores/honeycomb.md new file mode 100644 index 0000000000..698ecc3f98 --- /dev/null +++ b/docs/docs/configuration/connecting-to-data-stores/honeycomb.md @@ -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). +::: diff --git a/docs/docs/configuration/img/honeycomb-settings.png b/docs/docs/configuration/img/honeycomb-settings.png new file mode 100644 index 0000000000..0c020705df Binary files /dev/null and b/docs/docs/configuration/img/honeycomb-settings.png differ diff --git a/docs/docs/examples-tutorials/recipes.md b/docs/docs/examples-tutorials/recipes.md index 1f8b0b4256..aeb506f3bd 100644 --- a/docs/docs/examples-tutorials/recipes.md +++ b/docs/docs/examples-tutorials/recipes.md @@ -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 diff --git a/docs/docs/examples-tutorials/recipes/running-tracetest-with-honeycomb.md b/docs/docs/examples-tutorials/recipes/running-tracetest-with-honeycomb.md new file mode 100644 index 0000000000..08b4398ffe --- /dev/null +++ b/docs/docs/examples-tutorials/recipes/running-tracetest-with-honeycomb.md @@ -0,0 +1,340 @@ +# Running Tracetest With Honeycomb + +:::note +[Check out the source code on GitHub here.](https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-honeycomb) +::: + +[Tracetest](https://tracetest.io/) is a testing tool based on [OpenTelemetry](https://opentelemetry.io/) that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions. + +[Honeycomb](https://honeycomb.io/) is an observability solution that shows you the patterns and outliers of how users experience your code in complex and unpredictable environments. + +## Prerequisites + +You will need [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) installed on your machine to run this sample app! Additionally, you will need a Honeycomb account and api key. Sign up to use Honeycomb [here](https://ui.honeycomb.io/signup). + +## Project Structure + +The project is built with Docker Compose. It contains two distinct `docker-compose.yaml` files. + +### 1. Node.js App + +The `docker-compose.yaml` file and `Dockerfile` in the root directory are for the Node.js app. + +### 2. Tracetest + +The `docker-compose.yaml` file, `collector.config.yaml`, `tracetest-provision.yaml`, and `tracetest-config.yaml` in the root directory are for the setting up Tracetest and the OpenTelemetry Collector. + +The `root` directory is self-contained and will run all the prerequisites for enabling OpenTelemetry traces and trace-based testing with Tracetest, as well as routing all traces the Node.js App generates to Honeycomb. + +### Docker Compose Network + +All `services` in the `docker-compose.yaml` are on the same network and will be reachable by hostname from within other services. E.g. `tracetest:4317` in the `collector.config.yaml` will map to the `tracetest` service, where the port `4317` is the port where Tracetest accepts traces. + +## Node.js App + +The Node.js app is a simple Express app contained in the `app.js` file. + +The OpenTelemetry tracing is contained in the `tracing.otel.grpc.js` or `tracing.otel.http.js` files. +Traces will be sent to the OpenTelemetry Collector. + +Here's the content of the `tracing.otel.grpc.js` file: + +```js +const opentelemetry = require("@opentelemetry/sdk-node"); +const { + getNodeAutoInstrumentations, +} = require("@opentelemetry/auto-instrumentations-node"); +const { + OTLPTraceExporter, +} = require("@opentelemetry/exporter-trace-otlp-grpc"); + +const sdk = new opentelemetry.NodeSDK({ + traceExporter: new OTLPTraceExporter({ url: "http://otel-collector:4317" }), + instrumentations: [getNodeAutoInstrumentations()], +}); +sdk.start(); +``` + +Depending on which of these you choose, traces will be sent to either the `grpc` or `http` endpoint. + +The hostnames and ports for these are: + +- GRPC: `http://otel-collector:4317` +- HTTP: `http://otel-collector:4318/v1/traces` + +Enabling the tracer is done by preloading the trace file. + +```bash +node -r ./tracing.otel.grpc.js app.js +``` + +In the `package.json` you will see two npm scripts for running the respective tracers alongside the `app.js`. + +```json +"scripts": { + "with-grpc-tracer":"node -r ./tracing.otel.grpc.js app.js", + "with-http-tracer":"node -r ./tracing.otel.http.js app.js" +}, +``` + +To start the server, run this command: + +```bash +npm run with-grpc-tracer +# or +npm run with-http-tracer +``` + +As you can see the `Dockerfile` uses the command above. + +```Dockerfile +FROM node:slim +WORKDIR /usr/src/app +COPY package*.json ./ +RUN npm install +COPY . . +EXPOSE 8080 +CMD [ "npm", "run", "with-grpc-tracer" ] +``` + +And, the `docker-compose.yaml` contains just one service for the Node.js app. + +```yaml +version: "3" +services: + app: + image: quick-start-nodejs + build: . + ports: + - "8080:8080" +``` + +To start it, run this command: + +```bash +docker compose build # optional if you haven't already built the image +docker compose up +``` + +This will start the Node.js app. But, you're not sending the traces anywhere. + +Let's fix this by configuring Tracetest and OpenTelemetry Collector. + +## Tracetest + +The `docker-compose.yaml` in the `tracetest` directory is configured with three services. + +- **Postgres** - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests. +- [**OpenTelemetry Collector**](https://opentelemetry.io/docs/collector/) - A vendor-agnostic implementation of how to receive, process and export telemetry data. +- [**Tracetest**](https://tracetest.io/) - Trace-based testing that generates end-to-end tests automatically from traces. + +```yaml +version: "3.2" +services: + tracetest: + restart: unless-stopped + image: kubeshop/tracetest:${TAG:-latest} + platform: linux/amd64 + ports: + - 11633:11633 + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: + - type: bind + source: ./tracetest/tracetest-config.yaml + target: /app/tracetest.yaml + - type: bind + source: ./tracetest/tracetest-provision.yaml + target: /app/provision.yaml + command: --provisioning-file /app/provision.yaml + healthcheck: + test: ["CMD", "wget", "--spider", "localhost:11633"] + interval: 1s + timeout: 3s + retries: 60 + depends_on: + postgres: + condition: service_healthy + otel-collector: + condition: service_started + environment: + TRACETEST_DEV: ${TRACETEST_DEV} + + postgres: + image: postgres:14 + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + healthcheck: + test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" + interval: 1s + timeout: 5s + retries: 60 + + otel-collector: + image: otel/opentelemetry-collector-contrib:0.68.0 + restart: unless-stopped + command: + - "--config" + - "/otel-local-config.yaml" + volumes: + - ./tracetest/collector.config.yaml:/otel-local-config.yaml + +``` + +Tracetest depends on both Postgres and the OpenTelemetry Collector. Both Tracetest and the OpenTelemetry Collector require config files to be loaded via a volume. The volumes are mapped from the root directory into the `tracetest` directory and the respective config files. + +To start both the Node.js App and Tracetest, run this command: + +```bash +docker-compose up # add --build if the images are not built already +``` + +The `tracetest-config.yaml` file contains the basic setup of connecting Tracetest to the Postgres instance. + +```yaml +# tracetest-config.yaml + +--- +postgres: + host: postgres + user: postgres + password: postgres + port: 5432 + dbname: postgres + params: sslmode=disable + +``` + +The `tracetest-provision.yaml` file contains the data store setup. The data store is set to `Honeycomb` meaning the traces will be received by Tracetest OTLP API and stored in Tracetest itself. + +```yaml +# tracetest-provision.yaml +--- +type: DataStore +spec: + name: Honeycomb + type: honeycomb +``` + +**How to Send Traces to Tracetest and Honeycomb** + +The `collector.config.yaml` explains that. It receives traces via either `grpc` or `http`. Then, exports them to Tracetest's OTLP endpoint `tracetest:4317` in one pipeline, and to Honeycomb in another. + +Make sure to add your Honeycomb access token in the headers of the `otlp/ls` exporter. + +```yaml +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": + # 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] +``` + +## Run Both the Node.js App and Tracetest + +To start both the Node.js App and Tracetest, run this command: + +```bash +docker-compose up # add --build if the images are not built already +``` + +This will start your Tracetest instance on `http://localhost:11633/`. + +Open the URL and start creating tests! Make sure to use the `http://app:8080/` URL in your test creation, because your Node.js app and Tracetest are in the same network. + +## Run Tracetest Tests with the Tracetest CLI + +First, [install the CLI](https://docs.tracetest.io/getting-started/installation#install-the-tracetest-cli). +Then, configure the CLI: + +```bash +tracetest configure --endpoint http://localhost:11633 --analytics +``` + +Once configured, you can run a test against the Tracetest instance via the terminal. + +Check out the `test-api.yaml` file. + +```yaml +# test-api.yaml + +type: Test +spec: + id: W656Q0c4g + name: http://app:8080 + description: akadlkasjdf + trigger: + type: http + httpRequest: + url: http://app:8080 + method: GET + headers: + - key: Content-Type + value: application/json + specs: + - selector: span[tracetest.span.type="http" name="GET /" http.target="/" http.method="GET"] + assertions: + - attr:http.status_code = 200 + - attr:tracetest.span.duration < 500ms + +``` + +This file defines the a test the same way you would through the Web UI. + +To run the test, run this command in the terminal: + +```bash +tracetest test run -d ./test-api.yaml -w +``` + +```bash +✔ http://app:8080 (http://localhost:11633/test/W656Q0c4g/run/2/test) + ✔ span[tracetest.span.type="http" name="GET /" http.target="/" http.method="GET"] +``` + +## View Trace Spans Over Time in Honeycomb + +To access a historical overview of all the trace spans the Node.js App generates, jump over to your Honeycomb account. + +![Honeycomb trace overview](https://res.cloudinary.com/djwdcmwdz/image/upload/v1683042900/Blogposts/Docs/honeycomb_trace_kbjdl4.png) + +You can also drill down into a particular trace. + +![Honeycomb trace drilldown](https://res.cloudinary.com/djwdcmwdz/image/upload/v1683042900/Blogposts/Docs/honeycome_dashboard_gyisdg.png) + +With Honeycomb and Tracetest, you get the best of both worlds. You can run trace-based tests and automate running E2E and integration tests against real trace data. And, use Honeycomb to get a historical overview of all traces your distributed application generates. + +## Learn More + +Feel free to check out our [examples in GitHub](https://github.com/kubeshop/tracetest/tree/main/examples) and join our [Discord Community](https://discord.gg/8MtcMrQNbX) for more info! diff --git a/docs/sidebars.js b/docs/sidebars.js index 70e00c90f8..6e9e2031ea 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -108,6 +108,11 @@ const sidebars = { id: "configuration/connecting-to-data-stores/datadog", label: "Datadog", }, + { + type: "doc", + id: "configuration/connecting-to-data-stores/honeycomb", + label: "Honeycomb", + }, ], }, { @@ -454,6 +459,11 @@ const sidebars = { id: "examples-tutorials/recipes/running-tracetest-with-testkube", label: "Tracetest and Testkube - Running Scheduled Trace-based Tests", }, + { + type: "doc", + id: "examples-tutorials/recipes/running-tracetest-with-honeycomb", + label: "Node.js and Honeycomb", + }, ], }, { diff --git a/examples/tracetest-honeycomb/.gitignore b/examples/tracetest-honeycomb/.gitignore new file mode 100644 index 0000000000..fd4f2b066b --- /dev/null +++ b/examples/tracetest-honeycomb/.gitignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/examples/tracetest-honeycomb/Dockerfile b/examples/tracetest-honeycomb/Dockerfile new file mode 100644 index 0000000000..4d40dc62ad --- /dev/null +++ b/examples/tracetest-honeycomb/Dockerfile @@ -0,0 +1,7 @@ +FROM node:slim +WORKDIR /usr/src/app +COPY package*.json ./ +RUN npm install +COPY . . +EXPOSE 8080 +CMD [ "npm", "run", "with-grpc-tracer" ] diff --git a/examples/tracetest-honeycomb/app.js b/examples/tracetest-honeycomb/app.js new file mode 100644 index 0000000000..314fa1d7b3 --- /dev/null +++ b/examples/tracetest-honeycomb/app.js @@ -0,0 +1,10 @@ +const express = require("express"); +const app = express(); +app.get("/", (req, res) => { + setTimeout(() => { + res.send("Hello World"); + }, 1000); +}); +app.listen(8080, () => { + console.log(`Listening for requests on http://localhost:8080`); +}); diff --git a/examples/tracetest-honeycomb/collector.config.yaml b/examples/tracetest-honeycomb/collector.config.yaml new file mode 100644 index 0000000000..6505e08786 --- /dev/null +++ b/examples/tracetest-honeycomb/collector.config.yaml @@ -0,0 +1,35 @@ +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": + # 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] diff --git a/examples/tracetest-honeycomb/docker-compose.yaml b/examples/tracetest-honeycomb/docker-compose.yaml new file mode 100644 index 0000000000..0b090bb193 --- /dev/null +++ b/examples/tracetest-honeycomb/docker-compose.yaml @@ -0,0 +1,55 @@ +version: "3" +services: + app: + image: quick-start-nodejs + extra_hosts: + - "host.docker.internal:host-gateway" + build: . + ports: + - "8080:8080" + tracetest: + image: kubeshop/tracetest:latest + platform: linux/amd64 + volumes: + - type: bind + source: ./tracetest-config.yaml + target: /app/tracetest.yaml + - type: bind + source: ./tracetest-provision.yaml + target: /app/provisioning.yaml + ports: + - 11633:11633 + command: --provisioning-file /app/provisioning.yaml + depends_on: + postgres: + condition: service_healthy + otel-collector: + condition: service_started + healthcheck: + test: ["CMD", "wget", "--spider", "localhost:11633"] + interval: 1s + timeout: 3s + retries: 60 + environment: + TRACETEST_DEV: ${TRACETEST_DEV} + + postgres: + image: postgres:14 + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + healthcheck: + test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" + interval: 1s + timeout: 5s + retries: 60 + ports: + - 5432:5432 + + otel-collector: + image: otel/opentelemetry-collector-contrib:0.59.0 + command: + - "--config" + - "/otel-local-config.yaml" + volumes: + - ./collector.config.yaml:/otel-local-config.yaml diff --git a/examples/tracetest-honeycomb/package.json b/examples/tracetest-honeycomb/package.json new file mode 100644 index 0000000000..600ffa8b29 --- /dev/null +++ b/examples/tracetest-honeycomb/package.json @@ -0,0 +1,20 @@ +{ + "name": "quick-start-nodejs", + "version": "1.0.0", + "description": "", + "main": "app.js", + "scripts": { + "with-grpc-tracer":"node -r ./tracing.otel.grpc.js app.js", + "with-http-tracer":"node -r ./tracing.otel.http.js app.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@opentelemetry/auto-instrumentations-node": "^0.33.1", + "@opentelemetry/exporter-trace-otlp-grpc": "^0.34.0", + "@opentelemetry/exporter-trace-otlp-http": "^0.33.0", + "@opentelemetry/sdk-node": "^0.33.0", + "express": "^4.18.2" + } +} diff --git a/examples/tracetest-honeycomb/readme.md b/examples/tracetest-honeycomb/readme.md new file mode 100644 index 0000000000..b1b0fe32e9 --- /dev/null +++ b/examples/tracetest-honeycomb/readme.md @@ -0,0 +1,7 @@ +# Node.js app with OpenTelemetry, Honeycomb and Tracetest + +> [Read the detailed recipe for setting up OpenTelemetry Collector for Honeycomb and Tracetest in our documentation.](https://docs.tracetest.io/examples-tutorials/recipes/running-tracetest-with-honeycomb) + +This is a simple quick start on how to configure a Node.js app to use OpenTelemetry instrumentation with traces, and Tracetest for enhancing your e2e and integration tests with trace-based testing. + +Feel free to check out the [docs](https://docs.tracetest.io/), and join our [Discord Community](https://discord.gg/8MtcMrQNbX) for more info! diff --git a/examples/tracetest-honeycomb/test-api.yaml b/examples/tracetest-honeycomb/test-api.yaml new file mode 100644 index 0000000000..8365c224dd --- /dev/null +++ b/examples/tracetest-honeycomb/test-api.yaml @@ -0,0 +1,18 @@ +type: Test +spec: + id: W656Q0c4g + name: http://app:8080 + description: akadlkasjdf + trigger: + type: http + httpRequest: + url: http://app:8080 + method: GET + headers: + - key: Content-Type + value: application/json + specs: + - selector: span[tracetest.span.type="http" name="GET /" http.target="/" http.method="GET"] + assertions: + - attr:http.status_code = 200 + - attr:tracetest.span.duration < 500ms diff --git a/examples/tracetest-honeycomb/tracetest-config.yaml b/examples/tracetest-honeycomb/tracetest-config.yaml new file mode 100644 index 0000000000..5e732f6d38 --- /dev/null +++ b/examples/tracetest-honeycomb/tracetest-config.yaml @@ -0,0 +1,7 @@ +postgres: + host: postgres + user: postgres + password: postgres + port: 5432 + dbname: postgres + params: sslmode=disable diff --git a/examples/tracetest-honeycomb/tracetest-provision.yaml b/examples/tracetest-honeycomb/tracetest-provision.yaml new file mode 100644 index 0000000000..9358e706c2 --- /dev/null +++ b/examples/tracetest-honeycomb/tracetest-provision.yaml @@ -0,0 +1,16 @@ +--- +type: PollingProfile +spec: + name: Default + strategy: periodic + default: true + periodic: + retryDelay: 5s + timeout: 10m + +--- +type: DataStore +spec: + name: Honeycomb + type: honeycomb + default: true diff --git a/examples/tracetest-honeycomb/tracing.otel.grpc.js b/examples/tracetest-honeycomb/tracing.otel.grpc.js new file mode 100644 index 0000000000..b98c2ea7f8 --- /dev/null +++ b/examples/tracetest-honeycomb/tracing.otel.grpc.js @@ -0,0 +1,10 @@ +const opentelemetry = require('@opentelemetry/sdk-node') +const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node') +const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-grpc'); + +const sdk = new opentelemetry.NodeSDK({ + traceExporter: new OTLPTraceExporter({ url: 'http://otel-collector:4317' }), + instrumentations: [getNodeAutoInstrumentations()], + serviceName: 'quick-start-nodejs' +}) +sdk.start() diff --git a/examples/tracetest-honeycomb/tracing.otel.http.js b/examples/tracetest-honeycomb/tracing.otel.http.js new file mode 100644 index 0000000000..c231279811 --- /dev/null +++ b/examples/tracetest-honeycomb/tracing.otel.http.js @@ -0,0 +1,9 @@ +const opentelemetry = require('@opentelemetry/sdk-node') +const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node') +const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http') + +const sdk = new opentelemetry.NodeSDK({ + traceExporter: new OTLPTraceExporter({ url: 'http://otel-collector:4318/v1/traces' }), + instrumentations: [getNodeAutoInstrumentations()], +}) +sdk.start() diff --git a/go.work.sum b/go.work.sum index ab14416e8d..29e6998cb5 100644 --- a/go.work.sum +++ b/go.work.sum @@ -150,8 +150,7 @@ cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= github.com/MarvinJWendt/testza v0.5.2/go.mod h1:xu53QFE5sCdjtMCKk8YMQ2MnymimEctc4n3EjyIYvEY= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/aws/aws-sdk-go-v2 v1.17.4/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= @@ -167,8 +166,18 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.1/go.mod h1:O1YSOg3aekZibh2Sn github.com/aws/aws-sdk-go-v2/service/sts v1.18.3/go.mod h1:b+psTJn33Q4qGoDaM7ZiOVVG8uVjGI6HaZ8WBHdgDgU= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= @@ -179,6 +188,7 @@ github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBj github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -199,6 +209,7 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= @@ -208,13 +219,18 @@ github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/pterm/pterm v0.12.53/go.mod h1:BY2H3GtX2BX0ULqLY11C2CusIqnxsYerbkil3XvXIBg= @@ -229,6 +245,9 @@ github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxm github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= go.etcd.io/etcd/api/v3 v3.5.6/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.6/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= @@ -250,6 +269,7 @@ go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTc go.opentelemetry.io/otel/sdk/metric v0.31.0/go.mod h1:fl0SmNnX9mN9xgU6OLYLMBMrNAsaZQi7qBwprwO3abk= go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= @@ -359,3 +379,5 @@ google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsA google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= +k8s.io/apimachinery v0.24.0 h1:ydFCyC/DjCvFCHK5OPMKBlxayQytB8pxy8YQInd5UyQ= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= diff --git a/server/http/mappings/datastore.go b/server/http/mappings/datastore.go index 4b7a5c926f..1c98c03ba7 100644 --- a/server/http/mappings/datastore.go +++ b/server/http/mappings/datastore.go @@ -57,6 +57,7 @@ var dataStoreTypesMapping = map[datastoreresource.DataStoreType]openapi.Supporte datastoreresource.DataStoreTypeElasticAPM: openapi.ELASTICAPM, datastoreresource.DataStoreTypeDataDog: openapi.DATADOG, datastoreresource.DataStoreTypeAwsXRay: openapi.AWSXRAY, + datastoreresource.DataStoreTypeHoneycomb: openapi.HONEYCOMB, } func (m OpenAPI) DataStoreType(in datastoreresource.DataStoreType) openapi.SupportedDataStores { diff --git a/server/openapi/model_supported_data_stores.go b/server/openapi/model_supported_data_stores.go index 4c2b57eb05..c68e806749 100644 --- a/server/openapi/model_supported_data_stores.go +++ b/server/openapi/model_supported_data_stores.go @@ -23,6 +23,7 @@ const ( LIGHTSTEP SupportedDataStores = "lightstep" DATADOG SupportedDataStores = "datadog" AWSXRAY SupportedDataStores = "awsxray" + HONEYCOMB SupportedDataStores = "honeycomb" ) // AssertSupportedDataStoresRequired checks if the required fields are not zero-ed diff --git a/server/tracedb/datastoreresource/resource_types.go b/server/tracedb/datastoreresource/resource_types.go index aa38a82f7f..c831ffbb5b 100644 --- a/server/tracedb/datastoreresource/resource_types.go +++ b/server/tracedb/datastoreresource/resource_types.go @@ -120,6 +120,7 @@ const ( DataStoreTypeElasticAPM DataStoreType = "elasticapm" DataStoreTypeDataDog DataStoreType = "datadog" DataStoreTypeAwsXRay DataStoreType = "awsxray" + DataStoreTypeHoneycomb DataStoreType = "honeycomb" ) var validTypes = []DataStoreType{ @@ -133,6 +134,7 @@ var validTypes = []DataStoreType{ DataStoreTypeElasticAPM, DataStoreTypeDataDog, DataStoreTypeAwsXRay, + DataStoreTypeHoneycomb, } var otlpBasedDataStores = []DataStoreType{ @@ -140,6 +142,7 @@ var otlpBasedDataStores = []DataStoreType{ DataStoreTypeNewRelic, DataStoreTypeLighStep, DataStoreTypeDataDog, + DataStoreTypeHoneycomb, } func (ds DataStore) Validate() error { diff --git a/server/tracedb/tracedb_test.go b/server/tracedb/tracedb_test.go index 6383aa7d6d..b7638c5b3c 100644 --- a/server/tracedb/tracedb_test.go +++ b/server/tracedb/tracedb_test.go @@ -103,6 +103,14 @@ func TestCreateClient(t *testing.T) { }, expectedType: "*tracedb.OTLPTraceDB", }, + { + name: "Honeycomb", + ds: datastoreresource.DataStore{ + Type: datastoreresource.DataStoreTypeHoneycomb, + Values: datastoreresource.DataStoreValues{}, + }, + expectedType: "*tracedb.OTLPTraceDB", + }, { name: "DataDog", ds: datastoreresource.DataStore{ diff --git a/tracetesting/run.bash b/tracetesting/run.bash index e3b89def1c..7481c0f4fc 100755 --- a/tracetesting/run.bash +++ b/tracetesting/run.bash @@ -36,18 +36,19 @@ type: Environment spec: id: .env name: .env - variables: - - key: TARGET_URL - value: $TARGET_URL - - key: DEMO_APP_URL - value: $DEMO_APP_URL - - key: DEMO_APP_GRPC_URL - value: $DEMO_APP_GRPC_URL - - key: EXAMPLE_TEST_ID - value: $EXAMPLE_TEST_ID + values: + - key: TARGET_URL + value: $TARGET_URL + - key: DEMO_APP_URL + value: $DEMO_APP_URL + - key: DEMO_APP_GRPC_URL + value: $DEMO_APP_GRPC_URL + - key: EXAMPLE_TEST_ID + value: $EXAMPLE_TEST_ID EOF -echo "" +echo "Environment variables set:" +cat .env echo "Setting up tracetest CLI configuration..." cat << EOF > config.yml diff --git a/web/src/components/DataStoreIcon/DataStoreIcon.tsx b/web/src/components/DataStoreIcon/DataStoreIcon.tsx index debb8cca84..19f0d23f04 100644 --- a/web/src/components/DataStoreIcon/DataStoreIcon.tsx +++ b/web/src/components/DataStoreIcon/DataStoreIcon.tsx @@ -10,6 +10,7 @@ import Otlp from './Icons/Otlp'; import SignalFx from './Icons/SignalFx'; import Tempo from './Icons/Tempo'; import AWSXRay from './Icons/AwsXRay'; +import Honeycomb from './Icons/Honeycomb'; const iconMap = { [SupportedDataStores.JAEGER]: Jaeger, @@ -22,6 +23,7 @@ const iconMap = { [SupportedDataStores.Lightstep]: Lightstep, [SupportedDataStores.Datadog]: Datadog, [SupportedDataStores.AWSXRay]: AWSXRay, + [SupportedDataStores.Honeycomb]: Honeycomb, } as const; interface IProps { diff --git a/web/src/components/DataStoreIcon/Icons/Honeycomb.tsx b/web/src/components/DataStoreIcon/Icons/Honeycomb.tsx new file mode 100644 index 0000000000..45f3efb4dd --- /dev/null +++ b/web/src/components/DataStoreIcon/Icons/Honeycomb.tsx @@ -0,0 +1,23 @@ +import {IIconProps} from '../DataStoreIcon'; + +const Honeycomb = ({color, width = '20', height = '20'}: IIconProps) => { + return ( + + + + + + + ); +}; + +export default Honeycomb; diff --git a/web/src/components/Settings/DataStorePlugin/DataStorePlugin.tsx b/web/src/components/Settings/DataStorePlugin/DataStorePlugin.tsx index 18ca614ee2..8f3361ab00 100644 --- a/web/src/components/Settings/DataStorePlugin/DataStorePlugin.tsx +++ b/web/src/components/Settings/DataStorePlugin/DataStorePlugin.tsx @@ -16,6 +16,7 @@ export const DataStoreComponentMap: IDataStorePluginMap = { [SupportedDataStores.Lightstep]: OpenTelemetryCollector, [SupportedDataStores.Datadog]: OpenTelemetryCollector, [SupportedDataStores.NewRelic]: OpenTelemetryCollector, + [SupportedDataStores.Honeycomb]: OpenTelemetryCollector, [SupportedDataStores.AWSXRay]: AwsXRay, }; diff --git a/web/src/constants/CollectorConfig.constants.ts b/web/src/constants/CollectorConfig.constants.ts index 720d6c60d6..a2f6a66c10 100644 --- a/web/src/constants/CollectorConfig.constants.ts +++ b/web/src/constants/CollectorConfig.constants.ts @@ -134,9 +134,47 @@ service: exporters: [datadog] `; +export const Honeycomb = `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] +`; + export const CollectorConfigMap = { [SupportedDataStores.Datadog]: Datadog, [SupportedDataStores.Lightstep]: Lightstep, [SupportedDataStores.NewRelic]: NewRelic, [SupportedDataStores.OtelCollector]: OtelCollector, + [SupportedDataStores.Honeycomb]: Honeycomb, } as const; diff --git a/web/src/constants/DataStore.constants.tsx b/web/src/constants/DataStore.constants.tsx index 4555edc54b..05e39d2dbc 100644 --- a/web/src/constants/DataStore.constants.tsx +++ b/web/src/constants/DataStore.constants.tsx @@ -11,6 +11,7 @@ export const SupportedDataStoresToName = { [SupportedDataStores.Lightstep]: 'Lightstep', [SupportedDataStores.Datadog]: 'Datadog', [SupportedDataStores.AWSXRay]: 'AWS X-Ray', + [SupportedDataStores.Honeycomb]: 'Honeycomb', } as const; export const SupportedDataStoresToDocsLink = { @@ -25,6 +26,7 @@ export const SupportedDataStoresToDocsLink = { [SupportedDataStores.AWSXRay]: 'https://docs.tracetest.io/configuration/connecting-to-data-stores/aws-x-ray', [SupportedDataStores.OtelCollector]: 'https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector', + [SupportedDataStores.Honeycomb]: 'https://docs.tracetest.io/configuration/connecting-to-data-stores/honeycomb', } as const; export const SupportedDataStoresToDefaultEndpoint = { @@ -38,6 +40,7 @@ export const SupportedDataStoresToDefaultEndpoint = { [SupportedDataStores.Lightstep]: '', [SupportedDataStores.Datadog]: '', [SupportedDataStores.AWSXRay]: '', + [SupportedDataStores.Honeycomb]: '', } as const; const collectorExplanation = ( diff --git a/web/src/models/DataStore.model.ts b/web/src/models/DataStore.model.ts index 374824f264..6d51f8fb64 100644 --- a/web/src/models/DataStore.model.ts +++ b/web/src/models/DataStore.model.ts @@ -2,7 +2,7 @@ import {SupportedDataStores} from 'types/DataStore.types'; import {Model, TDataStoreSchemas} from 'types/Common.types'; export type TRawDataStore = TDataStoreSchemas['DataStoreResource']; -type DataStore = Model['spec'] & {otlp?: {}; newrelic?: {}; lightstep?: {}; datadog?: {}}; +type DataStore = Model['spec'] & {otlp?: {}; newrelic?: {}; lightstep?: {}; datadog?: {}, honeycomb?: {}}; const DataStore = ({ spec: { diff --git a/web/src/services/DataStore.service.ts b/web/src/services/DataStore.service.ts index 3305a76c14..a3d148bcbf 100644 --- a/web/src/services/DataStore.service.ts +++ b/web/src/services/DataStore.service.ts @@ -24,6 +24,7 @@ const dataStoreServiceMap = { [SupportedDataStores.NewRelic]: OtelCollectorService, [SupportedDataStores.Lightstep]: OtelCollectorService, [SupportedDataStores.Datadog]: OtelCollectorService, + [SupportedDataStores.Honeycomb]: OtelCollectorService, [SupportedDataStores.AWSXRay]: AwsXRayService, } as const; diff --git a/web/src/types/DataStore.types.ts b/web/src/types/DataStore.types.ts index 3a62f8c2cb..5e82cf2f04 100644 --- a/web/src/types/DataStore.types.ts +++ b/web/src/types/DataStore.types.ts @@ -21,6 +21,7 @@ export enum SupportedDataStores { SignalFX = 'signalfx', Datadog = 'datadog', AWSXRay = 'awsxray', + Honeycomb = 'honeycomb', } export enum SupportedClientTypes { @@ -85,6 +86,7 @@ type IDataStore = DataStore & { lightstep?: {}; newrelic?: {}; datadog?: {}; + honeycomb?: {}; }; export type TDraftDataStore = { diff --git a/web/src/types/Generated.types.ts b/web/src/types/Generated.types.ts index 92848c62b4..8a5aa91668 100644 --- a/web/src/types/Generated.types.ts +++ b/web/src/types/Generated.types.ts @@ -1234,7 +1234,8 @@ export interface external { | "newrelic" | "lightstep" | "datadog" - | "awsxray"; + | "awsxray" + | "honeycomb"; /** @enum {string} */ SupportedClients: "http" | "grpc"; };