[error] Export failure [exception] Export retry limit exceeded

Created on 14 January 2025, 3 months ago

Problem/Motivation

When `opentelemetry_logs` module is being enabled there is an error reported:

[notice] Synchronized extensions: install opentelemetry_logs.
> OpenTelemetry: [error] Export failure [exception] Export retry limit exceeded [previous]
> #0 /vendor/open-telemetry/exporter-otlp/LogsExporter.php(42): OpenTelemetry\SDK\Common\Export\Http\PsrTransport->send('\n\xD2\x08\n\xB5\x06\n\x1C\n\thost....', NULL)
> #1 /vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php(230): OpenTelemetry\Contrib\Otlp\LogsExporter->export(Array)
> #2 /vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php(167): OpenTelemetry\SDK\Logs\Processor\BatchLogRecordProcessor->flush('forceFlush', NULL)
> #3 /vendor/open-telemetry/sdk/Logs/LoggerSharedState.php(53): OpenTelemetry\SDK\Logs\Processor\BatchLogRecordProcessor->forceFlush(NULL)
> #4 /vendor/open-telemetry/sdk/Logs/LoggerProvider.php(60): OpenTelemetry\SDK\Logs\LoggerSharedState->forceFlush(NULL)
> #5 /docroot/modules/contrib/opentelemetry/modules/opentelemetry_logs/src/Logger/OpentelemetryLogs.php(138): OpenTelemetry\SDK\Logs\LoggerProvider->forceFlush()
> #6 /docroot/modules/contrib/opentelemetry/modules/opentelemetry_logs/src/Logger/OpentelemetryLogs.php(131): Drupal\opentelemetry_logs\Logger\OpentelemetryLogs->finalize()
> #7 [internal function]: Drupal\opentelemetry_logs\Logger\OpentelemetryLogs->onTerminate(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
> #8 /docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
> #9 /vendor/symfony/http-kernel/HttpKernel.php(115): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...')
> #10 /docroot/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(66): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
> #11 /docroot/core/lib/Drupal/Core/DrupalKernel.php(715): Drupal\Core\StackMiddleware\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
> #12 /vendor/drush/drush/src/Boot/DrupalBoot8.php(308): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
> #13 [internal function]: Drush\Boot\DrupalBoot8->terminate()
> #14 {main}

Steps to reproduce

1. Install `opentelemetry_logs` via the `drush cim` on top of `open telemetry`

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇵🇱Poland dmitry.korhov Poland, Warsaw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dmitry.korhov
  • 🇵🇱Poland dmitry.korhov Poland, Warsaw
  • 🇨🇭Switzerland berdir Switzerland

    This is likely a duplicate of 🐛 Error on install Active , you need to configure a valid endpoint or this happens. I'm arguing in that issue to not have a default endpoint, at least not enforced so it can be disabled.

  • 🇵🇱Poland dmitry.korhov Poland, Warsaw

    the problem is that we have everything configured and it works flawlessly right after deployment w/o any further changes :)

  • 🇨🇭Switzerland berdir Switzerland

    deployment as in config deployment?

    That makes sense, as modules are enabled first, that triggers a log message, and then the config is imported later.

    IMHO still the same situation as the other issue, in that the module should not by default/without any configuration attempt to connect to locaalhost.

  • 🇵🇱Poland dmitry.korhov Poland, Warsaw

    > deployment as in config deployment?
    drush deploy -y
    The module should be able to be enabled without requiring configuration and without generating any log messages that could prevent deployment.

  • 🇨🇭Switzerland berdir Switzerland

    > The module should be able to be enabled without requiring configuration and without generating any log messages that could prevent deployment.

    I don't disagree, that's exactly what I'm arguing for as well in the other issue. Which IMHO confirms my point that this is a duplicate of the referenced issue.

  • First commit to issue fork.
  • 🇦🇲Armenia murz Yerevan, Armenia

    I reworked the logger to throw a warning if no custom endpoint is configured instead of the error, please check if this fix is suitable.

  • 🇨🇭Switzerland berdir Switzerland

    Did you see my proposal in the other issue? I think there needs to be an option to disable it completely, and the easiest option would be to require an explicit config. that can be the default config, then for a new install, nothing changes.

    And this scenario wouldn't be a problem, it will just not log until the config is in place.

Production build 0.71.5 2024