FriendlySpanConverter
in package
implements
SpanConverterInterface
Table of Contents
Interfaces
Constants
- ATTRIBUTES_ATTR = 'attributes'
- CODE_ATTR = 'code'
- CONTEXT_ATTR = 'context'
- DESCRIPTION_ATTR = 'description'
- END_ATTR = 'end'
- EVENTS_ATTR = 'events'
- KIND_ATTR = 'kind'
- LINKS_ATTR = 'links'
- NAME_ATTR = 'name'
- PARENT_SPAN_ATTR = 'parent_span_id'
- RESOURCE_ATTR = 'resource'
- SCHEMA_URL_ATTR = 'schema_url'
- SPAN_ID_ATTR = 'span_id'
- START_ATTR = 'start'
- STATUS_ATTR = 'status'
- TIMESTAMP_ATTR = 'timestamp'
- TRACE_FLAGS_ATTR = 'trace_flags'
- TRACE_ID_ATTR = 'trace_id'
- TRACE_STATE_ATTR = 'trace_state'
Methods
- convert() : array<string|int, mixed>
- convertAttributes() : array<string|int, mixed>
- convertContext() : array<string|int, mixed>
- convertEvents() : array<string|int, mixed>
- convertKind() : string
- Translates SpanKind from its integer representation to a more human friendly string.
- convertLinks() : array<string|int, mixed>
- convertResource() : array<string|int, mixed>
- convertSchemaUrl() : string
- convertSpan() : array<string|int, mixed>
- convertSpan does the heavy lifting converting a span into an array
- covertParentContext() : string
- covertStatus() : array<string|int, mixed>
Constants
ATTRIBUTES_ATTR
private
mixed
ATTRIBUTES_ATTR
= 'attributes'
CODE_ATTR
private
mixed
CODE_ATTR
= 'code'
CONTEXT_ATTR
private
mixed
CONTEXT_ATTR
= 'context'
DESCRIPTION_ATTR
private
mixed
DESCRIPTION_ATTR
= 'description'
END_ATTR
private
mixed
END_ATTR
= 'end'
EVENTS_ATTR
private
mixed
EVENTS_ATTR
= 'events'
KIND_ATTR
private
mixed
KIND_ATTR
= 'kind'
LINKS_ATTR
private
mixed
LINKS_ATTR
= 'links'
NAME_ATTR
private
mixed
NAME_ATTR
= 'name'
PARENT_SPAN_ATTR
private
mixed
PARENT_SPAN_ATTR
= 'parent_span_id'
RESOURCE_ATTR
private
mixed
RESOURCE_ATTR
= 'resource'
SCHEMA_URL_ATTR
private
mixed
SCHEMA_URL_ATTR
= 'schema_url'
SPAN_ID_ATTR
private
mixed
SPAN_ID_ATTR
= 'span_id'
START_ATTR
private
mixed
START_ATTR
= 'start'
STATUS_ATTR
private
mixed
STATUS_ATTR
= 'status'
TIMESTAMP_ATTR
private
mixed
TIMESTAMP_ATTR
= 'timestamp'
TRACE_FLAGS_ATTR
private
mixed
TRACE_FLAGS_ATTR
= 'trace_flags'
TRACE_ID_ATTR
private
mixed
TRACE_ID_ATTR
= 'trace_id'
TRACE_STATE_ATTR
private
mixed
TRACE_STATE_ATTR
= 'trace_state'
Methods
convert()
public
convert(iterable<string|int, mixed> $spans) : array<string|int, mixed>
Parameters
- $spans : iterable<string|int, mixed>
Return values
array<string|int, mixed>convertAttributes()
private
convertAttributes(AttributesInterface $attributes) : array<string|int, mixed>
Parameters
- $attributes : AttributesInterface
Return values
array<string|int, mixed>convertContext()
private
convertContext(SpanContextInterface $context) : array<string|int, mixed>
Parameters
- $context : SpanContextInterface
Return values
array<string|int, mixed>convertEvents()
private
convertEvents(array<string|int, EventInterface> $events) : array<string|int, mixed>
Parameters
- $events : array<string|int, EventInterface>
Return values
array<string|int, mixed>convertKind()
Translates SpanKind from its integer representation to a more human friendly string.
private
convertKind(int $kind) : string
Parameters
- $kind : int
Return values
stringconvertLinks()
private
convertLinks(array<string|int, LinkInterface> $links) : array<string|int, mixed>
Parameters
- $links : array<string|int, LinkInterface>
Return values
array<string|int, mixed>convertResource()
private
convertResource(ResourceInfo $resource) : array<string|int, mixed>
Parameters
- $resource : ResourceInfo
Return values
array<string|int, mixed>convertSchemaUrl()
private
convertSchemaUrl(string|null $schemaUrl) : string
Parameters
- $schemaUrl : string|null
Return values
stringconvertSpan()
convertSpan does the heavy lifting converting a span into an array
private
convertSpan(SpanDataInterface $span) : array<string|int, mixed>
Parameters
- $span : SpanDataInterface
Return values
array<string|int, mixed>covertParentContext()
private
covertParentContext(SpanContextInterface $context) : string
Parameters
- $context : SpanContextInterface
Return values
stringcovertStatus()
private
covertStatus(StatusDataInterface $status) : array<string|int, mixed>
Parameters
- $status : StatusDataInterface