Skip to content
2 changes: 0 additions & 2 deletions src/Instrumentation/IO/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ following functions:
- `fread`
- `file_get_contents`
- `file_put_contents`
- `curl_init`
- `curl_exec`
- `ob_start`
- `ob_clean`
- `ob_flush`
Expand Down
6 changes: 0 additions & 6 deletions src/Instrumentation/IO/src/IOInstrumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ public static function register(): void
self::_hook($instrumentation, null, 'ob_flush', 'ob_flush');
self::_hook($instrumentation, null, 'flush', 'flush');

self::_hook($instrumentation, null, 'curl_init', 'curl_init');
self::_hook($instrumentation, null, 'curl_exec', 'curl_exec');
}

/**
Expand Down Expand Up @@ -102,10 +100,6 @@ private static function addParams(SpanBuilderInterface $builder, string $functio
return;
}
switch ($function) {
case 'curl_init':
isset($params[0]) && $builder->setAttribute('code.params.uri', $params[0]);

break;
case 'fopen':
$builder->setAttribute('code.params.filename', $params[0])
->setAttribute('code.params.mode', $params[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace OpenTelemetry\Tests\Instrumentation\IO\tests\Integration;

use ArrayObject;
use CurlHandle;
use OpenTelemetry\API\Instrumentation\Configurator;
use OpenTelemetry\Context\ScopeInterface;
use OpenTelemetry\SDK\Trace\ImmutableSpan;
Expand Down Expand Up @@ -75,17 +74,6 @@ public function test_io_calls(): void
$this->span = $this->storage->offsetGet(4);
$this->assertSame('fread', $this->span->getName());

$ch = curl_init('foo');
$this->assertInstanceOf(CurlHandle::class, $ch);
$this->assertCount(6, $this->storage);
$this->span = $this->storage->offsetGet(5);
$this->assertSame('curl_init', $this->span->getName());
$this->assertSame('foo', $this->span->getAttributes()->get('code.params.uri'));

curl_exec($ch);
$this->assertCount(7, $this->storage);
$this->span = $this->storage->offsetGet(6);
$this->assertSame('curl_exec', $this->span->getName());
}

public function test_output_buffer_calls(): void
Expand Down
Loading