Hi Team, Is there any documentation to integrate S...
# support
r
Hi Team, Is there any documentation to integrate SigNoz in Laravel Application?
p
Do the instructions here help? - https://signoz.io/docs/instrumentation/php/
r
Thanks @Pranay I finally integrated it. PHP was asking for some more additional packages to install in my mac for integrating Signoz in laraval. Any Idea why I am getting 404
@Pranay @Prashant Shahi
p
@Ravi B I don't think that URL is right. Valid URL for the service
laravel
should look like this: http://localhost:3301/services/laravel
r
When I click on service
Laravel/Laravel
I goes to this URL.
<http://localhost:3301/services/laravel>
This URL gives me something went wrong. If I call this API
<http://localhost:3301/api/v1/service/overview>
With Payload:
{"start":"1685367383735000000","end":"1685369183735000000","service":"laravel/laravel","step":60,"tags":[]}
I am getting 200 status with result. It seems like API is okay with
Laravel/Laravel
but react application gives me 404 @Prashant Shahi
p
It look like a bug due to that
/
being part of the service name. can you update the service name to include only alphanumeric characters? cc @Ankit Nayan @Palash Gupta
r
I am using PHP laravel.
name
comes from composer.json composer.json require
/
in the name key. like ‘anyvendorName/app-name’ I will check If that can be removed
Or is there any documentation, where we can add custom name for the app in signoz code (PHP)
a
/
cannot be part of service name today
p
you can use resource attribute env to set service name
a
@Ravi B try
OTEL_SERVICE_NAME
env or
OTEL_RESOURCE_ATTRIBUTES=service.name=<app_name>
r
how to use that? Can you please let me know. I follow this https://signoz.io/docs/instrumentation/php/
As I can se It is passed in command.
Copy code
OTEL_SERVICE_NAME=signoz-php-app php FILENAME.php
Can’t we set this in code somewhere
p
you can set this in code as well:
Copy code
putenv('OTEL_SERVICE_NAME=laravel-app');
r
It will automatic pick this env value?
p
yes, it will. Also, could you share how you have configured it for Laravel app? It could be helpful for others trying in the framework.
r
I setup code in public/index.php
any update on this. @Prashant Shahi really appreciated.
p
seems like mock data are included instead of the actual request data.
r
can you please suggest
Hi @Prashant Shahi Any updates please, what changes we can do to fix.
@Pranay @Prashant Shahi Can you please guide on this? We are ready to deploy our app in prod to test SIgnoz
p
@Ravi B Unfortunately, our team does not have expertise on PHP to properly help you out. You can refer to OpenTelemetry official docs and GitHub repo. • https://opentelemetry.io/docs/instrumentation/php/getting-started/https://github.com/open-telemetry/opentelemetry-php