You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: otel-config.yaml
+28-2Lines changed: 28 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,35 @@ processors:
23
23
- key: deployment.environment.name
24
24
value: ${env:DWOLLA_ENV}
25
25
action: insert
26
-
- key: http.status_code # this is deprecated, but X-Ray wants it; see https://aws-otel.github.io/docs/getting-started/x-ray#otel-span-http-attributes-translation
26
+
27
+
# rename attributes to follow OTel semantic conventions
28
+
- key: url.full
29
+
action: insert
30
+
# from https://github.com/typelevel/natchez-http4s/blob/168f5031323a573b5641f43c74a25d1a996f7b61/modules/http4s/src/main/scala/natchez/http4s/NatchezMiddleware.scala#L176
31
+
from_attribute: client.http.uri
32
+
- key: http.request.method
33
+
action: insert
34
+
# from https://github.com/typelevel/natchez-http4s/blob/168f5031323a573b5641f43c74a25d1a996f7b61/modules/http4s/src/main/scala/natchez/http4s/NatchezMiddleware.scala#L177
35
+
from_attribute: client.http.method
36
+
- key: http.response.status_code
37
+
action: insert
38
+
# from https://github.com/typelevel/natchez-http4s/blob/168f5031323a573b5641f43c74a25d1a996f7b61/modules/http4s/src/main/scala/natchez/http4s/NatchezMiddleware.scala#L183
39
+
from_attribute: client.http.status_code
40
+
- key: http.response.status_code
27
41
action: insert
28
-
from_attribute: http.response.status_code
42
+
# from https://github.com/typelevel/natchez-http4s/blob/168f5031323a573b5641f43c74a25d1a996f7b61/modules/http4s/src/main/scala/natchez/http4s/NatchezMiddleware.scala#L58
43
+
from_attribute: http.status_code
44
+
# remove the attributes we copied to complete the renaming
# Natchez-http4s sets http.response.status_code as a string, but the OTel semantic
49
+
# conventions define it as an int, and X-Ray won't display it otherwise.
50
+
# see https://github.com/typelevel/natchez-http4s/blob/168f5031323a573b5641f43c74a25d1a996f7b61/modules/http4s/src/main/scala/natchez/http4s/NatchezMiddleware.scala#L183
0 commit comments