@@ -5,6 +5,7 @@ package attribute // import "go.opentelemetry.io/collector/service/internal/attr
5
5
6
6
import (
7
7
"hash/fnv"
8
+ "strings"
8
9
9
10
"go.opentelemetry.io/otel/attribute"
10
11
@@ -44,15 +45,15 @@ func (a Attributes) ID() int64 {
44
45
45
46
func Receiver (pipelineType pipeline.Signal , id component.ID ) Attributes {
46
47
return newAttributes (
47
- attribute .String (componentattribute .ComponentKindKey , component .KindReceiver .String ()),
48
+ attribute .String (componentattribute .ComponentKindKey , strings . ToLower ( component .KindReceiver .String () )),
48
49
attribute .String (componentattribute .SignalKey , pipelineType .String ()),
49
50
attribute .String (componentattribute .ComponentIDKey , id .String ()),
50
51
)
51
52
}
52
53
53
54
func Processor (pipelineID pipeline.ID , id component.ID ) Attributes {
54
55
return newAttributes (
55
- attribute .String (componentattribute .ComponentKindKey , component .KindProcessor .String ()),
56
+ attribute .String (componentattribute .ComponentKindKey , strings . ToLower ( component .KindProcessor .String () )),
56
57
attribute .String (componentattribute .SignalKey , pipelineID .Signal ().String ()),
57
58
attribute .String (componentattribute .PipelineIDKey , pipelineID .String ()),
58
59
attribute .String (componentattribute .ComponentIDKey , id .String ()),
@@ -61,15 +62,15 @@ func Processor(pipelineID pipeline.ID, id component.ID) Attributes {
61
62
62
63
func Exporter (pipelineType pipeline.Signal , id component.ID ) Attributes {
63
64
return newAttributes (
64
- attribute .String (componentattribute .ComponentKindKey , component .KindExporter .String ()),
65
+ attribute .String (componentattribute .ComponentKindKey , strings . ToLower ( component .KindExporter .String () )),
65
66
attribute .String (componentattribute .SignalKey , pipelineType .String ()),
66
67
attribute .String (componentattribute .ComponentIDKey , id .String ()),
67
68
)
68
69
}
69
70
70
71
func Connector (exprPipelineType , rcvrPipelineType pipeline.Signal , id component.ID ) Attributes {
71
72
return newAttributes (
72
- attribute .String (componentattribute .ComponentKindKey , component .KindConnector .String ()),
73
+ attribute .String (componentattribute .ComponentKindKey , strings . ToLower ( component .KindConnector .String () )),
73
74
attribute .String (componentattribute .SignalKey , exprPipelineType .String ()),
74
75
attribute .String (componentattribute .SignalOutputKey , rcvrPipelineType .String ()),
75
76
attribute .String (componentattribute .ComponentIDKey , id .String ()),
@@ -78,7 +79,7 @@ func Connector(exprPipelineType, rcvrPipelineType pipeline.Signal, id component.
78
79
79
80
func Extension (id component.ID ) Attributes {
80
81
return newAttributes (
81
- attribute .String (componentattribute .ComponentKindKey , component .KindExtension .String ()),
82
+ attribute .String (componentattribute .ComponentKindKey , strings . ToLower ( component .KindExtension .String () )),
82
83
attribute .String (componentattribute .ComponentIDKey , id .String ()),
83
84
)
84
85
}
0 commit comments