Back to Graphql Engine

Data Connector Traces via OpenTelemetry

docs/docs/observability/opentelemetry/data-connectors.mdx

2.49.43.4 KB
Original Source

import Thumbnail from '@site/src/components/Thumbnail'; import ProductBadge from '@site/src/components/ProductBadge';

Export Traces to OpenTelemetry Compliant Receiver from Hasura Data Connectors

<div className="badge-container"> <ProductBadge free pro ee self /> </div>

Introduction

Hasura Data Connectors can export and link internal OpenTelemetry data with GraphQL Engine to visualize the full timeline of a GraphQL request.

:::info Note

At present, data connectors only support traces via OpenTelemetry.

:::

Configuration

You can easily configure OpenTelemetry for your data connectors using environment variables.

GraphQL Data Connector

The GraphQL Data Connector — which power sources like Athena, MariaDB, MySQL, Oracle, Redshift, and Snowflake — is built on top of Quarkus with an OpenTelemetry extension. Therefore, the configuration properties of the connector also follow that of the extension:

Environment VariableTypeDefaultDescription
QUARKUS_OTEL_EXPORTER_OTLP_ENDPOINT stringThe endpoint of the OpenTelemetry receiver
QUARKUS_OTEL_EXPORTER_OTLP_PROTOCOL enum (grpc, http/protobuf)grpcThe protocol used to exchange data between the client and the server
QUARKUS_OTEL_EXPORTER_OTLP_HEADERS stringKey-value pairs to be used as headers associated with requests. i.e.: key1=value1,key2=value2
QUARKUS_OTEL_RESOURCE_ATTRIBUTES stringSpecify resource attributes in the following format: key1=val1,key2=val2

See the complete list of configuration reference here.

Mongo Data Connector

The Mongo Data Connector powers MongoDB connections and, thus, has a different configuration:

Environment VariableTypeDefaultDescription
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT stringhttp://localhost:4318The endpoint of the OpenTelemetry receiver
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL enum (grpc, http/protobuf)http/protobufThe protocol used to exchange data between the client and the server
OTEL_SERVICE_NAME stringName of the service
OTEL_PROPAGATORS enum (b3, b3multi, tracecontext, baggage, none)tracecontextComma-separate list of propagator schemes to use