Skip to content

The gRPC exporter does not respect timeout settings #1498

@spadger

Description

@spadger

Describe your environment

PHP 8.4, linux (in docker), php-fpm model
grpc module version => 1.69.0
latest version of transport-grpc

Steps to reproduce
There are 2 scenarios:

Scenario 1 (long timeout)

  1. Set the following env vars:
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: http://google.com:4310
OTEL_EXPORTER_OTLP_TIMEOUT: 20000
  1. export a batch of spans
  2. observe the time for the request to complete

Expected: Request completes after 10 seconds
Actual: timeout completes after about 6 seconds

Scenario 2: short timeout (under 1 second)

  1. Set the following env vars:
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: http://google.com:4310
OTEL_EXPORTER_OTLP_TIMEOUT: 999
  1. export a batch of spans
  2. observe the time for the request to complete

Expected: Request completes after about a second
Actual: Request completes immediately because the gRPC call immediately fails in less than 1ms (this also happens when you specify a valid collector endpoint and a 999ms timeout)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions