Documentation ¶
Overview ¶
Package transformer contains various Transformers that represent a high level operation - typically a single "change" block from the schema change file. They rely on Migrators to do the actual work of applying the change to the data. Transformers accept and operate on a specific type of pdata (logs, metrics, etc)
Index ¶
- type AllAttributes
- type LogAttributes
- type MetricAttributes
- type MetricDataPointAttributes
- type MetricSignalNameChange
- type ResourceAttributes
- type SpanAttributes
- type SpanConditionalAttributes
- type SpanEventAttributes
- type SpanEventConditionalAttributes
- type SpanEventSignalNameChange
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllAttributes ¶
type AllAttributes struct { MetricAttributes MetricAttributes LogAttributes LogAttributes SpanAttributes SpanAttributes SpanEventAttributes SpanEventAttributes ResourceAttributes ResourceAttributes }
AllAttributes is a Transformer that acts on . It is a wrapper around the other attribute transformers. It powers the [All rename_attributes] transformation. [All rename_attributes]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#all-section
func NewAllAttributesTransformer ¶
func NewAllAttributesTransformer(set migrate.AttributeChangeSet) AllAttributes
func (AllAttributes) Do ¶
func (o AllAttributes) Do(ss migrate.StateSelector, data any) error
func (AllAttributes) IsMigrator ¶
func (o AllAttributes) IsMigrator()
type LogAttributes ¶
type LogAttributes struct {
AttributeChange migrate.AttributeChangeSet
}
LogAttributes is a Transformer that acts on plog.LogRecord attributes. It powers the [Log's rename_attributes] transformation. It also powers the AllAttributes. [Log's rename_attributes]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#rename_attributes-transformation-3
func (LogAttributes) Do ¶
func (o LogAttributes) Do(ss migrate.StateSelector, log plog.LogRecord) error
func (LogAttributes) IsMigrator ¶
func (o LogAttributes) IsMigrator()
type MetricAttributes ¶
type MetricAttributes struct {
AttributeChange migrate.AttributeChangeSet
}
MetricAttributes is a Transformer that acts on pmetric.Metric's DataPoint's attributes. It is part of the AllAttributes.
func (MetricAttributes) Do ¶
func (o MetricAttributes) Do(ss migrate.StateSelector, metric pmetric.Metric) error
func (MetricAttributes) IsMigrator ¶
func (o MetricAttributes) IsMigrator()
type MetricDataPointAttributes ¶
type MetricDataPointAttributes struct {
ConditionalAttributeChange migrate.ConditionalAttributeSet
}
MetricDataPointAttributes is a conditional Transformer that acts on pmetric.Metric's DataPoint's attributes. It powers the [Metric's rename_attributes] transformation. [Metric's rename_attributes]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#rename_attributes-transformation-2
func (MetricDataPointAttributes) Do ¶
func (o MetricDataPointAttributes) Do(ss migrate.StateSelector, metric pmetric.Metric) error
func (MetricDataPointAttributes) IsMigrator ¶
func (o MetricDataPointAttributes) IsMigrator()
type MetricSignalNameChange ¶
type MetricSignalNameChange struct {
SignalNameChange migrate.SignalNameChange
}
MetricSignalNameChange is an transformer that powers the [Metric's rename_metrics] change. [Metric's rename_metrics]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#rename_metrics-transformation
func (MetricSignalNameChange) Do ¶
func (c MetricSignalNameChange) Do(ss migrate.StateSelector, metric pmetric.Metric) error
func (MetricSignalNameChange) IsMigrator ¶
func (c MetricSignalNameChange) IsMigrator()
type ResourceAttributes ¶
type ResourceAttributes struct {
AttributeChange migrate.AttributeChangeSet
}
ResourceAttributes is a Transformer that acts on pcommon.Resource attributes. It powers the [Resource's rename_attributes] transformation. It also powers the AllAttributes. [Resource's rename_attributes]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#resources-section
func (ResourceAttributes) Do ¶
func (o ResourceAttributes) Do(ss migrate.StateSelector, resource pcommon.Resource) error
func (ResourceAttributes) IsMigrator ¶
func (o ResourceAttributes) IsMigrator()
type SpanAttributes ¶
type SpanAttributes struct {
AttributeChange migrate.AttributeChangeSet
}
SpanAttributes is a Transformer that acts on ptrace.Span attributes. It powers the [Span's rename_attributes] transformation. It also powers the AllAttributes. [Span's rename_attributes]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#rename_attributes-transformation
func (SpanAttributes) Do ¶
func (o SpanAttributes) Do(ss migrate.StateSelector, span ptrace.Span) error
func (SpanAttributes) IsMigrator ¶
func (o SpanAttributes) IsMigrator()
type SpanConditionalAttributes ¶
type SpanConditionalAttributes struct {
Migrator migrate.ConditionalAttributeSet
}
SpanConditionalAttributes is a conditional Transformer that acts on ptrace.Span's name. It powers the [Span's rename_attributes] transformation. [Span's rename_attributes]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#rename_attributes-transformation
func (SpanConditionalAttributes) Do ¶
func (o SpanConditionalAttributes) Do(ss migrate.StateSelector, span ptrace.Span) error
func (SpanConditionalAttributes) IsMigrator ¶
func (o SpanConditionalAttributes) IsMigrator()
type SpanEventAttributes ¶
type SpanEventAttributes struct {
AttributeChange migrate.AttributeChangeSet
}
SpanEventAttributes is a Transformer that acts on ptrace.SpanEvent attributes. It is part of the AllAttributes.
func (SpanEventAttributes) Do ¶
func (o SpanEventAttributes) Do(ss migrate.StateSelector, spanEvent ptrace.SpanEvent) error
func (SpanEventAttributes) IsMigrator ¶
func (o SpanEventAttributes) IsMigrator()
type SpanEventConditionalAttributes ¶
type SpanEventConditionalAttributes struct {
MultiConditionalAttributeSet migrate.MultiConditionalAttributeSet
}
SpanEventConditionalAttributes is an transformer that powers the [Span Event's rename_attributes] change. [Span Event's rename_attributes]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#rename_attributes-transformation-1
func (SpanEventConditionalAttributes) Do ¶
func (o SpanEventConditionalAttributes) Do(ss migrate.StateSelector, span ptrace.Span) error
func (SpanEventConditionalAttributes) IsMigrator ¶
func (o SpanEventConditionalAttributes) IsMigrator()
type SpanEventSignalNameChange ¶
type SpanEventSignalNameChange struct {
SignalNameChange migrate.SignalNameChange
}
SpanEventSignalNameChange is an transformer that powers the [Span Event's rename_events] change. [Span Event's rename_events]: https://opentelemetry.io/docs/specs/otel/schemas/file_format_v1.1.0/#rename_events-transformation
func (SpanEventSignalNameChange) Do ¶
func (c SpanEventSignalNameChange) Do(ss migrate.StateSelector, span ptrace.Span) error
func (SpanEventSignalNameChange) IsMigrator ¶
func (c SpanEventSignalNameChange) IsMigrator()