File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -100,11 +100,25 @@ exit = exit || context.destination || context.db || context.message || context.h
100
100
101
101
If no value is set to the ` context.destination.service.resource ` field, the logic for automatically inferring
102
102
it MUST be the following:
103
+
103
104
``` groovy
104
- if (context.db?.instance) "${subtype ?: type}/${context.db?.instance}"
105
- else if (context.message?.queue?.name) "${subtype ?: type}/${context.message.queue.name}"
106
- else if (context.http?.url) "${context.http.url.host}:${context.http.url.port}"
107
- else subtype ?: type
105
+ if (context.db)
106
+ if (context.db.instance)
107
+ "${subtype ?: type}/${context.db.instance}"
108
+ else
109
+ subtype ?: type
110
+ else if (context.message)
111
+ if (context.message.queue?.name)
112
+ "${subtype ?: type}/${context.message.queue.name}"
113
+ else
114
+ subtype ?: type
115
+ else if (context.http?.url)
116
+ if (context.http.url.port > 0)
117
+ "${context.http.url.host}:${context.http.url.port}"
118
+ else if (context.http.url.host)
119
+ context.http.url.host
120
+ else
121
+ subtype ?: type
108
122
```
109
123
110
124
If an agent API was used to set the ` context.destination.service.resource ` to ` null ` or an empty string, agents MUST
You can’t perform that action at this time.
0 commit comments