File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,37 @@ Here is an example of how it looks like in an observability dashboard:
3737
3838![ OpenTelemetry Spans] ( ./img/opentelemetry-spans.png )
3939
40+
41+ ### Additional attributes
42+ You have the flexibility to add your own custom attributes to spans at either the app level or per event.
43+
44+ #### Application attributes
45+ You can add additional otel attributes per app by adding key-value pairs to an application's
46+ metadata, prefixing the key with ` otel. ` . Example:
47+ ``` json
48+ {
49+ "metadata" : { "otel.custom-app-key-1" : " custom-app-value-1" }
50+ }
51+ ```
52+
53+ The param ` custom-app-key-1=custom-app-value-1 ` will be added to your spans.
54+
55+ #### Event attributes
56+ You can add additional per-event attributes to your spans by passing custom key-value pairs in ` transformationsParams.otel `
57+ when calling the Create Message endpoint. Example:
58+ ``` json
59+ {
60+ "payload" : { "abc" : " 123" },
61+ "eventType" : " my-event" ,
62+ "transformationsParams" : {
63+ "otel" : {
64+ "custom-key-1" : " custom-value-1" ,
65+ "custom-key-2" : " custom-value-2" ,
66+ }
67+ }
68+ }
69+ ```
70+
4071## How to use it
4172
4273The raw spans sent by Svix can be used in a variety of ways:
You can’t perform that action at this time.
0 commit comments