ConsoleSpanExporterTest
extends AbstractExporterTestCase
in package
Tags
Attributes
- #[CoversClass]
- \OpenTelemetry\SDK\Trace\SpanExporter\ConsoleSpanExporter::class
Table of Contents
Constants
- TEST_DATA = ['name' => 'my.service', 'parent_span_id' => '1000000000000000', 'kind' => 'KIND_INTERNAL', 'start' => 1505855794194009601, 'end' => 1505855799465726528, 'context' => ['trace_id' => '00000000000000000000000000000000', 'span_id' => '0000000000000000', 'trace_state' => 'foz=baz,foo=bar'], 'resource' => ['telemetry.sdk.name' => 'opentelemetry', 'telemetry.sdk.language' => 'php', 'telemetry.sdk.version' => 'dev'], 'attributes' => ['fruit' => 'apple'], 'status' => ['code' => 'Error', 'description' => 'status_description'], 'events' => [['name' => 'validators.list', 'timestamp' => 1505855799433901068, 'attributes' => ['job' => 'stage.updateTime']]]]
Properties
Methods
- createExporter() : ConsoleSpanExporter
- createExporterWithTransport() : SpanExporterInterface
- Must be implemented by concrete TestCases
- futureProvider() : array<string|int, mixed>
- getExporterClass() : string
- Must be implemented by concrete TestCases
- setUp() : void
- test_export() : void
- test_export_output() : void
- test_force_flush() : void
- test_shutdown() : void
Constants
TEST_DATA
private
mixed
TEST_DATA
= ['name' => 'my.service', 'parent_span_id' => '1000000000000000', 'kind' => 'KIND_INTERNAL', 'start' => 1505855794194009601, 'end' => 1505855799465726528, 'context' => ['trace_id' => '00000000000000000000000000000000', 'span_id' => '0000000000000000', 'trace_state' => 'foz=baz,foo=bar'], 'resource' => ['telemetry.sdk.name' => 'opentelemetry', 'telemetry.sdk.language' => 'php', 'telemetry.sdk.version' => 'dev'], 'attributes' => ['fruit' => 'apple'], 'status' => ['code' => 'Error', 'description' => 'status_description'], 'events' => [['name' => 'validators.list', 'timestamp' => 1505855799433901068, 'attributes' => ['job' => 'stage.updateTime']]]]
Properties
$future
protected
FutureInterface
$future
$transport
protected
TransportInterface
$transport
Methods
createExporter()
public
createExporter() : ConsoleSpanExporter
Return values
ConsoleSpanExportercreateExporterWithTransport()
Must be implemented by concrete TestCases
public
createExporterWithTransport(TransportInterface $transport) : SpanExporterInterface
Parameters
- $transport : TransportInterface
Return values
SpanExporterInterfacefutureProvider()
public
static futureProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>getExporterClass()
Must be implemented by concrete TestCases
public
getExporterClass() : string
Return values
stringsetUp()
public
setUp() : void
test_export()
public
test_export(FutureInterface $future, bool $expected) : void
Parameters
- $future : FutureInterface
- $expected : bool
Attributes
- #[DataProvider]
- 'futureProvider'
test_export_output()
public
test_export_output() : void
test_force_flush()
public
test_force_flush() : void
test_shutdown()
public
test_shutdown() : void