forked from open-telemetry/opentelemetry-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proto_patch.sed
50 lines (37 loc) · 2.06 KB
/
proto_patch.sed
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
46
47
48
49
50
s+github.com/open-telemetry/opentelemetry-proto/gen/go/+go.opentelemetry.io/collector/model/internal/data/protogen/+g
s+package opentelemetry.proto.\(.*\).v1;+package opentelemetry.proto.\1.v1;\
\
import "gogoproto/gogo.proto";+g
s+bytes trace_id = \(.*\);+bytes trace_id = \1\
[\
// Use custom TraceId data type for this field.\
(gogoproto.nullable) = false,\
(gogoproto.customtype) = "go.opentelemetry.io/collector/model/internal/data.TraceID"\
];+g
s+bytes \(.*span_id\) = \(.*\);+bytes \1 = \2\
[\
// Use custom SpanId data type for this field.\
(gogoproto.nullable) = false,\
(gogoproto.customtype) = "go.opentelemetry.io/collector/model/internal/data.SpanID"\
];+g
s+repeated opentelemetry.proto.common.v1.KeyValue \(.*\);+repeated opentelemetry.proto.common.v1.KeyValue \1\
[ (gogoproto.nullable) = false ];+g
s+repeated KeyValue \(.*\);+repeated KeyValue \1\
[ (gogoproto.nullable) = false ];+g
s+AnyValue \(.*\);+AnyValue \1\
[ (gogoproto.nullable) = false ];+g
# this line matches StringKeyValue that are deprecated
s+repeated opentelemetry.proto.common.v1.StringKeyValue \(.*\)\];+repeated opentelemetry.proto.common.v1.StringKeyValue \1\, (gogoproto.nullable) = false ];+g
# this line matches StringKeyValue that are not deprecated
s+repeated opentelemetry.proto.common.v1.StringKeyValue \([^]]*\);+repeated opentelemetry.proto.common.v1.StringKeyValue \1\
[ (gogoproto.nullable) = false ];+g
s+opentelemetry.proto.resource.v1.Resource resource = \(.*\);+opentelemetry.proto.resource.v1.Resource resource = \1\
[ (gogoproto.nullable) = false ];+g
s+opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = \(.*\);+opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = \1\
[ (gogoproto.nullable) = false ];+g
s+Status \(.*\);+Status \1\
[ (gogoproto.nullable) = false ];+g
s+repeated IntExemplar exemplars = \(.*\);+repeated IntExemplar exemplars = \1\
[ (gogoproto.nullable) = false ];+g
s+repeated Exemplar exemplars = \(.*\);+repeated Exemplar exemplars = \1\
[ (gogoproto.nullable) = false ];+g