(data: any)
| 41 | } |
| 42 | |
| 43 | async function encodeOTLPRequest(data: any): Promise<Buffer> { |
| 44 | const root = await getProtoRoot(); |
| 45 | if (!ExportTraceServiceRequest) { |
| 46 | ExportTraceServiceRequest = root.lookupType( |
| 47 | 'opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest', |
| 48 | ); |
| 49 | } |
| 50 | const message = ExportTraceServiceRequest.create(data); |
| 51 | const encoded = ExportTraceServiceRequest.encode(message).finish(); |
| 52 | return Buffer.from(encoded); |
| 53 | } |
| 54 | |
| 55 | describe('Protobuf decoding', () => { |
| 56 | beforeAll(async () => { |
no test coverage detected
searching dependent graphs…