open-telemetry / open-telemetry/opentelemetry-php

[opentelemetry-php-contrib] SdkBundle: OTLP exporter factory creates exporter with default values

Open
#1,146 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
PHP
Stars
912
Forks
232
Avg merge
7d 16h
Merged PRs (30d)
4

Description

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

      "open-telemetry/sdk": "1.0.0",
      "open-telemetry/symfony-sdk-bundle": "0.0.23",

and

      "open-telemetry/sdk": "dev-main",
      "open-telemetry/symfony-sdk-bundle": "dev-main",

Steps to reproduce
With the config:

otel_sdk:
    trace:
        enabled: true
        span:
          processors: simple
        exporters:
          - "otlp+grpc://otel-col:4317"
          - "otlp+http://otel-col:4318"

The OTLP span exporters are created with default values for protocol and endpoint 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Contrib/Otlp/SpanExporterFactory.php at the protocol and endpoint lookups, then trace how the Symfony SdkBundle converts the otel_sdk exporters entries. Reproduce with the YAML configuration and compare the resulting exporters with the configured otlp+grpc and otlp+http protocols and endpoints. Done when both configured values are honored rather than defaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, php, symfony
Domain
backend, observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.