Fix the OTLP endpoint environment variable
What has happened?
In DDN CLI versions v2.7.0 and below, the environment variable OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
was used to configure the endpoint for sending traces from connectors. However, this environment variable
is not supported by all Hasura connectors. Starting with CLI v2.7.1, the environment variable
OTEL_EXPORTER_OTLP_ENDPOINT
is now used, which is supported by all Hasura connectors.
What has changed?
When DDN CLI initializes a connector using ddn connector init
the environment variable OTEL_EXPORTER_OTLP_ENDPOINT
is used instead of OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
in connector.yaml
and compose.yaml
files.
Migrate an existing project
To start using this new feature in an existing project:
- Update your CLI to the latest version.
ddn update-cli
- Run codemod from Hasura project directory to update the name of the environment variables
ddn codemod fix-traces-env-var --dir .
This will fix the name of the environment variables in the connector configuration files and docker compose files.
Verifying the changes
To verify that the traces are working correctly,
- Run the local engine using
ddn run docker-start
- Open local console using
ddn console --local
- Execute a GraphQL query
- Click on 'View Trace' and verify that the traces from the connector are also shown
Need help?
If you need help migrating your project or have any other questions please reach out to us on our Discord.