top of page

Configuring OpenTelemetry Data Export To TestChimp

TestChimp utilizes existing OpenTelemetry instrumentation to create the full stack view of your system (which enables executing full stack verifications). TestChimp backend SDKs enrich the data being exported by adding request and response payloads allowing for asserting expectations at any backend layer.


Note that if you are only interested in automating and verifying at the frontend API layer, simply installing TestChimp frontend SDK is sufficient, and does not depend on OTel (guide here).


If you are new to OpenTelemetry, here are some guides for more information on what it is, benefits of instrumenting with OpenTelemtry, and how to instrument your application with it.


OpenTelemetry & TestChimp Integration Architecture


The following diagram shows how OpenTelemetry integrates with any application (and how TestChimp integrates with OTel):





Your application generates and emits various telemetric data points, which are collected by a Collector that (usually) sits next to your application / service (If you have multiple services, they can all emit data to the same OTel collector). The collector collects the telemetry data being sent to it, does further processing (such as data scrubbing, sampling, batching etc.), and exports to various external analytics backends (such as TestChimp or Observability backends like Prometheus, Jaeger, DataDog etc.). The behaviour of the OTel collector is configured via a yml file. 


What telemetric data your application generates can come from:

  • Automatic Instrumentation - Which adds common attributes such as resource name, thread name, db statement etc, without requiring any code level change

  • Manual Instrumentation - You can also add your own attribute key-value pairs that are specific to your business / product.

TestChimp SDK enriches the data being exported by including complete request / response payloads as span attributes that are exported.


Instrument Your Application With OTel 


Instrumenting an app refers to integrating the OTel libraries with your application so that it will start emitting telemetric data to the OTel collector. The exact details vary depending on your tech stack. Instructions for your specific stack can be found here: https://opentelemetry.io/docs/languages/


TestChimp backend SDKs are currently supported for the following:

Don’t see your favourite tech stack? Feel free to file a ticket here.


Configure OTel collector to export to TestChimp


You can download the OpenTelemetry Collector from here. Create a file named otel-config.yml with the following:



exporters:
otlphttp/testchimp:
    endpoint: "https://ingress.testchimp.io"
    headers: {"x-testchimp-project-id": "<your unique TestChimp project id>"}
 
service:
pipelines:
	 exporters: [<other exporters>,otlphttp/testchimp]

You can run the OpenTelemetry collector with the following command:


./otelcontrolcol_<your_infra_architecture> –config ./otel-config.yml


Now you can run your OTel instrumented application, and the configured OTel export endpoints (including TestChimp) will start receiving the telemetry data (which will include the TestChimp enriched data - you can enable this conditionally at the TestChimp SDK configuration for just your UAT / Staging / QA environments to avoid exporting real user requests / responses).

bottom of page