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
3434 java_opts = @droplet . java_opts
3535 java_opts . add_javaagent ( @droplet . sandbox + jar_name )
3636
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+
3746 # Set the otel.service.name to the application_name
3847 app_name = @application . details [ 'application_name' ]
3948 java_opts . add_system_property ( 'otel.service.name' , app_name )
You can’t perform that action at this time.
0 commit comments