Open DrLuke opened 1 year ago
I have same issue. URL for configuration always taking from \OpenTelemetry\SDK\Common\Configuration\Defaults
.
Using environment parameter OTEL_EXPORTER_ZIPKIN_ENDPOINT
with my settings only works.
You have to look at https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
Workaround if you only require a simple setup (one processor, one exporter, etc.):
OtelSDKBundle
e.g. if you want to use TracerProviderInterface
via DI, you add this to your config:
OpenTelemetry\API\Trace\TracerProviderInterface:
synthetic: true
and then somewhere appropriate in your Kernel you just inject it into the container:
protected function initializeContainer(): void
{
parent::initializeContainer();
/**
* @psalm-suppress MixedMethodCall
*/
$this->container->set("OpenTelemetry\API\Trace\TracerProviderInterface", Globals::tracerProvider());
}
Describe your environment Describe any aspect of your environment relevant to the problem, including your php version (
php -v
will tell you your current version), version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on master.Tried on both
and
Steps to reproduce With the config:
The OTLP span exporters are created with default values for
protocol
andendpoint
instead of the values defined in the config.I guess the SdkBundle is not setting the values in the config the factory is trying to access.
What is the expected behavior? Exporters configured as I specified
What is the actual behavior? Exporters configured with default values