Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use service identifiers instead of raw keys in configuration #29

Closed
gaelreyrol opened this issue Jan 11, 2024 · 0 comments · Fixed by #38
Closed

Use service identifiers instead of raw keys in configuration #29

gaelreyrol opened this issue Jan 11, 2024 · 0 comments · Fixed by #38

Comments

@gaelreyrol
Copy link
Contributor

gaelreyrol commented Jan 11, 2024

Currently to inject a provider on a service we use an array key prototype which does not rely on a service identifier.

Here is an example:

open_telemetry:
  instrumentation:
    http_kernel:
      enabled: true
      tracer: main # raw key referencing open_telemetry.tracers.tracers.main
  traces:
    tracers:
      main:
        provider: default # raw key referencing open_telemetry.traces.providers.default
    providers:
      default:
        type: default
        sampler: always_on # raw key referencing open_telemetry.traces.samplers.always_on
        processors:
          - otlp # raw key referencing open_telemetry.traces.processors.default
    processors:
      otlp:
        type: simple # raw key referencing open_telemetry.traces.span_processors.simple - not implemented yet as service
        exporter: otlp # raw key referencing open_telemetry.traces.exporters.otlp
    exporters:
      otlp:
        dsn: http+otlp://localhost:4318

We should replace these raw keys with service ids:

open_telemetry:
  instrumentation:
    http_kernel:
      enabled: true
      tracer: 'open_telemetry.tracers.tracers.main'
  traces:
    tracers:
      main:
        provider: 'open_telemetry.traces.providers.default'
    providers:
      default:
        type: default
        sampler: 'open_telemetry.traces.samplers.always_on' - not implemented yet as service
        processors:
          - 'open_telemetry.traces.processors.default"
    processors:
      otlp:
        type: 'open_telemetry.traces.span_processors.simple'
        exporter: 'open_telemetry.traces.exporter.otlp'
    exporters:
      otlp:
        dsn: http+otlp://localhost:4318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant