Skip to content

File(/etc/machine-id) is not within the allowed path(s) #1450

@ZebraNorth

Description

@ZebraNorth

Describe your environment Describe any aspect of your environment relevant to the problem, including your php version (php -v will tell you your current version), version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on master.

Linux, PHP 8.3.11, Laravel 11, opentelemetry-sdk v1.1.2

Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.

Edit php.ini to include open_basedir=/var/www

What is the expected behavior?
What did you expect to see?

The site should continue to work as before.

What is the actual behavior?
What did you see instead?

During page load, the following exception is thrown:

is_file(): open_basedir restriction in effect. File(/etc/machine-id) is not within the allowed path(s):

OpenTelemetry\SDK\Resource\Detectors\Host
:58
getLinuxId
 
OpenTelemetry\SDK\Resource\Detectors\Host
:42
getMachineId
 
OpenTelemetry\SDK\Resource\Detectors\Host
:33
getResource
 
OpenTelemetry\SDK\Resource\Detectors\Composite
:24
getResource
 
OpenTelemetry\SDK\Resource\ResourceInfoFactory
:38
defaultResource
 
Stickee\Instrumentation\Laravel\ServiceProvider
:158
Stickee\Instrumentation\Laravel\{closure}
 
Illuminate\Container\Container
:937
build
 
Illuminate\Container\Container
:819
resolve
 
Illuminate\Foundation\Application
:1048
resolve
 
Illuminate\Container\Container
:755
make
 
Illuminate\Foundation\Application
:1030
make
 
PlunkettScott\LaravelOpenTelemetry\Otel
:39
start
 
PlunkettScott\LaravelOpenTelemetry\OtelServiceProvider
:26
boot
 
Illuminate\Container\BoundMethod
:36
Illuminate\Container\{closure}
 
Illuminate\Container\Util
:43
unwrapIfClosure
 
Illuminate\Container\BoundMethod
:95
callBoundMethod
 
Illuminate\Container\BoundMethod
:35
call
 
Illuminate\Container\Container
:694
call
 
Illuminate\Foundation\Application
:1121
bootProvider
 
Illuminate\Foundation\Application
:1102
array_walk
 
Illuminate\Foundation\Application
:1101
boot
 
Illuminate\Foundation\Bootstrap\BootProviders
:17
bootstrap
 
Illuminate\Foundation\Application
:316
bootstrapWith
 
Illuminate\Foundation\Http\Kernel
:187
bootstrap
 
Illuminate\Foundation\Http\Kernel
:171
sendRequestThroughRouter
 
Illuminate\Foundation\Http\Kernel
:145
handle
 
Illuminate\Foundation\Application
:1190
handleRequest
 
public/index.php
:17

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions