elastic / elastic/apm-agent-php
Change the HTTP Request default span name
- Dominant language
- PHP
- Stars
- 268
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Most of our HTTP requests coming from outside the perimeter are going through an API Gateway.
Since the default HTTP request instrumentation uses the schema ` ` to name spans, we end up with multiple calls like `GET api.example.com` without being able to easily differentiate between the different endpoints we are calling.
When we need to quickly identify a problem with individual calls, it becomes hard exercise quickly.
**Describe the solution you'd like**
I would like to be able to change the default span name for HTTP requests on initialisation time using an environment variable or a php.ini param.
**Describe alternatives you've considered**
We could also change the default schema to use ` ` instead and we would start to see:
`GET api.example.com/user/333`.
**Additional context**
Current Spec suggests the same naming schema: https://github.com/elastic/apm/blob/main/specs/agents/tracing-instrumentation-http.md
Contributor guide
Assessment
This issue has not been assessed yet.