Skip to content

OTEL_EXPORTER_OTLP_CERTIFICATE not implemented #961

@niall-nai

Description

@niall-nai

Potentially also missing implementation for:

OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE
OTEL_EXPORTER_OTLP_CLIENT_KEY

Configuring the above 3 environment variables and attempting to connect to a self-hosted Elasticsearch instance gives an UNABLE_TO_VERIFY_LEAF_SIGNATURE error, indicating that one or all of the provided variables is not being used. Attempting to use the Node-native fetch in the following way:

import { Agent, fetch } from 'undici';

const tlsAgent = new Agent({
	connect: {
		ca: readFileSync('/usr/local/app/certificates/ca.crt'),
		cert: readFileSync('/usr/local/app/certificates/tls.crt'),
		key: readFileSync('/usr/local/app/certificates/tls.key'),
	},
});

fetch(apmEndpoint, {
	dispatcher: tlsAgent,
})

succeeds with a 200/OK response.

There does not appear to be any way to override these values programmatically, as they are used by PeriodicExportingMetricReader which cannot be overriden in startNodeSDK without significantly compromising effectiveness of the library.

The APM server is running inside of a self-hosted cluster containing Elasticsearch and Kibana, both of which it can connect to. All connecting URLs are using HTTPS

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions