quickstarttest

package module
v0.0.0-...-0f11516 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

This go module is used to test the docker compose based OpenTelemetry instrumentation quickstarts:

The repos hosting the quickstart code use this lib by writing a test that calls InstrumentationQuickstartTest(). The tests run in a Cloud Build trigger so they can access the Cloud Observability APIs.

InstrumentationQuickstartTest() runs the instrumentation quickstart docker compose setup in the cwd and verifies that metrics, logs, and traces are successfully sent from the collector to GCP. It checks the collector's self observability prometheus metrics to verify that the exporters were successful.

The COMPOSE_OVERRIDE_FILE environment variable can be set to a comma-separated list of paths to additional compose files to pass to docker compose (see https://docs.docker.com/compose/multiple-compose-files/merge/). This is used in the Cloud Build triggers to connect the docker containers to the cloudbuild docker network for ADC. It can also be used to run the test with GOOGLE_APPLICATION_CREDENTIALS for example.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstrumentationQuickstartTest

func InstrumentationQuickstartTest(t *testing.T, quickstartRoot string)

InstrumentationQuickstartTest runs the instrumentation quickstart docker compose setup in the quickstartRoot directory and verifies that metrics, logs, and traces are successfully sent from the collector to GCP.

Respects a COMPOSE_OVERRIDE_FILE environment variable set to a comma-separated list of paths to additional compose files to include.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL