File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
lib/java_buildpack/framework Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,15 @@ def release
34
34
java_opts = @droplet . java_opts
35
35
java_opts . add_javaagent ( @droplet . sandbox + jar_name )
36
36
37
+ credentials = @application . services . find_service ( REQUIRED_SERVICE_NAME_FILTER ) [ 'credentials' ]
38
+ # Add all otel.* credentials from the service bind as jvm system properties
39
+ credentials &.each do |key , value |
40
+ java_opts . add_system_property ( key , value ) if key . start_with? ( 'otel.' )
41
+ end
42
+
43
+ # Set the otel.service.name to the application_name if not specified in credentials
44
+ return if credentials . key? 'otel.service.name'
45
+
37
46
# Set the otel.service.name to the application_name
38
47
app_name = @application . details [ 'application_name' ]
39
48
java_opts . add_system_property ( 'otel.service.name' , app_name )
You can’t perform that action at this time.
0 commit comments