Commit 117a2a0 1 parent ebee758 commit 117a2a0 Copy full SHA for 117a2a0
File tree 2 files changed +7
-9
lines changed
relay-server/src/endpoints
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,13 @@ where
25
25
B :: Data : Send + Into < Bytes > ,
26
26
B :: Error : Into < axum:: BoxError > ,
27
27
{
28
- let trace = if content_type. as_ref ( ) . starts_with ( "application/json" ) {
29
- let json : Json < TracesData > = request. extract ( ) . await ?;
30
- Some ( json . 0 )
28
+ let trace: TracesData = if content_type. as_ref ( ) . starts_with ( "application/json" ) {
29
+ let Json ( trace ) = request. extract ( ) . await ?;
30
+ trace
31
31
} else if content_type. as_ref ( ) . starts_with ( "application/x-protobuf" ) {
32
- let protobuf : Protobuf < TracesData > = request. extract ( ) . await ?;
33
- Some ( protobuf . 0 )
32
+ let Protobuf ( trace ) = request. extract ( ) . await ?;
33
+ trace
34
34
} else {
35
- None
36
- } ;
37
-
38
- let Some ( trace) = trace else {
39
35
return Ok ( StatusCode :: UNSUPPORTED_MEDIA_TYPE ) ;
40
36
} ;
41
37
53
49
}
54
50
}
55
51
common:: handle_envelope ( & state, envelope) . await ?;
52
+
56
53
Ok ( StatusCode :: ACCEPTED )
57
54
}
58
55
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ flake8==6.0.0
10
10
confluent-kafka == 2.1.1
11
11
flask == 2.2.2
12
12
msgpack == 1.0.4
13
+ opentelemetry-proto == 1.22.0
13
14
pytest-localserver == 0.7.0
14
15
pytest-sentry == 0.1.11
15
16
pytest-xdist == 3.0.2
You can’t perform that action at this time.
0 commit comments