File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
spec/java_buildpack/framework Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 4848 end
4949
5050 it 'updates JAVA_OPTS' do
51+ allow ( services ) . to receive ( :find_service ) . and_return ( 'credentials' => { 'otel.exporter.otlp.endpoint' => 'https://my-collector-endpoint' ,
52+ 'ignored' => 'not used' ,
53+ 'otel.foo' => 'bar' } )
5154 component . release
5255
5356 expect ( java_opts ) . to include (
5457 "-javaagent:$PWD/.java-buildpack/open_telemetry_javaagent/open_telemetry_javaagent-#{ version } .jar"
5558 )
59+ expect ( java_opts ) . to include ( '-Dotel.exporter.otlp.endpoint=https://my-collector-endpoint' )
60+ expect ( java_opts ) . to include ( '-Dotel.foo=bar' )
5661 end
5762
5863 it 'sets the service name from the application name' do
64+ allow ( services ) . to receive ( :find_service ) . and_return ( 'credentials' => { 'otel.exporter.otlp.endpoint' => 'https://my-collector-endpoint' ,
65+ 'ignored' => 'not used' ,
66+ 'otel.foo' => 'bar' } )
5967 component . release
6068
6169 expect ( java_opts ) . to include ( '-Dotel.service.name=GreatServiceTM' )
You can’t perform that action at this time.
0 commit comments