-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathfactory.go
45 lines (38 loc) · 1.15 KB
/
factory.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package trace2receiver
import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/receiver"
)
var (
typeStr = component.MustNewType("trace2receiver")
)
const (
stability = component.StabilityLevelStable
)
func createDefaultConfig() component.Config {
return &Config{
NamedPipePath: "",
UnixSocketPath: "",
AllowCommandControlVerbs: false,
PiiSettingsPath: "",
piiSettings: nil,
FilterSettingsPath: "",
filterSettings: nil,
}
}
//func createMetrics(_ context.Context, params receiver.CreateSettings, baseCfg component.Config, consumer consumer.Metrics) (receiver.Metrics, error) {
// return nil, nil
//}
//func createLogs(_ context.Context, params receiver.CreateSettings, baseCfg component.Config, consumer consumer.Logs) (receiver.Logs, error) {
// return nil, nil
//}
// NewFactory creates a factory for trace2 receiver.
func NewFactory() receiver.Factory {
return receiver.NewFactory(
typeStr,
createDefaultConfig,
receiver.WithTraces(createTraces, stability),
//receiver.WithMetrics(createMetrics, stability),
//receiver.WithLogs(createLogs, stability),
)
}